]> git.proxmox.com Git - pve-guest-common.git/commitdiff
replication: also consider storages from replication state upon removal
authorFiona Ebner <f.ebner@proxmox.com>
Mon, 13 Jun 2022 10:29:58 +0000 (12:29 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 2 Aug 2022 09:05:49 +0000 (11:05 +0200)
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>
src/PVE/Replication.pm

index d84f4693b089e440c9dd62a8c409341a45a0e63d..33fcc485b1d37a90f94f7ab8f4abf36ddb84ca70 100644 (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;