From 81b6f418ebf791b54b99849705bc67535d6e9590 Mon Sep 17 00:00:00 2001 From: David Ward Date: Tue, 23 Jun 2015 10:57:38 -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 9a407c300..f962fb9bd 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -1302,6 +1302,8 @@ static bool lxcapi_create(struct lxc_container *c, const char *t, if (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