[pve-devel] [RFC pve-storage 3/7] Make volume_snapshot_delete on remote nodes.

Wolfgang Link w.link at proxmox.com
Wed Apr 12 12:41:22 CEST 2017


This function we need for replica to handle snapshots on remote nodes.
---
 PVE/Storage.pm        | 4 ++--
 PVE/Storage/Plugin.pm | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/PVE/Storage.pm b/PVE/Storage.pm
index 6f296e5..778ec4d 100755
--- a/PVE/Storage.pm
+++ b/PVE/Storage.pm
@@ -251,13 +251,13 @@ sub volume_snapshot_rollback {
 }
 
 sub volume_snapshot_delete {
-    my ($cfg, $volid, $snap, $running) = @_;
+    my ($cfg, $volid, $snap, $running, $ip) = @_;
 
     my ($storeid, $volname) = parse_volume_id($volid, 1);
     if ($storeid) {
         my $scfg = storage_config($cfg, $storeid);
         my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
-        return $plugin->volume_snapshot_delete($scfg, $storeid, $volname, $snap, $running);
+        return $plugin->volume_snapshot_delete($scfg, $storeid, $volname, $snap, $running, $ip);
     } elsif ($volid =~ m|^(/.+)$| && -e $volid) {
         die "snapshot delete file/device '$volid' is not possible\n";
     } else {
diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm
index 641ab04..880ba4a 100644
--- a/PVE/Storage/Plugin.pm
+++ b/PVE/Storage/Plugin.pm
@@ -726,7 +726,7 @@ sub volume_snapshot_rollback {
 }
 
 sub volume_snapshot_delete {
-    my ($class, $scfg, $storeid, $volname, $snap, $running) = @_;
+    my ($class, $scfg, $storeid, $volname, $snap, $running, $ip) = @_;
 
     die "can't delete snapshot for this image format\n" if $volname !~ m/\.(qcow2|qed)$/;
 
-- 
2.1.4





More information about the pve-devel mailing list