This covers the case where users want to delete a CT that is also a HA resource. If the purge param is set, the HA resource will also be removed from the affinity rules referencing the resource. If the affected rule only contains this one resource, the rule is also deleted.
Signed-off-by: Michael Köppl <[email protected]> --- src/PVE/API2/LXC.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index 37b9d055..dc0ba5b2 100644 --- a/src/PVE/API2/LXC.pm +++ b/src/PVE/API2/LXC.pm @@ -879,7 +879,7 @@ __PACKAGE__->register_method({ PVE::VZDump::Plugin::remove_vmid_from_backup_jobs($vmid); if ($ha_managed) { - PVE::HA::Config::delete_service_from_config("ct:$vmid"); + PVE::HA::Config::delete_service_from_config("ct:$vmid", $param->{purge}); print "NOTE: removed CT $vmid from HA resource configuration.\n"; } } -- 2.47.3 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
