[pve-devel] [PATCH guest-common 2/4] also consider storages from replication state on full removal

Fabian Ebner f.ebner at proxmox.com
Thu Oct 1 13:15:33 CEST 2020


This prevents left-over volumes in the following situation:
1. previous replication with volumes from different storages A and B exists
2. remove all volumes from storage B from the guest configuration
3. schedule full removal before the next normal replication
4. replication target still has the volumes on B

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/Replication.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/Replication.pm b/PVE/Replication.pm
index ae0f145..15845bb 100644
--- a/PVE/Replication.pm
+++ b/PVE/Replication.pm
@@ -245,6 +245,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.20.1





More information about the pve-devel mailing list