mirror of
git://git.proxmox.com/git/pve-guest-common.git
synced 2025-01-06 13:17:48 +03:00
replication: avoid passing removed storages to target
After removing a storage, replication states can still contain references to it, even if no volume references it anymore. If a storage does not exist in the storage configuration, the replication target runs into an error when preparing the job locally. This error prevents both running and removing the replication job. Fix it by not passing the invalid storage ID in the first place. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
8a81208e4d
commit
018565379e
@ -275,6 +275,9 @@ sub replicate {
|
||||
$logfunc->("guest => $guest_name, running => $running");
|
||||
$logfunc->("volumes => " . join(',', @$sorted_volids));
|
||||
|
||||
# filter out left-over non-existing/removed storages - avoids error on target
|
||||
$state->{storeid_list} = [ grep { $storecfg->{ids}->{$_} } $state->{storeid_list}->@* ];
|
||||
|
||||
if (my $remove_job = $jobcfg->{remove_job}) {
|
||||
|
||||
$logfunc->("start job removal - mode '${remove_job}'");
|
||||
|
Loading…
Reference in New Issue
Block a user