From 86a06005c6b4a3dc2933f1aa161b3bedbf7dc5d9 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Wed, 20 Nov 2019 08:08:11 +0100 Subject: [PATCH] marsadm: convert wait_cluster to new timeout method --- userspace/marsadm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/userspace/marsadm b/userspace/marsadm index 1b9c1d58..5dabecc6 100755 --- a/userspace/marsadm +++ b/userspace/marsadm @@ -1086,13 +1086,13 @@ sub wait_cluster { my $hosts = shift || "*"; my $abort = shift; $abort = $force unless defined($abort); - my $old_timeout = $timeout; + $timeout_val = undef; finish_links(); my $start_time = mars_time(); my %old_status = get_alive_links($res, "time", $hosts); _trigger($hosts =~ m/\*/ ? 3 : 2); lprint "Ping and wait for answers from " . join(",", sort(keys(%old_status))) . "\n" if %old_status; - my $delta = $timeout > 0 ? $timeout : 30; + my $delta = $window > 0 ? $window / 2 : 30; while (1) { my $dead_count = 0; my $alive_count = 0; @@ -1121,7 +1121,6 @@ sub wait_cluster { sleep_timeout(); last if $timeout_val <= 0 && !$unknown_count; } - $timeout = $old_timeout; } sub wait_cluster_noforce {