[lxc-devel] [lxd/master] lxc/init: Properly handle errors with --empty
stgraber on Github
lxc-bot at linuxcontainers.org
Tue Nov 5 13:52:21 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20191105/f9204a1d/attachment.bin>
-------------- next part --------------
From d3e1893e2aa030d9c39c66defd9ff8e5421918c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 5 Nov 2019 08:51:54 -0500
Subject: [PATCH] lxc/init: Properly handle errors with --empty
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
lxc/init.go | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lxc/init.go b/lxc/init.go
index 2a70dcea43..4a1cee0948 100644
--- a/lxc/init.go
+++ b/lxc/init.go
@@ -305,6 +305,11 @@ func (c *cmdInit) create(conf *config.Config, args []string) (lxd.InstanceServer
return nil, "", err
}
+ err = op.Wait()
+ if err != nil {
+ return nil, "", err
+ }
+
opInfo = op.Get()
}
More information about the lxc-devel
mailing list