The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7317

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
"zfs unmount" annoyingly wraps errors so just use our own TryUnmount
instead so we can deal with things taking a bit long to unmount.

Closes #7296

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 7de16487fb69bd3c4895a76627e2302829433151 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Wed, 6 May 2020 14:50:41 -0400
Subject: [PATCH] lxd/storage/zfs: Use TryUnmount
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

"zfs unmount" annoyingly wraps errors so just use our own TryUnmount
instead so we can deal with things taking a bit long to unmount.

Closes #7296

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxd/storage/drivers/driver_zfs_volumes.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/storage/drivers/driver_zfs_volumes.go 
b/lxd/storage/drivers/driver_zfs_volumes.go
index b9f88d13d8..4bc5c6655b 100644
--- a/lxd/storage/drivers/driver_zfs_volumes.go
+++ b/lxd/storage/drivers/driver_zfs_volumes.go
@@ -1109,7 +1109,7 @@ func (d *zfs) UnmountVolume(vol Volume, op 
*operations.Operation) (bool, error)
        // Check if still mounted.
        if shared.IsMountPoint(mountPath) {
                // Unmount the dataset.
-               _, err := shared.RunCommand("zfs", "unmount", dataset)
+               err := TryUnmount(mountPath, 0)
                if err != nil {
                        return false, err
                }
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to