From a2c4179cac0cd603e06ed56e53d6075434a0ea95 Mon Sep 17 00:00:00 2001 From: Michael Hofmann Date: Thu, 27 Apr 2023 10:10:03 +0200 Subject: [PATCH] Backport fix to remove dependency on multipathd.socket Fixes boot hangs on s390x/multipath. - https://github.com/dracutdevs/dracut/issues/2175 - https://github.com/dracutdevs/dracut/issues/2289 - https://github.com/dracutdevs/dracut/issues/2318 --- ...move-dependency-on-multipathd-socket.patch | 41 +++++++++++++++++++ dracut.spec | 9 +++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 2290-remove-dependency-on-multipathd-socket.patch diff --git a/2290-remove-dependency-on-multipathd-socket.patch b/2290-remove-dependency-on-multipathd-socket.patch new file mode 100644 index 0000000..e2f6ce8 --- /dev/null +++ b/2290-remove-dependency-on-multipathd-socket.patch @@ -0,0 +1,41 @@ +From 71696ec83fce0b20a3cf489b970a200e44227d78 Mon Sep 17 00:00:00 2001 +From: Tianhao Chai +Date: Mon, 10 Apr 2023 20:36:12 -0400 +Subject: [PATCH] fix(multipath): remove dependency on multipathd.socket + +This reverts commit e39ff407eca1d783ab44093c44db5ee401ff5b1d, removes +an incorrect `Also=` directive from multipathd.service. + +`Also=multipathd.socket` is not the correct behavior for a +socket-activated service. This directive has been removed upstream +and dracut should do the same. + +This fixes #2289, #2175 where in the cleanup hook running multipath +binary triggers activation of multipathd.service after it is stopped +as dracut prepares to switch root in initrd-cleanup.service. +--- + modules.d/90multipath/module-setup.sh | 1 - + modules.d/90multipath/multipathd.service | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index 370cab92b..9c3e6295f 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -137,7 +137,6 @@ install() { + inst_simple "${moddir}/multipathd-configure.service" "${systemdsystemunitdir}/multipathd-configure.service" + $SYSTEMCTL -q --root "$initdir" enable multipathd-configure.service + fi +- inst_simple "${systemdsystemunitdir}/multipathd.socket" + inst_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service" + $SYSTEMCTL -q --root "$initdir" enable multipathd.service + else +diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service +index e8182533d..1680cdfb3 100644 +--- a/modules.d/90multipath/multipathd.service ++++ b/modules.d/90multipath/multipathd.service +@@ -25,4 +25,3 @@ TasksMax=infinity + + [Install] + WantedBy=sysinit.target +-Also=multipathd.socket diff --git a/dracut.spec b/dracut.spec index 4c17042..ad12041 100644 --- a/dracut.spec +++ b/dracut.spec @@ -7,7 +7,7 @@ %global __requires_exclude pkg-config # rpmdev-bumpspec and releng automation compatible variable -%global baserelease 5 +%global baserelease 6 Name: dracut Version: 059 @@ -58,6 +58,10 @@ Patch6: 2134-revert-avoid-restarting-NetworkManager.patch # https://github.com/dracutdevs/dracut/pull/2224 Patch7: 2224-network-include-default-mac-none-link.patch +# fix(multipath): remove dependency on multipathd.socket +# https://github.com/dracutdevs/dracut/pull/2290 +Patch8: 2290-remove-dependency-on-multipathd-socket.patch + BuildRequires: bash BuildRequires: git-core BuildRequires: pkgconfig(libkmod) >= 23 @@ -464,6 +468,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog +* Thu Apr 27 2023 Michael Hofmann - 059-6 +- Backport fix to remove dependency on multipathd.socket + * Tue Mar 14 2023 Dusty Mabe - 059-5 - feat(network): include 98-default-mac-none.link if it exists