lxc_container_new: fail on config file parse error

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>
This commit is contained in:
Serge Hallyn 2014-01-28 13:28:19 +00:00
parent 934b1673cd
commit bac806d1a1

View File

@ -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);