121229
From f93681073cae4cfa118cfb3a2acb8cf78ce30646 Mon Sep 17 00:00:00 2001
121229
From: Benjamin Marzinski <bmarzins@redhat.com>
121229
Date: Tue, 3 Sep 2019 10:44:36 -0500
121229
Subject: [PATCH] modules.d: fix udev rules detection of multipath devices
121229
121229
Starting with the 0.7.7 release of the multipath tools, the multipath
121229
udev rules always set a value in ENV{DM_MULTIPATH_DEVICE_PATH} for any
121229
device that multipath scans. A value of 0 means that the device is not
121229
claimed by multipath, and a value of 1 means that it is. Because of
121229
this, udev rules that check ENV{DM_MULTIPATH_DEVICE_PATH}=="?*" will
121229
always return True, and act as if every scanned device is claimed by
121229
multipath. Checking ENV{DM_MULTIPATH_DEVICE_PATH}=="1" will work
121229
correctly for both the old and new versions of the multipath tools.
121229
---
121229
 modules.d/90dm/59-persistent-storage-dm.rules      | 2 +-
121229
 modules.d/90dmraid/61-dmraid-imsm.rules            | 2 +-
121229
 modules.d/90lvm/64-lvm.rules                       | 2 +-
121229
 modules.d/90mdraid/59-persistent-storage-md.rules  | 2 +-
121229
 modules.d/90mdraid/65-md-incremental-imsm.rules    | 2 +-
121229
 modules.d/95udev-rules/59-persistent-storage.rules | 2 +-
121229
 modules.d/95udev-rules/61-persistent-storage.rules | 2 +-
121229
 7 files changed, 7 insertions(+), 7 deletions(-)
121229
121229
diff --git a/modules.d/90dm/59-persistent-storage-dm.rules b/modules.d/90dm/59-persistent-storage-dm.rules
121229
index 73b09376..2be11227 100644
121229
--- a/modules.d/90dm/59-persistent-storage-dm.rules
121229
+++ b/modules.d/90dm/59-persistent-storage-dm.rules
121229
@@ -1,7 +1,7 @@
121229
 SUBSYSTEM!="block", GOTO="dm_end"
121229
 ACTION!="add|change", GOTO="dm_end"
121229
 # Also don't process disks that are slated to be a multipath device
121229
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="dm_end"
121229
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="dm_end"
121229
 
121229
 KERNEL!="dm-[0-9]*", GOTO="dm_end"
121229
 ACTION=="add", GOTO="dm_end"
121229
diff --git a/modules.d/90dmraid/61-dmraid-imsm.rules b/modules.d/90dmraid/61-dmraid-imsm.rules
121229
index 72267d3c..8a6b215e 100644
121229
--- a/modules.d/90dmraid/61-dmraid-imsm.rules
121229
+++ b/modules.d/90dmraid/61-dmraid-imsm.rules
121229
@@ -5,7 +5,7 @@
121229
 SUBSYSTEM!="block", GOTO="dm_end"
121229
 ACTION!="add|change", GOTO="dm_end"
121229
 # Also don't process disks that are slated to be a multipath device
121229
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="dm_end"
121229
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="dm_end"
121229
 
121229
 ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="dm_end"
121229
 
121229
diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules
121229
index 3ce0c1f6..65f65249 100644
121229
--- a/modules.d/90lvm/64-lvm.rules
121229
+++ b/modules.d/90lvm/64-lvm.rules
121229
@@ -7,7 +7,7 @@
121229
 SUBSYSTEM!="block", GOTO="lvm_end"
121229
 ACTION!="add|change", GOTO="lvm_end"
121229
 # Also don't process disks that are slated to be a multipath device
121229
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="lvm_end"
121229
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="lvm_end"
121229
 KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end"
121229
 ENV{ID_FS_TYPE}!="LVM?_member", GOTO="lvm_end"
121229
 
121229
diff --git a/modules.d/90mdraid/59-persistent-storage-md.rules b/modules.d/90mdraid/59-persistent-storage-md.rules
121229
index 6ef858aa..96b10108 100644
121229
--- a/modules.d/90mdraid/59-persistent-storage-md.rules
121229
+++ b/modules.d/90mdraid/59-persistent-storage-md.rules
121229
@@ -1,7 +1,7 @@
121229
 SUBSYSTEM!="block", GOTO="md_end"
121229
 ACTION!="add|change", GOTO="md_end"
121229
 # Also don't process disks that are slated to be a multipath device
121229
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="md_end"
121229
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="md_end"
121229
 
121229
 KERNEL!="md[0-9]*|md_d[0-9]*|md/*", KERNEL!="md*", GOTO="md_end"
121229
 
121229
diff --git a/modules.d/90mdraid/65-md-incremental-imsm.rules b/modules.d/90mdraid/65-md-incremental-imsm.rules
121229
index d66dd012..52f5b195 100644
121229
--- a/modules.d/90mdraid/65-md-incremental-imsm.rules
121229
+++ b/modules.d/90mdraid/65-md-incremental-imsm.rules
121229
@@ -9,7 +9,7 @@ KERNEL=="md*", ENV{ID_FS_TYPE}!="linux_raid_member", GOTO="md_end"
121229
 KERNEL=="md*", ACTION!="change", GOTO="md_end"
121229
 
121229
 # Also don't process disks that are slated to be a multipath device
121229
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="md_end"
121229
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="md_end"
121229
 
121229
 ENV{ID_FS_TYPE}=="ddf_raid_member|isw_raid_member|linux_raid_member", GOTO="md_try"
121229
 GOTO="md_end"
121229
diff --git a/modules.d/95udev-rules/59-persistent-storage.rules b/modules.d/95udev-rules/59-persistent-storage.rules
121229
index 47ff6edd..8d8650f7 100644
121229
--- a/modules.d/95udev-rules/59-persistent-storage.rules
121229
+++ b/modules.d/95udev-rules/59-persistent-storage.rules
121229
@@ -1,7 +1,7 @@
121229
 SUBSYSTEM!="block", GOTO="ps_end"
121229
 ACTION!="add|change", GOTO="ps_end"
121229
 # Also don't process disks that are slated to be a multipath device
121229
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="ps_end"
121229
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="ps_end"
121229
 
121229
 KERNEL=="cciss[0-9]*", IMPORT BLKID
121229
 KERNEL=="nbd[0-9]*", IMPORT BLKID
121229
diff --git a/modules.d/95udev-rules/61-persistent-storage.rules b/modules.d/95udev-rules/61-persistent-storage.rules
121229
index 37148b07..895ecebd 100644
121229
--- a/modules.d/95udev-rules/61-persistent-storage.rules
121229
+++ b/modules.d/95udev-rules/61-persistent-storage.rules
121229
@@ -1,7 +1,7 @@
121229
 SUBSYSTEM!="block", GOTO="pss_end"
121229
 ACTION!="add|change", GOTO="pss_end"
121229
 # Also don't process disks that are slated to be a multipath device
121229
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="pss_end"
121229
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="pss_end"
121229
 
121229
 ACTION=="change", KERNEL=="dm-[0-9]*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", GOTO="do_pss"
121229
 KERNEL=="cciss[0-9]*", GOTO="do_pss"