Signed-off-by: Fabian Ebner <f.eb...@proxmox.com> --- src/PVE/API2/LXC.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index 9ecfb12..9fc7d98 100644 --- a/src/PVE/API2/LXC.pm +++ b/src/PVE/API2/LXC.pm @@ -15,6 +15,7 @@ use PVE::Firewall; use PVE::Storage; use PVE::RESTHandler; use PVE::RPCEnvironment; +use PVE::Replication; use PVE::ReplicationConfig; use PVE::LXC; use PVE::LXC::Create; @@ -694,7 +695,14 @@ __PACKAGE__->register_method({ PVE::Firewall::remove_vmfw_conf($vmid); if ($param->{purge}) { print "purging CT $vmid from related configurations..\n"; - PVE::ReplicationConfig::remove_vmid_jobs($vmid); + + my $repl_conf = PVE::ReplicationConfig->new(); + my $jobs = $repl_conf->list_local_jobs($vmid); + foreach my $job (@{$jobs}) { + eval { PVE::Replication::run_full_removal('PVE::LXC::Config', $job); }; + warn $@ if $@; + } + PVE::VZDump::Plugin::remove_vmid_from_backup_jobs($vmid); if ($ha_managed) { -- 2.20.1 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel