mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-05 20:40:21 +00:00
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:
parent
04b2004b36
commit
3625a09137
@ -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};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user