5
0
mirror of git://git.proxmox.com/git/pve-guest-common.git synced 2024-12-22 13:34:00 +03:00

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 <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner 2022-06-13 12:29:58 +02:00 committed by Fabian Grünbichler
parent 4c1bd50289
commit 1e6416f172

View File

@ -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;