The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6526
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) === Closes #6523 Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 6a94f9138562102626680363fcc000c4b702e2d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Thu, 28 Nov 2019 12:43:57 -0500 Subject: [PATCH] lxd/storage/zfs: Fix pool import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #6523 Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/storage_zfs.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lxd/storage_zfs.go b/lxd/storage_zfs.go index 1692a3be23..05f5ebadce 100644 --- a/lxd/storage_zfs.go +++ b/lxd/storage_zfs.go @@ -118,16 +118,15 @@ func (s *storageZfs) StoragePoolCheck() error { logger.Debugf("ZFS storage pool \"%s\" does not exist, trying to import it", poolName) var err error - var msg string if filepath.IsAbs(source) { disksPath := shared.VarPath("disks") - msg, err = shared.RunCommand("zpool", "import", "-d", disksPath, poolName) + _, err = shared.RunCommand("zpool", "import", "-f", "-d", disksPath, poolName) } else { - msg, err = shared.RunCommand("zpool", "import", purePoolName) + _, err = shared.RunCommand("zpool", "import", purePoolName) } if err != nil { - return fmt.Errorf("ZFS storage pool \"%s\" could not be imported: %s", poolName, msg) + return fmt.Errorf("ZFS storage pool \"%s\" could not be imported: %s", poolName, err) } logger.Debugf("ZFS storage pool \"%s\" successfully imported", poolName)
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel