From 1e6416f1725c691cd2a37dd5f86d901fbcf4a0b0 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Mon, 13 Jun 2022 12:29:58 +0200 Subject: [PATCH] replication: also consider storages from replication state upon removal 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: Fiona Ebner --- 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;