Commit 9a2e239d by David Ward Committed by Stéphane Graber

When creating container, save configuration if rootfs already exists

Commit 6c6892b5 "fix multithreaded create()" prevented the container configuration from being saved if the backing store does not need to be created. Signed-off-by: 's avatarDavid Ward <david.ward@ll.mit.edu> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 9bcf970f
...@@ -1382,6 +1382,8 @@ static bool do_lxcapi_create(struct lxc_container *c, const char *t, ...@@ -1382,6 +1382,8 @@ static bool do_lxcapi_create(struct lxc_container *c, const char *t,
if (do_lxcapi_is_defined(c) && c->lxc_conf->rootfs.path && !tpath) { if (do_lxcapi_is_defined(c) && c->lxc_conf->rootfs.path && !tpath) {
/* Rootfs already existed, user just wanted to save the /* Rootfs already existed, user just wanted to save the
* loaded configuration */ * loaded configuration */
if (!c->save_config(c, NULL))
ERROR("failed to save starting configuration for %s\n", c->name);
ret = true; ret = true;
goto out; goto out;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment