device-mapper-multipath/0188-RHBZ-1368501-dont-exit.patch
Benjamin Marzinski f9dfbb37ac device-mapper-multipath-0.4.9-86
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
2017-04-10 18:57:22 -04:00

209 lines
5.5 KiB
Diff

---
libmultipath/configure.c | 8 +++--
multipathd/main.c | 68 +++++++++++++++++++++++++++++++++++++----------
2 files changed, 59 insertions(+), 17 deletions(-)
Index: multipath-tools-130222/libmultipath/configure.c
===================================================================
--- multipath-tools-130222.orig/libmultipath/configure.c
+++ multipath-tools-130222/libmultipath/configure.c
@@ -829,8 +829,10 @@ coalesce_paths (struct vectors * vecs, v
* at this point, we know we really got a new mp
*/
mpp = add_map_with_path(vecs, pp1, 0);
- if (!mpp)
- return 1;
+ if (!mpp) {
+ orphan_path(pp1);
+ continue;
+ }
if (pp1->priority == PRIO_UNDEF)
mpp->action = ACT_REJECT;
@@ -879,7 +881,7 @@ coalesce_paths (struct vectors * vecs, v
condlog(3, "%s: domap (%u) failure "
"for create/reload map",
mpp->alias, r);
- if (r == DOMAP_FAIL) {
+ if (r == DOMAP_FAIL || conf->daemon) {
condlog(2, "%s: %s map",
mpp->alias, (mpp->action == ACT_CREATE)?
"ignoring" : "removing");
Index: multipath-tools-130222/multipathd/main.c
===================================================================
--- multipath-tools-130222.orig/multipathd/main.c
+++ multipath-tools-130222/multipathd/main.c
@@ -821,7 +821,7 @@ map_discovery (struct vectors * vecs)
vector_foreach_slot (vecs->mpvec, mpp, i)
if (setup_multipath(vecs, mpp))
- return 1;
+ i--;
return 0;
}
@@ -1523,21 +1523,29 @@ configure (struct vectors * vecs, int st
vector mpvec;
int i, ret;
- if (!vecs->pathvec && !(vecs->pathvec = vector_alloc()))
+ if (!vecs->pathvec && !(vecs->pathvec = vector_alloc())) {
+ condlog(0, "couldn't allocate path vec in configure");
return 1;
+ }
- if (!vecs->mpvec && !(vecs->mpvec = vector_alloc()))
+ if (!vecs->mpvec && !(vecs->mpvec = vector_alloc())) {
+ condlog(0, "couldn't allocate multipath vec in configure");
return 1;
+ }
- if (!(mpvec = vector_alloc()))
+ if (!(mpvec = vector_alloc())) {
+ condlog(0, "couldn't allocate new maps vec in configure");
return 1;
+ }
/*
* probe for current path (from sysfs) and map (from dm) sets
*/
ret = path_discovery(vecs->pathvec, conf, DI_ALL);
- if (ret < 0)
+ if (ret < 0) {
+ condlog(0, "configure failed at path discovery");
return 1;
+ }
vector_foreach_slot (vecs->pathvec, pp, i){
if (filter_path(conf, pp) > 0){
@@ -1548,21 +1556,27 @@ configure (struct vectors * vecs, int st
else
pp->checkint = conf->checkint;
}
- if (map_discovery(vecs))
+ if (map_discovery(vecs)) {
+ condlog(0, "configure failed at map discovery");
return 1;
+ }
/*
* create new set of maps & push changed ones into dm
*/
- if (coalesce_paths(vecs, mpvec, NULL, 1))
+ if (coalesce_paths(vecs, mpvec, NULL, 1)) {
+ condlog(0, "configure failed while coalescing paths");
return 1;
+ }
/*
* may need to remove some maps which are no longer relevant
* e.g., due to blacklist changes in conf file
*/
- if (coalesce_maps(vecs, mpvec))
+ if (coalesce_maps(vecs, mpvec)) {
+ condlog(0, "configure failed while coalescing maps");
return 1;
+ }
dm_lib_release();
@@ -1588,11 +1602,15 @@ configure (struct vectors * vecs, int st
* start dm event waiter threads for these new maps
*/
vector_foreach_slot(vecs->mpvec, mpp, i) {
- if (setup_multipath(vecs, mpp))
- return 1;
+ if (setup_multipath(vecs, mpp)) {
+ i--;
+ continue;
+ }
if (start_waiters)
- if (start_waiter_thread(mpp, vecs))
- return 1;
+ if (start_waiter_thread(mpp, vecs)) {
+ remove_map(mpp, vecs, 1);
+ i--;
+ }
}
return 0;
}
@@ -1857,15 +1875,23 @@ child (void * param)
condlog(2, "--------start up--------");
condlog(2, "read " DEFAULT_CONFIGFILE);
- if (load_config(DEFAULT_CONFIGFILE, udev))
+ if (load_config(DEFAULT_CONFIGFILE, udev)) {
+ condlog(0, "failed to load config");
+ if (logsink)
+ log_thread_stop();
exit(1);
+ }
if (init_checkers()) {
condlog(0, "failed to initialize checkers");
+ if (logsink)
+ log_thread_stop();
exit(1);
}
if (init_prio()) {
condlog(0, "failed to initialize prioritizers");
+ if (logsink)
+ log_thread_stop();
exit(1);
}
@@ -1898,8 +1924,12 @@ child (void * param)
}
vecs = gvecs = init_vecs();
- if (!vecs)
+ if (!vecs) {
+ condlog(0, "failed to create vecs");
+ if (logsink)
+ log_thread_stop();
exit(1);
+ }
setscheduler();
set_oom_adj();
@@ -1911,11 +1941,15 @@ child (void * param)
*/
if ((rc = pthread_create(&uevent_thr, &uevent_attr, ueventloop, udev))) {
condlog(0, "failed to create uevent thread: %d", rc);
+ if (logsink)
+ log_thread_stop();
exit(1);
}
pthread_attr_destroy(&uevent_attr);
if ((rc = pthread_create(&uxlsnr_thr, &misc_attr, uxlsnrloop, vecs))) {
condlog(0, "failed to create cli listener: %d", rc);
+ if (logsink)
+ log_thread_stop();
exit(1);
}
/*
@@ -1927,6 +1961,8 @@ child (void * param)
if (configure(vecs, 1)) {
unlock(vecs->lock);
condlog(0, "failure during configuration");
+ if (logsink)
+ log_thread_stop();
exit(1);
}
unlock(vecs->lock);
@@ -1936,10 +1972,14 @@ child (void * param)
*/
if ((rc = pthread_create(&check_thr, &misc_attr, checkerloop, vecs))) {
condlog(0,"failed to create checker loop thread: %d", rc);
+ if (logsink)
+ log_thread_stop();
exit(1);
}
if ((rc = pthread_create(&uevq_thr, &misc_attr, uevqloop, vecs))) {
condlog(0, "failed to create uevent dispatcher: %d", rc);
+ if (logsink)
+ log_thread_stop();
exit(1);
}
pthread_attr_destroy(&misc_attr);