1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

polldaemon.c: do not report error when LV not found

currently in wait_for_single_lv() fn trying to poll missing pvmove LV
is considered success. It may have been already finished by another
instance of polldaemon. either by another forked off polldaemon
or by lvmpolld.

Let's try to handle the mirror conversion and snapshot merge the same
way.
This commit is contained in:
Ondrej Kozina 2015-05-19 17:04:29 +02:00
parent cf5b4a2286
commit e6b5eb88f2

View File

@ -160,20 +160,18 @@ int wait_for_single_lv(struct cmd_context *cmd, struct poll_operation_id *id,
if (lv && parms->lv_type && !(lv->status & parms->lv_type))
lv = NULL;
if (!lv && parms->lv_type == PVMOVE) {
log_print_unless_silent("%s: No pvmove in progress - already finished or aborted.",
id->display_name);
if (!lv) {
if (parms->lv_type == PVMOVE)
log_print_unless_silent("%s: No pvmove in progress - already finished or aborted.",
id->display_name);
else
log_print_unless_silent("Can't find LV in %s for %s.",
vg->name, id->display_name);
unlock_and_release_vg(cmd, vg, vg->name);
return 1;
}
if (!lv) {
log_error("ABORTING: Can't find LV in %s for %s.",
vg->name, id->display_name);
unlock_and_release_vg(cmd, vg, vg->name);
return 0;
}
/*
* If the LV is not active locally, the kernel cannot be
* queried for its status. We must exit in this case.