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
169 lines
5.5 KiB
Diff
169 lines
5.5 KiB
Diff
---
|
|
libmultipath/config.c | 1 +
|
|
libmultipath/config.h | 1 +
|
|
libmultipath/devmapper.c | 35 +++++++++++++++++++----------------
|
|
libmultipath/dict.c | 25 +++++++++++++++++++++++++
|
|
multipath.conf.defaults | 1 +
|
|
multipath/multipath.conf.5 | 5 +++++
|
|
6 files changed, 52 insertions(+), 16 deletions(-)
|
|
|
|
Index: multipath-tools-130222/libmultipath/devmapper.c
|
|
===================================================================
|
|
--- multipath-tools-130222.orig/libmultipath/devmapper.c
|
|
+++ multipath-tools-130222/libmultipath/devmapper.c
|
|
@@ -803,10 +803,11 @@ dm_flush_map_nopaths(const char * mapnam
|
|
extern int
|
|
dm_suspend_and_flush_map (const char * mapname)
|
|
{
|
|
- int s = 0, queue_if_no_path = 0;
|
|
+ int need_reset = 0, queue_if_no_path = 0;
|
|
unsigned long long mapsize;
|
|
char params[PARAMS_SIZE] = {0};
|
|
int udev_flags = 0;
|
|
+ int retries = conf->remove_retries;
|
|
|
|
if (!dm_is_mpath(mapname))
|
|
return 0; /* nothing to do */
|
|
@@ -821,22 +822,24 @@ dm_suspend_and_flush_map (const char * m
|
|
queue_if_no_path = 1;
|
|
}
|
|
|
|
- if (queue_if_no_path)
|
|
- s = dm_queue_if_no_path((char *)mapname, 0);
|
|
- /* Leave queue_if_no_path alone if unset failed */
|
|
- if (s)
|
|
- queue_if_no_path = 0;
|
|
- else
|
|
- s = dm_simplecmd_flush(DM_DEVICE_SUSPEND, mapname, 0, 0);
|
|
-
|
|
- if (!dm_flush_map(mapname)) {
|
|
- condlog(4, "multipath map %s removed", mapname);
|
|
- return 0;
|
|
- }
|
|
+ if (queue_if_no_path && dm_queue_if_no_path((char *)mapname, 0) == 0)
|
|
+ need_reset = 1;
|
|
+
|
|
+ do {
|
|
+ if (!queue_if_no_path || need_reset)
|
|
+ dm_simplecmd_flush(DM_DEVICE_SUSPEND, mapname, 0, 0);
|
|
+
|
|
+ if (!dm_flush_map(mapname)) {
|
|
+ condlog(4, "multipath map %s removed", mapname);
|
|
+ return 0;
|
|
+ }
|
|
+ dm_simplecmd_noflush(DM_DEVICE_RESUME, mapname, udev_flags);
|
|
+ if (retries)
|
|
+ sleep(1);
|
|
+ } while (retries-- > 0);
|
|
condlog(2, "failed to remove multipath map %s", mapname);
|
|
- dm_simplecmd_noflush(DM_DEVICE_RESUME, mapname, udev_flags);
|
|
- if (queue_if_no_path)
|
|
- s = dm_queue_if_no_path((char *)mapname, 1);
|
|
+ if (need_reset)
|
|
+ dm_queue_if_no_path((char *)mapname, 1);
|
|
return 1;
|
|
}
|
|
|
|
Index: multipath-tools-130222/libmultipath/config.c
|
|
===================================================================
|
|
--- multipath-tools-130222.orig/libmultipath/config.c
|
|
+++ multipath-tools-130222/libmultipath/config.c
|
|
@@ -680,6 +680,7 @@ load_config (char * file, struct udev *u
|
|
conf->new_bindings_in_boot = 0;
|
|
conf->uev_wait_timeout = DEFAULT_UEV_WAIT_TIMEOUT;
|
|
conf->skip_kpartx = DEFAULT_SKIP_KPARTX;
|
|
+ conf->remove_retries = 0;
|
|
|
|
/*
|
|
* preload default hwtable
|
|
Index: multipath-tools-130222/libmultipath/config.h
|
|
===================================================================
|
|
--- multipath-tools-130222.orig/libmultipath/config.h
|
|
+++ multipath-tools-130222/libmultipath/config.h
|
|
@@ -146,6 +146,7 @@ struct config {
|
|
int delayed_reconfig;
|
|
int uev_wait_timeout;
|
|
int skip_kpartx;
|
|
+ int remove_retries;
|
|
unsigned int version[3];
|
|
|
|
char * dev;
|
|
Index: multipath-tools-130222/libmultipath/dict.c
|
|
===================================================================
|
|
--- multipath-tools-130222.orig/libmultipath/dict.c
|
|
+++ multipath-tools-130222/libmultipath/dict.c
|
|
@@ -935,6 +935,24 @@ def_new_bindings_in_boot_handler(vector
|
|
return 0;
|
|
}
|
|
|
|
+static int
|
|
+def_remove_retries_handler(vector strvec)
|
|
+{
|
|
+ char *buff;
|
|
+
|
|
+ buff = set_value(strvec);
|
|
+
|
|
+ if (!buff)
|
|
+ return 1;
|
|
+
|
|
+ conf->remove_retries = atoi(buff);
|
|
+ if (conf->remove_retries < 0)
|
|
+ conf->remove_retries = 0;
|
|
+ FREE(buff);
|
|
+
|
|
+ return 0;
|
|
+}
|
|
+
|
|
/*
|
|
* blacklist block handlers
|
|
*/
|
|
@@ -3405,6 +3423,12 @@ snprint_def_new_bindings_in_boot(char *
|
|
}
|
|
|
|
static int
|
|
+snprint_def_remove_retries (char * buff, int len, void * data)
|
|
+{
|
|
+ return snprintf(buff, len, "%i", conf->remove_retries);
|
|
+}
|
|
+
|
|
+static int
|
|
snprint_ble_simple (char * buff, int len, void * data)
|
|
{
|
|
struct blentry * ble = (struct blentry *)data;
|
|
@@ -3483,6 +3507,7 @@ init_keywords(void)
|
|
install_keyword("retrigger_delay", &def_retrigger_delay_handler, &snprint_def_retrigger_delay);
|
|
install_keyword("missing_uev_wait_timeout", &def_uev_wait_timeout_handler, &snprint_def_uev_wait_timeout);
|
|
install_keyword("new_bindings_in_boot", &def_new_bindings_in_boot_handler, &snprint_def_new_bindings_in_boot);
|
|
+ install_keyword("remove_retries", &def_remove_retries_handler, &snprint_def_remove_retries);
|
|
__deprecated install_keyword("default_selector", &def_selector_handler, NULL);
|
|
__deprecated install_keyword("default_path_grouping_policy", &def_pgpolicy_handler, NULL);
|
|
__deprecated install_keyword("default_uid_attribute", &def_uid_attribute_handler, NULL);
|
|
Index: multipath-tools-130222/multipath.conf.defaults
|
|
===================================================================
|
|
--- multipath-tools-130222.orig/multipath.conf.defaults
|
|
+++ multipath-tools-130222/multipath.conf.defaults
|
|
@@ -41,6 +41,7 @@
|
|
# retrigger_delay 10
|
|
# missing_uev_wait_timeout 30
|
|
# new_bindings_in_boot no
|
|
+# remove_retries 0
|
|
#}
|
|
#blacklist {
|
|
# devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
|
|
Index: multipath-tools-130222/multipath/multipath.conf.5
|
|
===================================================================
|
|
--- multipath-tools-130222.orig/multipath/multipath.conf.5
|
|
+++ multipath-tools-130222/multipath/multipath.conf.5
|
|
@@ -556,6 +556,11 @@ user_friendly_names. When multipathd is
|
|
regular filesystem, the device will be renamed to a user_friendly_name. The
|
|
default is
|
|
.I no
|
|
+.TP
|
|
+.B remove_retries
|
|
+This sets how may times multipath will retry removing a device that is in-use.
|
|
+Between each attempt, multipath will sleep 1 second. The default is
|
|
+.I 0
|
|
.
|
|
.SH "blacklist section"
|
|
The
|