If a VM config was stolen or migrated through HA there is no state on that node.
It must be possible to cleanup the remote-side without state.
---
 PVE/Replication.pm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/PVE/Replication.pm b/PVE/Replication.pm
index c25ed44..ce2109e 100644
--- a/PVE/Replication.pm
+++ b/PVE/Replication.pm
@@ -200,8 +200,14 @@ sub replicate {
 
        if ($remove_job eq 'full' && $jobcfg->{target} ne $local_node) {
            # remove all remote volumes
+           my $store_list = [];
+           foreach my $volid (@$sorted_volids) {
+               my ($storeid) = PVE::Storage::parse_volume_id($volid);
+               push @$store_list, $storeid;
+           }
+
            my $ssh_info = PVE::Cluster::get_ssh_info($jobcfg->{target});
-           remote_prepare_local_job($ssh_info, $jobid, $vmid, [], 
$state->{storeid_list}, 0, undef, 1, $logfunc);
+           remote_prepare_local_job($ssh_info, $jobid, $vmid, [], $store_list, 
0, undef, 1, $logfunc);
 
        }
        # remove all local replication snapshots (lastsync => 0)
-- 
2.11.0


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to