dracut/0306-90multipath-add-shutdown-script.patch

66 lines
2.2 KiB
Diff
Raw Normal View History

Accepting request 422869 from home:hreinecke:branches:Base:System - Rename patch: * From 0211-fix_multipath_check_hostonly.patch to 0303-fix_multipath_check_hostonly.patch - Rename patch: * From 0213-10i18n-keymap-find.patch to 0213-Fix-wrong-keymap-inclusion.patch - 95fcoe: Do not complain about missing /etc/hba.conf (bsc#980539) * Add 0215-95fcoe-Do-not-complain-about-missing-etc-hba.conf.patch - 95fcoe: silence lldpad warnings * Add 0216-95fcoe-silence-lldpad-warnings.patch - 95fcoe: Allow to specify the FCoE mode via the fcoe= parameter * Add 0217-95fcoe-Allow-to-specify-the-FCoE-mode-via-the-fcoe-p.patch - 40network: allow persistent interface names (bsc#995284) * Add 0218-40network-allow-persistent-interface-names.patch - 95fcoe: use interface names instead of MAC addresses * Add 0219-95fcoe-use-interface-names-instead-of-MAC-addresses.patch - 95fcoe: always set AUTO_VLAN for fcoemon (bsc#995019) * Add 0220-95fcoe-always-set-AUTO_VLAN-for-fcoemon.patch - 95fcoe: Add shutdown script (bsc#994860) * Add 0221-95fcoe-Add-shutdown-script.patch - 90dm: Fixup shutdown script (bsc#994860) * Add 0222-90dm-Fixup-shutdown-script.patch - 90dm: fixup dependency cycle between MD and DM shutdown (bsc#994860) * Add 0223-90dm-fixup-dependency-cycle-between-MD-and-DM-shutdo.patch - 90multipath: Start daemon after udev settle (bsc#986734) * Add 0304-90multipath-Start-daemon-after-udev-settle.patch - 90multipath: load dm_multipath module during startup * Add 0305-90multipath-load-dm_multipath-module-during-startup.patch - 90multipath: add shutdown script (bsc#994860) OBS-URL: https://build.opensuse.org/request/show/422869 OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=263
2016-09-01 13:57:40 +02:00
From 800cfd66abb60fe9524d321df77717435ed96e35 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Thu, 25 Aug 2016 09:33:26 +0200
Subject: [PATCH] 90multipath: add shutdown script
As the device-mapper module is removing all device-mapper tables
during shutdown we need to make sure to disable queuing on the
multipath devices; otherwise there might still be I/O pending
and the removal will fail.
References: bsc#994860
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
modules.d/90multipath/module-setup.sh | 1 +
modules.d/90multipath/multipath-shutdown.sh | 7 +++++++
modules.d/90multipath/multipathd-needshutdown.sh | 9 +++++----
3 files changed, 13 insertions(+), 4 deletions(-)
create mode 100755 modules.d/90multipath/multipath-shutdown.sh
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
index a5db55f..ad257ad 100755
--- a/modules.d/90multipath/module-setup.sh
+++ b/modules.d/90multipath/module-setup.sh
@@ -114,6 +114,7 @@ install() {
fi
inst_hook cleanup 80 "$moddir/multipathd-needshutdown.sh"
+ inst_hook shutdown 20 "$moddir/multipath-shutdown.sh"
inst_rules 40-multipath.rules 56-multipath.rules \
62-multipath.rules 65-multipath.rules \
diff --git a/modules.d/90multipath/multipath-shutdown.sh b/modules.d/90multipath/multipath-shutdown.sh
new file mode 100755
index 0000000..47e9990
--- /dev/null
+++ b/modules.d/90multipath/multipath-shutdown.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+for i in $(multipath -l -v1); do
+ if ! $(dmsetup table $i | sed -n '/.*queue_if_no_path.*/q1') ; then
+ dmsetup message $i 0 fail_if_no_path
+ fi
+done
diff --git a/modules.d/90multipath/multipathd-needshutdown.sh b/modules.d/90multipath/multipathd-needshutdown.sh
index 214abd3..1d41bf8 100755
--- a/modules.d/90multipath/multipathd-needshutdown.sh
+++ b/modules.d/90multipath/multipathd-needshutdown.sh
@@ -1,7 +1,8 @@
#!/bin/sh
-for i in /dev/mapper/mpath*; do
- [ -b "$i" ] || continue
- need_shutdown
- break
+for i in $(multipath -l -v1); do
Accepting request 431190 from home:hreinecke:branches:Base:System - 90multipath: parse commandline option 'multipath=off' (bsc#1001691) *add 0307-90multipath-parse-kernel-commandline-option-multipat.patch - 95fcoe: do not start fcoemon twice (bsc#1001512) *add 0225-95fcoe-do-not-start-fcoemon-twice.patch - Reformat patch headers: *modify 0199-rd-iscsi-waitnet-default-false.patch *modify 0200-dracut_fix_multipath_without_config.patch *modify 0210-add_fcoe_uefi_check.patch *modify 0212-fcoe_reorder_init_path.patch - Rediff patches to apply cleanly: *modify 0124-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch *modify 0133-Allow-multiple-configurations-per-network-interface-.patch *modify 0170-iscsi-skip-ibft-invalid-dhcp.patch *modify 0218-40network-allow-persistent-interface-names.patch - Remove spurious whitespaces: *modify 0169-network_set_mtu_macaddr_for_dhcp.patch - 40network: print out correct prefix (bsc#996141) *modify 0125-40network-separate-mask-and-prefix.patch - 95iscsi: setup bnx2i offload connection correctly (bsc#997598) *add 0224-95iscsi-setup-bnx2i-offload-connections-properly.patch - Rename patches to match sequence number: *old: 0019-40network-Fix-race-condition-when-wait-for-networks.patch *new: 0012-40network-Fix-race-condition-when-wait-for-networks.patch *old: 0066-40network-always-start-netroot-in-ifup.sh.patch *new: 0013-40network-always-start-netroot-in-ifup.sh.patch - rd.iscsi.waitnet should default to false in order for dracut to wait for the network devices (bsc#997598) OBS-URL: https://build.opensuse.org/request/show/431190 OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=267
2016-10-07 10:44:57 +02:00
+ if $(dmsetup table $i | sed -n '/.*queue_if_no_path.*/q1') ; then
Accepting request 422869 from home:hreinecke:branches:Base:System - Rename patch: * From 0211-fix_multipath_check_hostonly.patch to 0303-fix_multipath_check_hostonly.patch - Rename patch: * From 0213-10i18n-keymap-find.patch to 0213-Fix-wrong-keymap-inclusion.patch - 95fcoe: Do not complain about missing /etc/hba.conf (bsc#980539) * Add 0215-95fcoe-Do-not-complain-about-missing-etc-hba.conf.patch - 95fcoe: silence lldpad warnings * Add 0216-95fcoe-silence-lldpad-warnings.patch - 95fcoe: Allow to specify the FCoE mode via the fcoe= parameter * Add 0217-95fcoe-Allow-to-specify-the-FCoE-mode-via-the-fcoe-p.patch - 40network: allow persistent interface names (bsc#995284) * Add 0218-40network-allow-persistent-interface-names.patch - 95fcoe: use interface names instead of MAC addresses * Add 0219-95fcoe-use-interface-names-instead-of-MAC-addresses.patch - 95fcoe: always set AUTO_VLAN for fcoemon (bsc#995019) * Add 0220-95fcoe-always-set-AUTO_VLAN-for-fcoemon.patch - 95fcoe: Add shutdown script (bsc#994860) * Add 0221-95fcoe-Add-shutdown-script.patch - 90dm: Fixup shutdown script (bsc#994860) * Add 0222-90dm-Fixup-shutdown-script.patch - 90dm: fixup dependency cycle between MD and DM shutdown (bsc#994860) * Add 0223-90dm-fixup-dependency-cycle-between-MD-and-DM-shutdo.patch - 90multipath: Start daemon after udev settle (bsc#986734) * Add 0304-90multipath-Start-daemon-after-udev-settle.patch - 90multipath: load dm_multipath module during startup * Add 0305-90multipath-load-dm_multipath-module-during-startup.patch - 90multipath: add shutdown script (bsc#994860) OBS-URL: https://build.opensuse.org/request/show/422869 OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=263
2016-09-01 13:57:40 +02:00
+ need_shutdown
+ break
+ fi
done
--
2.6.6