[pve-devel] [PATCH] Fix Bug_664

Wolfgang Link w.link at proxmox.com
Thu Jul 23 13:22:27 CEST 2015


Catch the error, if the dataset doesn't exists.
If it will not catched, you can't remove a VM.
---
 PVE/Storage/ZFSPoolPlugin.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm
index 6b095f1..d3bb0fd 100644
--- a/PVE/Storage/ZFSPoolPlugin.pm
+++ b/PVE/Storage/ZFSPoolPlugin.pm
@@ -338,6 +338,9 @@ sub zfs_delete_zvol {
 	if ($err = $@) {
 	    if ($err =~ m/^zfs error:(.*): dataset is busy.*/) {
 		sleep(1);
+	    } elsif ($err =~ m/^zfs error:.*: dataset does not exist.*$/) {
+		$err = undef;
+		last;
 	    } else {
 		die $err;
 	    }
-- 
2.1.4





More information about the pve-devel mailing list