From abc8f66328e4d75542d49969b73736419c2cf960 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Thu, 2 Jul 2009 14:53:53 +0200 Subject: [PATCH] Always synchronize with dm state When running on iSCSI the connection might suffer intermediate errors, causing the path to fail. But by the time the path checker runs these errors will be cleared by the iSCSI internal connection recovery, which means the daemon will never see any error and not reinstated any failed paths. References: bnc#447887 Signed-off-by: Hannes Reinecke --- multipathd/main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c index dd779d0..7659bb2 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -1028,6 +1028,14 @@ check_path (struct vectors * vecs, struct path * pp) pp->tick = 1; return; } + /* + * Synchronize with kernel state + */ + if (update_multipath_strings(pp->mpp, vecs->pathvec)) { + condlog(1, "%s: Could not synchronize with kernel state\n", + pp->dev); + pp->dmstate = PSTATE_UNDEF; + } if (newstate != pp->state) { int oldstate = pp->state; pp->state = newstate; @@ -1039,8 +1047,7 @@ check_path (struct vectors * vecs, struct path * pp) */ pp->checkint = conf->checkint; - if (newstate == PATH_DOWN || newstate == PATH_SHAKY || - update_multipath_strings(pp->mpp, vecs->pathvec)) { + if (newstate == PATH_DOWN || newstate == PATH_SHAKY) { /* * proactively fail path in the DM */ -- 2.7.4