Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change multipath default behaviour #938

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

ibrokethecloud
Copy link
Contributor

@ibrokethecloud ibrokethecloud commented Jan 23, 2025

Problem:

Currently when externalDisk support is not enabled, the installer adds a default kernel argument multipath=off via third_party_kernel_arguments.

This works fine, however it breaks CSI's needing multipath since it cannot be enabled due to the kernel argument.

Disabling multipath=off from third_party_kernel_args breaks the boot, when OS has been installed to nvme, as multipath attempts to create multiple paths for nvme disks.
Solution:

To fix this a minor change has been made to default kernel argument being passed when multipath is not needed. This allows dracut to still boot with nvme disks as it ignores multipath module packaged in dracut, while allowing multipathd to be enable subsequently

In addition a default multipath config is added to ignore longhorn based volumes from multipath

Related Issue:
harvester/harvester#7438

Test plan:

Failure case:

  • Install v1.4.0 to a host with nvme disks, with the nvme disk being used as the install disk
  • After installation is completed, ssh into the node and attempt to enable multipathd
systemctl enable multipathd
systemctl start multipathd

This will fail as can be checked via journalctl -fu multipathd

  • remove the multipath=off kernel argument by removing it from /oem/grubenv
    grub2-editenv /oem/grubenv set third_party_kernel_args=""
  • reboot node

Expect node boot to fail

Success case:

  • Install build with this change to a host with nvme disks, with the nvme disk being used as the install disk
  • After installation is completed, ssh into the node and attempt to enable multipathd
systemctl enable multipathd
systemctl start multipathd
  • create a VM using any image
  • once VM is running shell into the node and check multipath -ll
  • No longhorn volumes should be reported

This will be successful

Copy link
Contributor

@tserong tserong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

Copy link
Contributor

@Vicente-Cheng Vicente-Cheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the enhancement!

…s not needed. This allows dracut to still boot with nvme disks as it ignores multipath module packaged in dracut, while allowing multipathd to be enable subsequently

add default multipath directives to ignore Longhorn disks
@ibrokethecloud ibrokethecloud merged commit d63556f into harvester:master Feb 13, 2025
7 checks passed
@ibrokethecloud
Copy link
Contributor Author

@Mergifyio backport v1.5 v1.4

Copy link

mergify bot commented Feb 13, 2025

backport v1.5 v1.4

✅ Backports have been created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants