]> git.proxmox.com Git - qemu-server.git/commitdiff
make startall wait up to 10 seconds for quorum
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 20 Mar 2012 08:33:41 +0000 (09:33 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 20 Mar 2012 08:33:41 +0000 (09:33 +0100)
Makefile
changelog.Debian
qm

index e784d23f66d57899583a9fbc048518ef8e145f92..ce377af1c4b76db0c62e64d97f2578281b44fe5b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ RELEASE=2.0
 
 VERSION=2.0
 PACKAGE=qemu-server
-PKGREL=26
+PKGREL=27
 
 DESTDIR=
 PREFIX=/usr
index cebaba17e53a44235bb533ef7c92e6927536fcc5..2d4e6602f953a55003beffe0266902869a537350 100644 (file)
@@ -1,3 +1,9 @@
+qemu-server (2.0-27) unstable; urgency=low
+
+  * make startall wait up to 10 seconds for quorum
+
+ -- Proxmox Support Team <support@proxmox.com>  Tue, 20 Mar 2012 09:32:53 +0100
+
 qemu-server (2.0-26) unstable; urgency=low
 
   * fix bug 109: use scsi inquiry to test if we can use the scsi-block
diff --git a/qm b/qm
index a1c30b66263c0805ea0cb13015e53687ae6cae9b..b299078f3741c68ab2ba0d63c28d2ba03cb4a110 100755 (executable)
--- a/qm
+++ b/qm
@@ -235,11 +235,15 @@ __PACKAGE__->register_method ({
     code => sub {
        my ($param) = @_;
 
+       # wait up to 10 seconds for quorum
+       for (my $i = 10; $i >= 0; $i--) {
+           last if PVE::Cluster::check_cfs_quorum($i != 0 ? 1 : 0);
+           sleep(1);
+       }
+
        my $vzlist = PVE::QemuServer::vzlist();
        my $storecfg = PVE::Storage::config();
 
-       PVE::Cluster::check_cfs_quorum();
-
        my $count = 0;
        foreach my $vmid (keys %$vzlist) {
            next if $vzlist->{$vmid}->{pid}; # already running