Fix check if vm is ha managed in get_start_stop_list

The check used was completely wrong and so the startall and stopall
API calls touched HA managed service, which they shouldn't.

Using the vm_is_ha_managed call from the HA stack fixes that.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2015-10-19 18:02:47 +02:00 committed by Dietmar Maurer
parent 04b2004b36
commit 3625a09137

View File

@ -1132,7 +1132,6 @@ __PACKAGE__->register_method({
my $get_start_stop_list = sub {
my ($nodename, $autostart) = @_;
my $haconf = PVE::HA::Config::read_resources_config();
my $vmlist = PVE::Cluster::get_vmlist();
my $resList = {};
@ -1164,8 +1163,8 @@ my $get_start_stop_list = sub {
}
# skip ha managed VMs (started by pve-ha-manager)
return if defined($haconf->{ids}->{"pvevm:$vmid"});
return if PVE::HA::Config::vm_is_ha_managed($vmid);
$resList->{$startup->{order}}->{$vmid} = $startup;
$resList->{$startup->{order}}->{$vmid}->{type} = $d->{type};
};