]> xenbits.xensource.com Git - libvirt.git/commit
lxc: only write XML once for lxc controller
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 16 Jan 2015 16:39:57 +0000 (16:39 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 27 Jan 2015 13:57:02 +0000 (13:57 +0000)
commit0a8addc1033be61f8e8f25508042bf9ab7508d56
tree5b8c1696a30de9d3e74a46bb41d6976edb81467d
parente1de5521506e10a1f50878cc3164b351f96d133d
lxc: only write XML once for lxc controller

Currently when launching the LXC controller we first write out
the plain, inactive XML configuration, then launch the controller,
then replace the file with the live status XML configuration.
By good fortune this hasn't caused any problems other than some
misleading error messages during failure scenarios.

This simplifies the code so it only writes out the XML once and
always writes the live status XML. To do this we need to handshake
with the child process, to make execution pause just before exec()
so we can write the XML status with the child PID present.
src/conf/domain_conf.c
src/conf/domain_conf.h
src/lxc/lxc_controller.c
src/lxc/lxc_process.c