[pve-devel] [RFC guest-common 4/4] config: snapshot delete check: use volume_snapshot_info

Fabian Ebner f.ebner at proxmox.com
Tue Oct 19 09:54:56 CEST 2021


Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

To be applied if the RFC from the original series is:
https://lists.proxmox.com/pipermail/pve-devel/2021-August/049705.html

 src/PVE/AbstractConfig.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/AbstractConfig.pm b/src/PVE/AbstractConfig.pm
index 39f1cc8..e62f542 100644
--- a/src/PVE/AbstractConfig.pm
+++ b/src/PVE/AbstractConfig.pm
@@ -846,14 +846,14 @@ my $snapshot_delete_assert_not_needed_by_replication = sub {
 
 	return if !$volumes->{$volid};
 
-	my $snapshots = PVE::Storage::volume_snapshot_list($storecfg, $volid);
+	my $snapshots = PVE::Storage::volume_snapshot_info($storecfg, $volid);
 
 	for my $job ($replication_jobs->@*) {
 	    my $jobid = $job->{id};
 
 	    my @jobs_snapshots = grep {
 		PVE::Replication::is_replication_snapshot($_, $jobid)
-	    } $snapshots->@*;
+	    } keys $snapshots->%*;
 
 	    next if scalar(@jobs_snapshots) > 0;
 
-- 
2.30.2






More information about the pve-devel mailing list