[lxc-devel] [PATCH] lxc_container_new: fail on config file parse error
Serge Hallyn
serge.hallyn at ubuntu.com
Tue Jan 28 13:52:09 UTC 2014
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 at ubuntu.com>
---
src/lxc/lxccontainer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index dcdeaad..eefff28 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -3219,8 +3219,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);
--
1.8.5.3
More information about the lxc-devel
mailing list