From: Hannes Reinecke <hare@suse.de>
To: dm-devel@redhat.com
Subject: [PATCH 04/11] multipath: do not print 'path is up' for removed paths
Date: Fri, 13 Dec 2013 13:14:07 +0100 [thread overview]
Message-ID: <1386936854-8399-5-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1386936854-8399-1-git-send-email-hare@suse.de>
When a path is removed the previous checker message is still
kept in the checker context, and will be printed upon each
check. This causes multipath to print out
'path is up'
even though it already has been removed from sysfs.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
multipathd/main.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/multipathd/main.c b/multipathd/main.c
index 91d7bfc..2633da9 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1124,6 +1124,8 @@ check_path (struct vectors * vecs, struct path * pp)
newstate = path_offline(pp);
if (newstate == PATH_UP)
newstate = get_state(pp, 1);
+ else
+ checker_clear_message(&pp->checker);
if (newstate == PATH_WILD || newstate == PATH_UNCHECKED) {
condlog(2, "%s: unusable path", pp->dev);
@@ -1150,7 +1152,9 @@ check_path (struct vectors * vecs, struct path * pp)
if (newstate != pp->state) {
int oldstate = pp->state;
pp->state = newstate;
- LOG_MSG(1, checker_message(&pp->checker));
+
+ if (strlen(checker_message(&pp->checker)))
+ LOG_MSG(1, checker_message(&pp->checker));
/*
* upon state change, reset the checkint
@@ -1232,7 +1236,8 @@ check_path (struct vectors * vecs, struct path * pp)
pp->tick = pp->checkint;
}
}
- else if (newstate == PATH_DOWN) {
+ else if (newstate == PATH_DOWN &&
+ strlen(checker_message(&pp->checker))) {
if (conf->log_checker_err == LOG_CHKR_ERR_ONCE)
LOG_MSG(3, checker_message(&pp->checker));
else
--
1.8.1.4
next prev parent reply other threads:[~2013-12-13 12:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-13 12:14 [PATCH 00/11] SLES resync Hannes Reinecke
2013-12-13 12:14 ` [PATCH 01/11] Remove trailing spaces from sysfs attributes Hannes Reinecke
2013-12-13 22:24 ` Christophe Varoqui
2013-12-13 12:14 ` [PATCH 02/11] Document 'wwids_file' and 'reservation_key' Hannes Reinecke
2013-12-13 12:14 ` [PATCH 03/11] libmultipath: Fix typo in retain_attached_hw_handler Hannes Reinecke
2013-12-13 12:14 ` Hannes Reinecke [this message]
2013-12-13 12:14 ` [PATCH 05/11] libmultipath: proactively remove path Hannes Reinecke
2013-12-13 12:14 ` [PATCH 06/11] multipath: do not call tur in sync mode if pthread_cancel fails Hannes Reinecke
2013-12-13 12:14 ` [PATCH 07/11] multipathd: Update manpage Hannes Reinecke
2013-12-13 12:14 ` [PATCH 08/11] Reset timezone information on reconfigure Hannes Reinecke
2013-12-13 22:22 ` Christophe Varoqui
2013-12-13 12:14 ` [PATCH 09/11] multipathd: Correctly initialize udev context Hannes Reinecke
2013-12-13 12:14 ` [PATCH 10/11] multipathd: add path when transitioned from 'blocked' state Hannes Reinecke
2013-12-13 22:02 ` Christophe Varoqui
2013-12-13 12:14 ` [PATCH 11/11] Make 'multipath -t' able to run as normal user Hannes Reinecke
2013-12-13 12:17 ` [PATCH 00/11] SLES resync Hannes Reinecke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1386936854-8399-5-git-send-email-hare@suse.de \
--to=hare@suse.de \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.