Skip to content

Commit

Permalink
When creating container, save configuration if rootfs already exists
Browse files Browse the repository at this point in the history
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@ll.mit.edu>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
dpward authored and stgraber committed Aug 27, 2015
1 parent 5b27808 commit 81b6f41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lxc/lxccontainer.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 81b6f41

Please sign in to comment.