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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user