From: David Ward Date: Tue, 23 Jun 2015 14:57:38 +0000 (-0400) Subject: When creating container, save configuration if rootfs already exists X-Git-Tag: lxc-1.0.8~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81b6f418ebf791b54b99849705bc67535d6e9590;p=thirdparty%2Flxc.git 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 --- 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; }