mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 08:55:18 +00:00
pvesr: prepare_local_job: fixup
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
d8cd8e8cf9
commit
544bb4e2a0
@ -129,11 +129,13 @@ __PACKAGE__->register_method ({
|
|||||||
my $snapname = PVE::ReplicationState::replication_snapshot_name($jobid, $last_sync);
|
my $snapname = PVE::ReplicationState::replication_snapshot_name($jobid, $last_sync);
|
||||||
|
|
||||||
# find replication snapshots
|
# find replication snapshots
|
||||||
|
my $volids = [];
|
||||||
foreach my $storeid (@$storage_list) {
|
foreach my $storeid (@$storage_list) {
|
||||||
my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
|
my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
|
||||||
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
|
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
|
||||||
my $images = $plugin->list_images($storeid, $scfg, $vmid, undef, $cache);
|
my $images = $plugin->list_images($storeid, $scfg, $vmid, undef, $cache);
|
||||||
my $volids = [ map { $_->{volid} } @$images ];
|
push @$volids, map { $_->{volid} } @$images;
|
||||||
|
}
|
||||||
my ($last_snapshots, $cleaned_replicated_volumes) = PVE::Replication::prepare($storecfg, $volids, $jobid, $last_sync, $parent_snapname, $logfunc);
|
my ($last_snapshots, $cleaned_replicated_volumes) = PVE::Replication::prepare($storecfg, $volids, $jobid, $last_sync, $parent_snapname, $logfunc);
|
||||||
foreach my $volid (keys %$cleaned_replicated_volumes) {
|
foreach my $volid (keys %$cleaned_replicated_volumes) {
|
||||||
if (!$wanted_volids->{$volid}) {
|
if (!$wanted_volids->{$volid}) {
|
||||||
@ -142,7 +144,6 @@ __PACKAGE__->register_method ({
|
|||||||
delete $last_snapshots->{$volid};
|
delete $last_snapshots->{$volid};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
print to_json($last_snapshots) . "\n";
|
print to_json($last_snapshots) . "\n";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user