Skip to content

Commit

Permalink
lxc_container_new: fail on config file parse error
Browse files Browse the repository at this point in the history
If we have a bad config file entry, fail.  Otherwise lxc-start
will proceed with a partial configuration.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
hallyn committed Jan 29, 2014
1 parent 934b167 commit bac806d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lxc/lxccontainer.c
Expand Up @@ -3232,8 +3232,8 @@ struct lxc_container *lxc_container_new(const char *name, const char *configpath
goto err;
}

if (file_exists(c->configfile))
lxcapi_load_config(c, NULL);
if (file_exists(c->configfile) && !lxcapi_load_config(c, NULL))
goto err;

if (ongoing_create(c) == 2) {
ERROR("Error: %s creation was not completed", c->name);
Expand Down

0 comments on commit bac806d

Please sign in to comment.