Signed-off-by: Fabian Grünbichler <[email protected]>
---
 PVE/Storage/ZFSPoolPlugin.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm
index 10354b3..6fa9127 100644
--- a/PVE/Storage/ZFSPoolPlugin.pm
+++ b/PVE/Storage/ZFSPoolPlugin.pm
@@ -472,6 +472,10 @@ sub volume_rollback_is_possible {
     my ($class, $scfg, $storeid, $volname, $snap) = @_;
 
     my $recentsnap = $class->zfs_get_latest_snapshot($scfg, $volname);
+
+    die "can't rollback, no snapshots exist at all\n"
+       if !defined($recentsnap);
+
     if ($snap ne $recentsnap) {
        die "can't rollback, more recent snapshots exist\n";
     }
-- 
2.20.1



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to