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 VERSION=2.0
PACKAGE=qemu-server PACKAGE=qemu-server
PKGREL=26 PKGREL=27
DESTDIR= DESTDIR=
PREFIX=/usr 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 qemu-server (2.0-26) unstable; urgency=low
* fix bug 109: use scsi inquiry to test if we can use the scsi-block * 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 { code => sub {
my ($param) = @_; 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 $vzlist = PVE::QemuServer::vzlist();
my $storecfg = PVE::Storage::config(); my $storecfg = PVE::Storage::config();
PVE::Cluster::check_cfs_quorum();
my $count = 0; my $count = 0;
foreach my $vmid (keys %$vzlist) { foreach my $vmid (keys %$vzlist) {
next if $vzlist->{$vmid}->{pid}; # already running next if $vzlist->{$vmid}->{pid}; # already running