f9dfbb37ac
Modify 0136-RHBZ-1304687-wait-for-map-add.patch * switch to missing_uev_wait_timeout to stop waiting for uev Refresh 0137-RHBZ-1280524-clear-chkr-msg.patch Refresh 0150-RHBZ-1253913-fix-startup-msg.patch Refresh 0154-UPBZ-1291406-disable-reinstate.patch Refresh 0156-UPBZ-1313324-dont-fail-discovery.patch Refresh 0161-RHBZ-1311659-no-kpartx.patch Refresh 0167-RHBZ-1335176-fix-show-cmds.patch Add 0173-RH-update-man-page.patch Add 0174-RHBZ-1362396-modprobe.patch * make starting the multipathd service modprobe dm-multipath in the sysvinit scripts Add 0175-RHBZ-1357382-ordering.patch * force multipathd.service to start after systemd-udev-trigger.service Add 0176-RHBZ-1363830-fix-rename.patch * initialized a variable to make dm_rename not fail randomly Add 0177-libmultipath-correctly-initialize-pp-sg_id.patch * This and all the following patches add the rbd patch checker Add 0178-libmultipath-add-rbd-discovery.patch Add 0179-multipath-tools-add-checker-callout-to-repair-path.patch Add 0180-multipath-tools-Add-rbd-checker.patch Add 0181-multipath-tools-Add-rbd-to-the-hwtable.patch Add 0182-multipath-tools-check-for-initialized-checker-before.patch Add 0183-multipathd-Don-t-call-repair-on-blacklisted-path.patch Add 0184-rbd-fix-sync-repair-support.patch Add 0185-rbd-check-for-nonshared-clients.patch Add 0186-rbd-check-for-exclusive-lock-enabled.patch Add 0187-rbd-fixup-log-messages.patch Add 0188-RHBZ-1368501-dont-exit.patch * make multipathd not exit if it encounters recoverable errors on startup Add 0189-RHBZ-1368211-remove-retries.patch * add "remove_retries" multipath.conf parameter to make multiple attempts to remove a multipath device if it is busy. Add 0190-RHBZ-1380602-rbd-lock-on-read.patch * pass lock_on_read when remapping image Add 0191-RHBZ-1169168-disable-changed-paths.patch * add "disabled_changed_wwids" multipath.conf parameter to disable paths whose wwid changes Add 0192-RHBZ-1362409-infinibox-config.patch Add 0194-RHBZ-1351964-kpartx-recurse.patch * fix recursion on corrupt dos partitions Add 0195-RHBZ-1359510-no-daemon-msg.patch * print a messages when multipathd isn't running Add 0196-RHBZ-1239173-dont-set-flag.patch * don't set reload flag on reloads when you gain your first valid path Add 0197-RHBZ-1394059-max-sectors-kb.patch * add "max_sectors_kb" multipath.conf parameter to set max_sectors_kb on a multipath device and all its path devices Add 0198-RHBZ-1372032-detect-path-checker.patch * add "detect_checker" multipath.conf parameter to detect ALUA arrays and set the path checker to TUR Add 0199-RHBZ-1279355-3pardata-config.patch Add 0200-RHBZ-1402092-orphan-status.patch * clear status on orphan paths Add 0201-RHBZ-1403552-silence-warning.patch Add 0202-RHBZ-1362120-skip-prio.patch * don't run prio on failed paths Add 0203-RHBZ-1363718-add-msgs.patch Add 0204-RHBZ-1406226-nimble-config.patch Add 0205-RHBZ-1416569-reset-stats.patch * add "reset maps stats" and "reset map <map> stats" multipathd interactive commands to reset the stats tracked by multipathd Add 0206-RHBZ-1239173-pt2-no-paths.patch * make multipath correctly disable scanning and rules running when it gets a uevent and there are not valid paths. Add 0207-UP-add-libmpathcmd.patch * New shared library, libmpathcmd, that sends and receives messages from multipathd. device-mapper-multipath now uses this library internally. Add 0208-UPBZ-1430097-multipathd-IPC-changes.patch * validation that modifying commands are coming from root. Add 0209-UPBZ-1430097-multipath-C-API.patch * New shared library. libdmmp, that presents the information from multipathd in a structured manner to make it easier for callers to use Add 0210-RH-fix-uninstall.patch * Minor compilation fixes Add 0211-RH-strlen-fix.patch * checks that variables are not NULL before passing them to strlen Add 0212-RHBZ-1431562-for-read-only.patch Make 3 new subpackages * device-mapper-multipath-devel, libdmmp, and libdmmp-devel. libmpathcmd and libmpathprio are in device-mapper-multipath-libs and device-mapper-multipath-devel. libdmmp is in its own subpackages Move libmpathprio devel files to device-mapper-multipath-devel Added BuildRequires on librados2-devel
122 lines
5.3 KiB
Diff
122 lines
5.3 KiB
Diff
---
|
|
libmultipath/configure.c | 2 -
|
|
libmultipath/devmapper.h | 6 ++++
|
|
multipath/11-dm-mpath.rules | 61 +++++++++++++++++++++++++++++++++-----------
|
|
3 files changed, 54 insertions(+), 15 deletions(-)
|
|
|
|
Index: multipath-tools-130222/libmultipath/configure.c
|
|
===================================================================
|
|
--- multipath-tools-130222.orig/libmultipath/configure.c
|
|
+++ multipath-tools-130222/libmultipath/configure.c
|
|
@@ -615,7 +615,7 @@ extern int
|
|
domap (struct multipath * mpp, char * params)
|
|
{
|
|
int r = 0;
|
|
- uint16_t udev_flags = ((mpp->force_udev_reload)? 0 : MPATH_UDEV_RELOAD_FLAG) | ((mpp->skip_kpartx == SKIP_KPARTX_ON)? MPATH_UDEV_NO_KPARTX_FLAG : 0);
|
|
+ uint16_t udev_flags = ((mpp->force_udev_reload)? 0 : MPATH_UDEV_RELOAD_FLAG) | ((mpp->skip_kpartx == SKIP_KPARTX_ON)? MPATH_UDEV_NO_KPARTX_FLAG : 0) | ((mpp->nr_active)? 0 : MPATH_UDEV_NO_PATHS_FLAG);
|
|
|
|
/*
|
|
* last chance to quit before touching the devmaps
|
|
Index: multipath-tools-130222/libmultipath/devmapper.h
|
|
===================================================================
|
|
--- multipath-tools-130222.orig/libmultipath/devmapper.h
|
|
+++ multipath-tools-130222/libmultipath/devmapper.h
|
|
@@ -18,6 +18,12 @@
|
|
#define MPATH_UDEV_NO_KPARTX_FLAG 0
|
|
#endif
|
|
|
|
+#ifdef DM_SUBSYSTEM_UDEV_FLAG2
|
|
+#define MPATH_UDEV_NO_PATHS_FLAG DM_SUBSYSTEM_UDEV_FLAG2
|
|
+#else
|
|
+#define MPATH_UDEV_NO_PATHS_FLAG 0
|
|
+#endif
|
|
+
|
|
void dm_init(void);
|
|
int dm_prereq (void);
|
|
int dm_drv_version (unsigned int * version, char * str);
|
|
Index: multipath-tools-130222/multipath/11-dm-mpath.rules
|
|
===================================================================
|
|
--- multipath-tools-130222.orig/multipath/11-dm-mpath.rules
|
|
+++ multipath-tools-130222/multipath/11-dm-mpath.rules
|
|
@@ -2,33 +2,66 @@ ACTION!="add|change", GOTO="mpath_end"
|
|
ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="mpath_end"
|
|
ENV{DM_UUID}!="mpath-?*", GOTO="mpath_end"
|
|
|
|
+IMPORT{db}="DM_DISABLE_OTHER_RULES_FLAG_OLD"
|
|
+IMPORT{db}="MPATH_DEVICE_READY"
|
|
+
|
|
+# If this uevent didn't come from dm, don't try to update the
|
|
+# device state
|
|
+ENV{DM_COOKIE}!="?*", ENV{DM_ACTION}!="PATH_*", IMPORT{db}="DM_UDEV_DISABLE_OTHER_RULES_FLAG", IMPORT{db}="DM_NOSCAN", GOTO="scan_import"
|
|
+
|
|
+ENV{.MPATH_DEVICE_READY_OLD}="$env{MPATH_DEVICE_READY}"
|
|
+
|
|
+# multipath sets DM_SUBSYSTEM_UDEV_FLAG2 when it reloads a
|
|
+# table with no active devices. If this happens, mark the
|
|
+# device not ready
|
|
+ENV{DM_SUBSYSTEM_UDEV_FLAG2}=="1", ENV{MPATH_DEVICE_READY}="0",\
|
|
+ GOTO="mpath_action"
|
|
+
|
|
+# If the last path has failed mark the device not ready
|
|
+ENV{DM_ACTION}=="PATH_FAILED", ENV{DM_NR_VALID_PATHS}=="0",\
|
|
+ ENV{MPATH_DEVICE_READY}="0", GOTO="mpath_action"
|
|
+
|
|
+# Don't mark a device ready on a PATH_FAILED event. even if
|
|
+# DM_NR_VALID_PATHS is greater than 0. Just keep the existing
|
|
+# value
|
|
+ENV{DM_ACTION}=="PATH_FAILED", GOTO="mpath_action"
|
|
+
|
|
+# This event is either a PATH_REINSTATED or a table reload where
|
|
+# there are active paths. Mark the device ready
|
|
+ENV{MPATH_DEVICE_READY}=""
|
|
+
|
|
+LABEL="mpath_action"
|
|
+# DM_SUBSYSTEM_UDEV_FLAG0 is the "RELOAD" flag for multipath subsystem.
|
|
+# Drop the DM_ACTIVATION flag here as mpath reloads tables if any of its
|
|
+# paths are lost/recovered. For any stack above the mpath device, this is not
|
|
+# something that should be reacted upon since it would be useless extra work.
|
|
+# It's exactly mpath's job to provide *seamless* device access to any of the
|
|
+# paths that are available underneath.
|
|
+ENV{DM_SUBSYSTEM_UDEV_FLAG0}=="1", ENV{DM_ACTIVATION}="0"
|
|
+
|
|
# Do not initiate scanning if no path is available,
|
|
# otherwise there would be a hang or IO error on access.
|
|
# We'd like to avoid this, especially within udev processing.
|
|
-ENV{DM_NR_VALID_PATHS}!="?*", IMPORT{db}="DM_NR_VALID_PATHS"
|
|
-ENV{DM_NR_VALID_PATHS}=="0", ENV{DM_NOSCAN}="1"
|
|
+ENV{MPATH_DEVICE_READY}=="0", ENV{DM_NOSCAN}="1"
|
|
|
|
# Also skip all foreign rules if no path is available.
|
|
# Remember the original value of DM_DISABLE_OTHER_RULES_FLAG
|
|
# and restore it back once we have at least one path available.
|
|
-IMPORT{db}="DM_DISABLE_OTHER_RULES_FLAG_OLD"
|
|
-ENV{DM_ACTION}=="PATH_FAILED",\
|
|
- ENV{DM_NR_VALID_PATHS}=="0",\
|
|
+ENV{MPATH_DEVICE_READY}=="0", ENV{.MPATH_DEVICE_READY_OLD}!="0",\
|
|
ENV{DM_DISABLE_OTHER_RULES_FLAG_OLD}=="",\
|
|
ENV{DM_DISABLE_OTHER_RULES_FLAG_OLD}="$env{DM_UDEV_DISABLE_OTHER_RULES_FLAG}",\
|
|
ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="1"
|
|
-ENV{DM_ACTION}=="PATH_REINSTATED",\
|
|
- ENV{DM_NR_VALID_PATHS}=="1",\
|
|
+ENV{MPATH_DEVICE_READY}!="0", ENV{.MPATH_DEVICE_READY_OLD}=="0",\
|
|
ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="$env{DM_DISABLE_OTHER_RULES_FLAG_OLD}",\
|
|
ENV{DM_DISABLE_OTHER_RULES_FLAG_OLD}="",\
|
|
ENV{DM_ACTIVATION}="1"
|
|
|
|
-# DM_SUBSYSTEM_UDEV_FLAG0 is the "RELOAD" flag for multipath subsystem.
|
|
-# Drop the DM_ACTIVATION flag here as mpath reloads tables if any of its
|
|
-# paths are lost/recovered. For any stack above the mpath device, this is not
|
|
-# something that should be reacted upon since it would be useless extra work.
|
|
-# It's exactly mpath's job to provide *seamless* device access to any of the
|
|
-# paths that are available underneath.
|
|
-ENV{DM_SUBSYSTEM_UDEV_FLAG0}=="1", ENV{DM_ACTIVATION}="0"
|
|
+LABEL="scan_import"
|
|
+ENV{DM_NOSCAN}!="1", GOTO="mpath_end"
|
|
+ENV{ID_FS_TYPE}!="?*", IMPORT{db}="ID_FS_TYPE"
|
|
+ENV{ID_FS_USAGE}!="?*", IMPORT{db}="ID_FS_USAGE"
|
|
+ENV{ID_FS_UUID}!="?*", IMPORT{db}="ID_FS_UUID"
|
|
+ENV{ID_FS_ENC}!="?*", IMPORT{db}="ID_FS_UUID_ENC"
|
|
+ENV{ID_FS_VERSION}!="?*", IMPORT{db}="ID_FS_VERSION"
|
|
|
|
LABEL="mpath_end"
|