1
0
mirror of https://github.com/lxc/go-lxc.git synced 2026-02-05 06:46:38 +01:00

do not fail container start if not defined

Starting an 'anonymous' container is perfectly valid (see lxc_start.c itself).
In particular, in lxd we will not have a container config file, rather we will
build up the config using SetConfigItem() using items from the database, and
start from that.  That is akin to 'lxc-start -s key=value -s key=value -n
name'.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Serge Hallyn
2015-02-18 11:26:31 -06:00
parent 5f0d701d97
commit 22df872ca6

View File

@@ -433,7 +433,7 @@ func (c *Container) Create(options TemplateOptions) error {
// Start starts the container.
func (c *Container) Start() error {
if err := c.makeSure(isDefined | isNotRunning); err != nil {
if err := c.makeSure(isNotRunning); err != nil {
return err
}