marsadm: better error message at failed 'invalidate'

This commit is contained in:
Thomas Schoebel-Theuer 2013-12-25 19:52:32 +01:00
parent a26198d97e
commit 7fff95b560
1 changed files with 1 additions and 0 deletions

View File

@ -1464,6 +1464,7 @@ sub invalidate_res_phase3 {
my ($cmd, $res) = @_;
my $dst = "$mars/resource-$res/syncstatus-$host";
my $primary = _get_designated_primary($res);
ldie "Cannot execute 'invalidate' because noone is designated as primary.\n" if (!$primary || $primary eq "(none)");
my $replay = get_link("$mars/resource-$res/replay-$primary");
$replay =~ m/^log-([0-9]+)-/ or ldie "replay link '$replay' is not parsable\n";
my $replay_nr = $1;