marsadm: skip unnecessary wait-cluster restart

This commit is contained in:
Thomas Schoebel-Theuer 2020-10-20 11:04:47 +02:00 committed by Thomas Schoebel-Theuer
parent 2cb3520e01
commit 72cbf7b8be
1 changed files with 2 additions and 1 deletions

View File

@ -1989,6 +1989,7 @@ sub wait_cluster {
$timeout_val = undef;
finish_links();
my $max_restarts = 3;
my $max_resets = 1;
restart:
lprint "Ping $hosts\n";
_trigger($trigger_code);
@ -2053,7 +2054,7 @@ sub wait_cluster {
if ($unknown_count) {
_trigger($trigger_code);
# ensure more progress will happen
%old_status = %status;
%old_status = %status if !$max_resets++;
} else {
if (!$dead_count) {
lprint "$alive_count/$total_count peer(s) seem to be alive\n";