[lxc-devel] [lxd/master] zfs: Don't fail on missing image snapshot

stgraber on Github lxc-bot at linuxcontainers.org
Tue Feb 20 06:47:58 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 370 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180220/7efaf10d/attachment.bin>
-------------- next part --------------
From 31b98d61feca19097c1738caad059d6d8eb8e819 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 20 Feb 2018 01:47:18 -0500
Subject: [PATCH] zfs: Don't fail on missing image snapshot
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Closes #4188

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxd/storage_zfs.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/storage_zfs.go b/lxd/storage_zfs.go
index 30a616b93..b0bfb1e2b 100644
--- a/lxd/storage_zfs.go
+++ b/lxd/storage_zfs.go
@@ -1948,7 +1948,7 @@ func (s *storageZfs) ImageDelete(fingerprint string) error {
 
 	if zfsFilesystemEntityExists(poolName, fs) {
 		removable, err := zfsPoolVolumeSnapshotRemovable(poolName, fs, "readonly")
-		if err != nil {
+		if err != nil && zfsFilesystemEntityExists(poolName, fmt.Sprintf("%s at readonly", fs)) {
 			return err
 		}
 


More information about the lxc-devel mailing list