[pve-devel] [PATCH v2 guest-common 3/4] replication: also consider storages from replication state upon removal

Fabian Ebner f.ebner at proxmox.com
Mon Jun 13 12:29:58 CEST 2022


This prevents left-over volume(s) in the following situation:
1. replication with volumes on different storages A and B
2. remove all volumes on storage B from the guest configuration
3. schedule full removal before the next normal replication runs

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

No changes from v1.

 src/PVE/Replication.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/PVE/Replication.pm b/src/PVE/Replication.pm
index d84f469..33fcc48 100644
--- a/src/PVE/Replication.pm
+++ b/src/PVE/Replication.pm
@@ -270,6 +270,7 @@ sub replicate {
 	if ($remove_job eq 'full' && $jobcfg->{target} ne $local_node) {
 	    # remove all remote volumes
 	    my @store_list = map { (PVE::Storage::parse_volume_id($_))[0] } @$sorted_volids;
+	    push @store_list, @{$state->{storeid_list}};
 
 	    my %hash = map { $_ => 1 } @store_list;
 
-- 
2.30.2





More information about the pve-devel mailing list