From 729b104413e11412866a549ef8a6702f56c4acd1 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Wed, 27 Nov 2013 08:20:02 +0100 Subject: [PATCH] activation: continue with autoactivation if refresh fails If the refresh fails for any reason before autoactivation, let's not make this a stopper for autoactivation itself - just log the error message if it appears. The reason is that in some rare situations, we can still hit the problem with the suspend call to fail (as already described in commit d8085edf65006a50608edb821b3d30947abaa838, also https://bugzilla.redhat.com/show_bug.cgi?id=1027314). The refresh itself is done for only one reason - to refresh any dm tables for LVs for which the underlying PVs got unplugged/disconnected and then plugged/connected back (see also https://bugzilla.redhat.com/show_bug.cgi?id=954061 for more info). In this case, the major:minor pair is changed and we need to update dm tables for LVs accordingly. Now if refresh fails, the error is still logged, but autoactivation continues. --- tools/pvscan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/pvscan.c b/tools/pvscan.c index ce8c446e6..981a9c2b2 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -147,10 +147,8 @@ static int _auto_activation_handler(struct cmd_context *cmd, usleep(REFRESH_BEFORE_AUTOACTIVATION_RETRY_USLEEP_DELAY); } - if (!refresh_done) { + if (!refresh_done) log_error("%s: refresh before autoactivation failed.", vg->name); - goto out; - } if (!vgchange_activate(vg->cmd, vg, activate)) { log_error("%s: autoactivation failed.", vg->name);