From 3947d0a06991886daffba1a7961fb5667d89632e Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 9 Sep 2016 10:31:21 +0200 Subject: [PATCH] startall: remove timeout, wait forever --- PVE/API2/Nodes.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm index 1b9b971f..457263a0 100644 --- a/PVE/API2/Nodes.pm +++ b/PVE/API2/Nodes.pm @@ -1291,10 +1291,12 @@ __PACKAGE__->register_method ({ $rpcenv->{type} = 'priv'; # to start tasks in background - # wait up to 60 seconds for quorum - for (my $i = 60; $i >= 0; $i--) { - last if PVE::Cluster::check_cfs_quorum($i != 0 ? 1 : 0); - sleep(1); + if (!PVE::Cluster::check_cfs_quorum(1)) { + print "waiting for quorum ...\n"; + do { + sleep(1); + } while (!PVE::Cluster::check_cfs_quorum(1)); + print "got quorum\n"; } my $autostart = $force ? undef : 1; my $startList = &$get_start_stop_list($nodename, $autostart);