Commit 0f4cdd77 by David Ward Committed by Serge Hallyn

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 01958b1f
......@@ -1383,6 +1383,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) {
/* Rootfs already existed, user just wanted to save the
* loaded configuration */
if (!c->save_config(c, NULL))
ERROR("failed to save starting configuration for %s\n", c->name);
ret = true;
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