device-mapper-multipath/0187-rbd-fixup-log-messages.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

239 lines
7.5 KiB
Diff

From 3ed9a923904887e41c774c71232ae2a1ff6fc3fb Mon Sep 17 00:00:00 2001
From: Mike Christie <mchristi@redhat.com>
Date: Wed, 31 Aug 2016 15:59:53 -0500
Subject: [PATCH 11/11] rbd: fixup log messages
Add rbd device prefix to condlog messages that was missing it, and drop
it in RBD_MSG because it is already added by caller.
Signed-off-by: Mike Christie <mchristi@redhat.com>
---
libmultipath/checkers/rbd.c | 67 +++++++++++++++++++++++----------------------
1 file changed, 35 insertions(+), 32 deletions(-)
diff --git a/libmultipath/checkers/rbd.c b/libmultipath/checkers/rbd.c
index e34bf53..8e6cd3c 100644
--- a/libmultipath/checkers/rbd.c
+++ b/libmultipath/checkers/rbd.c
@@ -113,8 +113,8 @@ int libcheck_init(struct checker * c)
addr = udev_device_get_sysattr_value(bus_dev, "client_addr");
if (!addr) {
- condlog(0, "Could not find client_addr in rbd sysfs. Try "
- "updating kernel");
+ condlog(0, "rbd%d: Could not find client_addr in rbd sysfs. "
+ "Try updating kernel", ct->rbd_bus_id);
goto free_dev;
}
@@ -127,7 +127,7 @@ int libcheck_init(struct checker * c)
goto free_addr;
features = strtoll(features_str, NULL, 16);
if (!(features & RBD_FEATURE_EXCLUSIVE_LOCK)) {
- condlog(3, "Exclusive lock not set.");
+ condlog(3, "rbd%d: Exclusive lock not set.", ct->rbd_bus_id);
goto free_addr;
}
@@ -136,7 +136,8 @@ int libcheck_init(struct checker * c)
goto free_addr;
if (!strstr(config_info, "noshare")) {
- condlog(3, "Only nonshared clients supported.");
+ condlog(3, "rbd%d: Only nonshared clients supported.",
+ ct->rbd_bus_id);
goto free_addr;
}
@@ -189,18 +190,20 @@ int libcheck_init(struct checker * c)
}
if (rados_create(&ct->cluster, NULL) < 0) {
- condlog(0, "Could not create rados cluster");
+ condlog(0, "rbd%d: Could not create rados cluster",
+ ct->rbd_bus_id);
goto free_snap;
}
if (rados_conf_read_file(ct->cluster, NULL) < 0) {
- condlog(0, "Could not read rados conf");
+ condlog(0, "rbd%d: Could not read rados conf", ct->rbd_bus_id);
goto shutdown_rados;
}
ret = rados_connect(ct->cluster);
if (ret < 0) {
- condlog(0, "Could not connect to rados cluster");
+ condlog(0, "rbd%d: Could not connect to rados cluster",
+ ct->rbd_bus_id);
goto shutdown_rados;
}
@@ -291,8 +294,7 @@ static int rbd_is_blacklisted(struct rbd_checker_context *ct, char *msg)
ret = rados_mon_command(ct->cluster, (const char **)cmd, 1, "", 0,
&blklist, &blklist_len, &stat, &stat_len);
if (ret < 0) {
- RBD_MSG(msg, "rbd checker failed: mon command failed %d",
- ret);
+ RBD_MSG(msg, "checker failed: mon command failed %d", ret);
return ret;
}
@@ -313,16 +315,15 @@ static int rbd_is_blacklisted(struct rbd_checker_context *ct, char *msg)
end = strchr(addr_tok, ' ');
if (!end) {
- RBD_MSG(msg, "rbd%d checker failed: invalid blacklist %s",
- ct->rbd_bus_id, addr_tok);
+ RBD_MSG(msg, "checker failed: invalid blacklist %s",
+ addr_tok);
break;
}
*end = '\0';
if (!strcmp(addr_tok, ct->client_addr)) {
ct->blacklisted = 1;
- RBD_MSG(msg, "rbd%d checker: %s is blacklisted",
- ct->rbd_bus_id, ct->client_addr);
+ RBD_MSG(msg, "%s is blacklisted", ct->client_addr);
ret = 1;
break;
}
@@ -339,7 +340,7 @@ int rbd_check(struct rbd_checker_context *ct, char *msg)
if (ct->blacklisted || rbd_is_blacklisted(ct, msg) == 1)
return PATH_DOWN;
- RBD_MSG(msg, "rbd checker reports path is up");
+ RBD_MSG(msg, "checker reports path is up");
/*
* Path may have issues, but the ceph cluster is at least
* accepting IO, so we can attempt to do IO.
@@ -411,10 +412,12 @@ static int rbd_remap(struct rbd_checker_context *ct)
argv[i] = NULL;
ret = execvp(argv[0], argv);
- condlog(0, "Error executing rbd: %s", strerror(errno));
+ condlog(0, "rbd%d: Error executing rbd: %s", ct->rbd_bus_id,
+ strerror(errno));
exit(-1);
case -1:
- condlog(0, "fork failed: %s", strerror(errno));
+ condlog(0, "rbd%d: fork failed: %s", ct->rbd_bus_id,
+ strerror(errno));
return -1;
default:
ret = -1;
@@ -424,7 +427,8 @@ static int rbd_remap(struct rbd_checker_context *ct)
if (status == 0)
ret = 0;
else
- condlog(0, "rbd failed with %d", status);
+ condlog(0, "rbd%d: failed with %d",
+ ct->rbd_bus_id, status);
}
}
@@ -454,12 +458,12 @@ static int rbd_rm_blacklist(struct rbd_checker_context *ct)
ret = rados_mon_command(ct->cluster, (const char **)cmd, 1, "", 0,
NULL, 0, &stat, &stat_len);
if (ret < 0) {
- condlog(1, "rbd%d repair failed to remove blacklist for %s %d",
+ condlog(1, "rbd%d: repair failed to remove blacklist for %s %d",
ct->rbd_bus_id, ct->client_addr, ret);
goto free_cmd;
}
- condlog(1, "rbd%d repair rm blacklist for %s",
+ condlog(1, "rbd%d: repair rm blacklist for %s",
ct->rbd_bus_id, ct->client_addr);
free(stat);
free_cmd:
@@ -478,8 +482,7 @@ static int rbd_repair(struct rbd_checker_context *ct, char *msg)
if (!ct->remapped) {
ret = rbd_remap(ct);
if (ret) {
- RBD_MSG(msg, "rbd%d repair failed to remap. Err %d",
- ct->rbd_bus_id, ret);
+ RBD_MSG(msg, "repair failed to remap. Err %d", ret);
return PATH_DOWN;
}
}
@@ -488,22 +491,21 @@ static int rbd_repair(struct rbd_checker_context *ct, char *msg)
snprintf(del, sizeof(del), "%d force", ct->rbd_bus_id);
ret = sysfs_write_rbd_remove(del, strlen(del) + 1);
if (ret) {
- RBD_MSG(msg, "rbd%d repair failed to clean up. Err %d",
- ct->rbd_bus_id, ret);
+ RBD_MSG(msg, "repair failed to clean up. Err %d", ret);
return PATH_DOWN;
}
ret = rbd_rm_blacklist(ct);
if (ret) {
- RBD_MSG(msg, "rbd%d repair could not remove blacklist entry. Err %d",
- ct->rbd_bus_id, ret);
+ RBD_MSG(msg, "repair could not remove blacklist entry. Err %d",
+ ret);
return PATH_DOWN;
}
ct->remapped = 0;
ct->blacklisted = 0;
- RBD_MSG(msg, "rbd%d has been repaired", ct->rbd_bus_id);
+ RBD_MSG(msg, "has been repaired");
return PATH_UP;
}
@@ -528,7 +530,7 @@ void *rbd_thread(void *ctx)
struct rbd_checker_context *ct = ctx;
int state;
- condlog(3, "rbd%d thread starting up", ct->rbd_bus_id);
+ condlog(3, "rbd%d: thread starting up", ct->rbd_bus_id);
ct->message[0] = '\0';
/* This thread can be canceled, so setup clean up */
@@ -547,7 +549,7 @@ void *rbd_thread(void *ctx)
pthread_mutex_unlock(&ct->lock);
pthread_cond_signal(&ct->active);
- condlog(3, "rbd%d thead finished, state %s", ct->rbd_bus_id,
+ condlog(3, "rbd%d: thead finished, state %s", ct->rbd_bus_id,
checker_state_name(state));
rbd_thread_cleanup_pop(ct);
return ((void *)0);
@@ -577,16 +579,17 @@ static int rbd_exec_fn(struct checker *c, thread_fn *fn)
*/
r = pthread_mutex_lock(&ct->lock);
if (r != 0) {
- condlog(2, "rbd%d mutex lock failed with %d", ct->rbd_bus_id,
+ condlog(2, "rbd%d: mutex lock failed with %d", ct->rbd_bus_id,
r);
- MSG(c, "rbd%d thread failed to initialize", ct->rbd_bus_id);
+ MSG(c, "rbd%d: thread failed to initialize", ct->rbd_bus_id);
return PATH_WILD;
}
if (ct->running) {
/* Check if checker is still running */
if (ct->thread) {
- condlog(3, "rbd%d thread not finished", ct->rbd_bus_id);
+ condlog(3, "rbd%d: thread not finished",
+ ct->rbd_bus_id);
rbd_status = PATH_PENDING;
} else {
/* checker done */
@@ -623,7 +626,7 @@ static int rbd_exec_fn(struct checker *c, thread_fn *fn)
if (ct->thread &&
(rbd_status == PATH_PENDING || rbd_status == PATH_UNCHECKED)) {
- condlog(3, "rbd%d thread still running",
+ condlog(3, "rbd%d: thread still running",
ct->rbd_bus_id);
ct->running = 1;
rbd_status = PATH_PENDING;
--
1.8.3.1