claudie icon indicating copy to clipboard operation
claudie copied to clipboard

Bug: MountVolume.SetUp failed for volume - Add multipath config for Longhorn

Open Danielss89 opened this issue 1 year ago • 1 comments

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/

Danielss89 avatar May 10 '24 20:05 Danielss89

✨✨ 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.conf file does not include the specified blacklist configuration to prevent MountVolume.SetUp errors. 🛠️
  • The repository does not contain a file named /etc/multipath.conf or any ansible playbook that modifies this file. 📁
  • The ansible playbook services/ansibler/server/ansible-playbooks/longhorn-req.yml is used for installing Longhorn dependencies but does not modify /etc/multipath.conf. 🐂
After
  • Yes, the /etc/multipath.conf file now includes the specified blacklist configuration to prevent MountVolume.SetUp errors. 🛠️
  • The ansible playbook services/ansibler/server/ansible-playbooks/longhorn-req.yml is modified to include tasks for updating /etc/multipath.conf with the required blacklist configuration and restarting the multipathd.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.conf with the specified blacklist configuration
    • Add a task to restart multipathd.service after updating the configuration
    • Ensure the changes are applied before installing Longhorn dependencies
Sketch of implementation

View the changes

Details

Code analyzed at a6836cdd953013f33975bd47a3ca6de4685677e6

Danielss89 avatar May 15 '24 14:05 Danielss89