5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-11 05:17:57 +03:00

make startall wait up to 10 seconds for quorum

This commit is contained in:
Dietmar Maurer 2012-03-20 09:33:41 +01:00
parent 3c720aeac6
commit ed3ffe31d4
3 changed files with 13 additions and 3 deletions

View File

@ -2,7 +2,7 @@ RELEASE=2.0
VERSION=2.0
PACKAGE=qemu-server
PKGREL=26
PKGREL=27
DESTDIR=
PREFIX=/usr

View 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

8
qm
View File

@ -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