From 0f4cdd778133cada7ca27288bd84a4d80a0a0e9a Mon Sep 17 00:00:00 2001 From: David Ward Date: Tue, 23 Jun 2015 10:57:24 -0400 Subject: [PATCH] When creating container, save configuration if rootfs already exists 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 Acked-by: Serge E. Hallyn --- src/lxc/lxccontainer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index ce2ec8aea..932d658ea 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -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; } -- 2.47.2