1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

Clarify error messages when activation fails due to activation filter use.

This commit is contained in:
Peter Rajnoha 2010-11-05 18:18:11 +00:00
parent e40d44be8d
commit f7e3a19f75
3 changed files with 10 additions and 11 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.76 - Version 2.02.76 -
=================================== ===================================
Clarify error messages when activation fails due to activation filter use.
Add initial script VolumeGroup.ocf for pacemaker support. Add initial script VolumeGroup.ocf for pacemaker support.
Fix regex optimiser not to ignore RHS of OR nodes in _find_leftmost_common. Fix regex optimiser not to ignore RHS of OR nodes in _find_leftmost_common.
Fix handling of online filesystem resize (using new fsadm return code). Fix handling of online filesystem resize (using new fsadm return code).

View File

@ -285,12 +285,12 @@ static int _passes_activation_filter(struct cmd_context *cmd,
/* Don't activate */ /* Don't activate */
return 0; return 0;
} }
else
for (cv = cn->v; cv; cv = cv->next) {
log_verbose("activation/volume_list configuration setting " log_verbose("activation/volume_list configuration setting "
"defined, checking the list to match %s/%s", "defined, checking the list to match %s/%s",
lv->vg->name, lv->name); lv->vg->name, lv->name);
for (cv = cn->v; cv; cv = cv->next) {
if (cv->type != CFG_STRING) { if (cv->type != CFG_STRING) {
log_error("Ignoring invalid string in config file " log_error("Ignoring invalid string in config file "
"activation/volume_list"); "activation/volume_list");
@ -303,6 +303,7 @@ static int _passes_activation_filter(struct cmd_context *cmd,
continue; continue;
} }
/* Tag? */ /* Tag? */
if (*str == '@') { if (*str == '@') {
str++; str++;
@ -1239,8 +1240,8 @@ int lv_activation_filter(struct cmd_context *cmd, const char *lvid_s,
goto out; goto out;
if (!_passes_activation_filter(cmd, lv)) { if (!_passes_activation_filter(cmd, lv)) {
log_verbose("Not activating %s/%s due to config file settings", log_verbose("Not activating %s/%s since it does not pass "
lv->vg->name, lv->name); "activation filter.", lv->vg->name, lv->name);
*activate_lv = 0; *activate_lv = 0;
} else } else
*activate_lv = 1; *activate_lv = 1;
@ -1266,8 +1267,8 @@ static int _lv_activate(struct cmd_context *cmd, const char *lvid_s,
goto out; goto out;
if (filter && !_passes_activation_filter(cmd, lv)) { if (filter && !_passes_activation_filter(cmd, lv)) {
log_verbose("Not activating %s/%s due to config file settings", log_error("Not activating %s/%s since it does not pass "
lv->vg->name, lv->name); "activation filter.", lv->vg->name, lv->name);
goto out; goto out;
} }

View File

@ -3240,12 +3240,9 @@ int lv_create_single(struct volume_group *vg,
goto revert_new_lv; goto revert_new_lv;
} }
} else if (!activate_lv(cmd, lv)) { } else if (!activate_lv(cmd, lv)) {
if (lp->zero) {
log_error("Aborting. Failed to activate new LV to wipe "
"the start of it.");
goto deactivate_and_revert_new_lv;
}
log_error("Failed to activate new LV."); log_error("Failed to activate new LV.");
if (lp->zero)
goto deactivate_and_revert_new_lv;
return 0; return 0;
} }