Commit b4db785f authored by Thomas Lamprecht's avatar Thomas Lamprecht Committed by Dietmar Maurer

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: 's avatarThomas Lamprecht <t.lamprecht@proxmox.com>
parent fe72e04f
......@@ -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};
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment