[pve-devel] [PATCH container 1/1] fix #6613: pass purge param to delete_service_from_config
Michael Köppl
m.koeppl at proxmox.com
Wed Sep 17 13:53:13 CEST 2025
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 <m.koeppl at proxmox.com>
---
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
More information about the pve-devel
mailing list