mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 03:53:18 +00:00
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:
parent
934b1673cd
commit
bac806d1a1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user