[lxc-devel] [PATCH master 6/7] When creating container, save configuration if rootfs already exists
David Ward
david.ward at ll.mit.edu
Tue Jun 23 14:57:24 UTC 2015
Commit 6c6892b "fix multithreaded create()" prevented the container
configuration from being saved if the backing store does not need
to be created.
Signed-off-by: David Ward <david.ward at ll.mit.edu>
---
src/lxc/lxccontainer.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index 1c103e8..999fd9d 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -1377,6 +1377,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;
}
--
1.7.1
More information about the lxc-devel
mailing list