]> git.ipfire.org Git - thirdparty/lxc.git/commit
clone: clear the rootfs out of unexpanded config
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 11 Nov 2015 17:13:25 +0000 (17:13 +0000)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 17 Nov 2015 16:38:52 +0000 (11:38 -0500)
commit5eea90e8505d9f336bb28379d8575be159fdd2e1
tree00b83011b1be5595c32d031acb980268160a852d
parent8130ebe80fc66bbbccdfa54d70664084a36a1e13
clone: clear the rootfs out of unexpanded config

Closes #694

When we start cloning container c1 to c2, we first save c1's
configuration in c2's as a starting point.  We long ago cleared
out the lxc.rootfs entry before saving it, so that if we are
killed before we update the rootfs, c2's rootfs doesn't point
to c1's.  Because then lxc-destroy -n c2 would delete c1's rootfs.

But when we introduced the unexpanded_config, we didn't update
this code to clear the rootfs out of the unexpanded_config, which
is what now actually gets saved in write_config().

Do so.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxccontainer.c