Bug: MountVolume.SetUp failed for volume - Add multipath config for Longhorn
I was getting the following error for a pvc:
2024-05-10 13:18:58+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.2.3+maria~ubu2204 started.
2024-05-10 13:18:58+00:00 [Warn] [Entrypoint]: /sys/fs/cgroup///memory.pressure not writable, functionality unavailable to MariaDB
2024-05-10 13:18:58+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2024-05-10 13:18:58+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.2.3+maria~ubu2204 started.
2024-05-10 13:18:59+00:00 [Note] [Entrypoint]: Initializing database files
2024-05-10 13:18:59 0 [ERROR] InnoDB: innodb_page_size=16384 requires innodb_buffer_pool_size >= 5MiB current 2MiB
2024-05-10 13:18:59 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2024-05-10 13:18:59 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2024-05-10 13:18:59 0 [ERROR] Aborting
A fix for this is to update a config on the nodes where volumes are stored.
Basicly the file /etc/multipath.conf must be updated to include:
blacklist {
devnode "^sd[a-z0-9]+"
}
And then restart: systemctl restart multipathd.service
I think Claudie should do this for all the nodes when bootstrapping them.
Read more about it here: https://longhorn.io/kb/troubleshooting-volume-with-multipath/
✨✨ Here's an AI-assisted sketch of how you might approach this issue saved by @Danielss89 using Copilot Workspace v0.17
Topic
Does the /etc/multipath.conf file include the specified blacklist configuration to prevent MountVolume.SetUp errors? 🛠️
Before
- No, the
/etc/multipath.conffile does not include the specified blacklist configuration to prevent MountVolume.SetUp errors. 🛠️ - The repository does not contain a file named
/etc/multipath.confor any ansible playbook that modifies this file. 📁 - The ansible playbook
services/ansibler/server/ansible-playbooks/longhorn-req.ymlis used for installing Longhorn dependencies but does not modify/etc/multipath.conf. 🐂
After
- Yes, the
/etc/multipath.conffile now includes the specified blacklist configuration to prevent MountVolume.SetUp errors. 🛠️ - The ansible playbook
services/ansibler/server/ansible-playbooks/longhorn-req.ymlis modified to include tasks for updating/etc/multipath.confwith the required blacklist configuration and restarting themultipathd.service. 🔄 - The modification ensures that all nodes, upon setup, will have the correct multipath configuration to support Longhorn without encountering MountVolume.SetUp errors. 🖥️
Plan
services/ansibler/server/ansible-playbooks/longhorn-req.yml(CHANGE)- Add tasks to update
/etc/multipath.confwith the specified blacklist configuration - Add a task to restart
multipathd.serviceafter updating the configuration - Ensure the changes are applied before installing Longhorn dependencies
- Add tasks to update
Sketch of implementation
Details
Code analyzed at a6836cdd953013f33975bd47a3ca6de4685677e6