dracutdevs / dracut

dracut the event driven initramfs infrastructure
https://github.com/dracutdevs/dracut/wiki
GNU General Public License v2.0
573 stars 396 forks source link

fix(90multipath): drop unneeded dependencies from configure service #2609

Open bmarzins opened 5 months ago

bmarzins commented 5 months ago

multipathd-configure.service previously had the same "After" dependencies as the multipathd.service, with the idea of running immediately before it. Multipathd now supports being started much earlier, but the dependencies in multipathd-configure.service stop it from being able to.

Since all multipathd-configure.service does is write out a configuration file, it doesn't need any of its "After" udev dependencies. Remove them, and clean up some other unneeded dependencies.

This pull request changes 90multipath/multipathd-configure.service so that it (and by extension multipathd.service which runs after it) will be run earlier.

Changes

Checklist

Fixes #

bmarzins commented 5 months ago

@jlebon I tested this with a multipathed root fedora rawhide install where I set "rd.multipath=default" in the kernel command line and temporarily removed /etc/multipath.conf when rebuilding the initramfs, so that multipathd-configure.service had its conditions met. I used rawhide since that has the 0.9.7 version of the multipath tools, which need to start earlier in the initramfs. I did not do any CoreOS specific testing.

To verify that boot breaks without this fix, all you need to do is install the 0.9.7 version of device-mapper-multipath on a multipathed root system (with the root device on a partition. Using lvm for your root device will avoid the issue) that installs the multipathd-configure.service in its initramfs (any system with mpathconf), and remake the initramfs. It breaks regardless of whether the Conditions are met. The issue comes down to how it orders multipathd.service, which must run after it.

LaszloGombos commented 5 months ago

CC @mwilck

jlebon commented 5 months ago

Testing on Fedora CoreOS rawhide looks good. It also worked before this patch, but I didn't dig deeply into why (all the preconditions mentioned in https://github.com/dracutdevs/dracut/pull/2609#issuecomment-1894824013 are met).

stale[bot] commented 3 months ago

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

bmarzins commented 3 months ago

This is important to any distribution that uses multipathd-configure.service. Is there something that's needs to be done to get some reviews on this, so it can get merged?

LaszloGombos commented 3 months ago

more relevant info - https://bugzilla.redhat.com/show_bug.cgi?id=2260413