[lxc-devel] [go-lxc/v2] Fixes #58

sethdmoore on Github lxc-bot at linuxcontainers.org
Tue Apr 19 02:04:30 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 480 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160419/5c371e3e/attachment.bin>
-------------- next part --------------
From 34ba2151a7da671ab29fbb748e564dd0ff205c11 Mon Sep 17 00:00:00 2001
From: Seth Moore <sethdmoore at gmail.com>
Date: Mon, 18 Apr 2016 22:01:19 -0400
Subject: [PATCH] Fixes #58

Execute method fails due to this check, no matter how you invoke it
Remove the previous definition check, as the container *must* be defined
in order to execute commands in it.
---
 container.go | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/container.go b/container.go
index 9b047ca..d31c2ab 100644
--- a/container.go
+++ b/container.go
@@ -454,10 +454,6 @@ func (c *Container) Start() error {
 
 // Execute executes the given command in a temporary container.
 func (c *Container) Execute(args ...string) ([]byte, error) {
-	if err := c.makeSure(isNotDefined); err != nil {
-		return nil, err
-	}
-
 	cargs := []string{"lxc-execute", "-n", c.Name(), "-P", c.ConfigPath(), "--"}
 	cargs = append(cargs, args...)
 


More information about the lxc-devel mailing list