[lxc-devel] [lxd/master] lxd/storage/zfs: Fix argument ordering

stgraber on Github lxc-bot at linuxcontainers.org
Tue Feb 4 18:58:42 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 445 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200204/9ba8fa4f/attachment.bin>
-------------- next part --------------
From a5f9e9c68656df5aa136e31c53c4473d4eb9eab2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 4 Feb 2020 13:57:52 -0500
Subject: [PATCH] lxd/storage/zfs: Fix argument ordering
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Some ZFS versions are a bit picky about this.

Suggested-by: atersurs

Closes #6830

Signed-off-by: St├ęphane Graber <stgraber at ubuntu.com>
---
 lxd/storage/drivers/driver_zfs_utils.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lxd/storage/drivers/driver_zfs_utils.go b/lxd/storage/drivers/driver_zfs_utils.go
index f0c1624a56..083f3234c3 100644
--- a/lxd/storage/drivers/driver_zfs_utils.go
+++ b/lxd/storage/drivers/driver_zfs_utils.go
@@ -82,7 +82,7 @@ func (d *zfs) checkDataset(dataset string) bool {
 }
 
 func (d *zfs) getClones(dataset string) ([]string, error) {
-	out, err := shared.RunCommand("zfs", "get", "-H", "-p", "-o", "value", "-r", "clones", dataset)
+	out, err := shared.RunCommand("zfs", "get", "-H", "-p", "-r", "-o", "value", "clones", dataset)
 	if err != nil {
 		return nil, err
 	}
@@ -102,7 +102,7 @@ func (d *zfs) getClones(dataset string) ([]string, error) {
 }
 
 func (d *zfs) getDatasets(dataset string) ([]string, error) {
-	out, err := shared.RunCommand("zfs", "get", "name", "-o", "name", "-H", "-r", dataset)
+	out, err := shared.RunCommand("zfs", "get", "-H", "-r", "-o", "name", "name", dataset)
 	if err != nil {
 		return nil, err
 	}


More information about the lxc-devel mailing list