]> xenbits.xensource.com Git - libvirt.git/commit
Add support for shutdown / reboot APIs in LXC driver
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 28 Nov 2012 13:26:52 +0000 (13:26 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 30 Nov 2012 19:20:14 +0000 (19:20 +0000)
commitcbb106f807b32f1f6af22d1e92fe0ff9ba6d73b3
tree1d887755fa903a71150ba1e003708c9a80b4fbee
parent76d9f656446934bd1389787ecaa335029ef14919
Add support for shutdown / reboot APIs in LXC driver

Add support for doing controlled shutdown / reboot in the LXC
driver. The default behaviour is to try talking to /dev/initctl
inside the container's virtual root (/proc/$INITPID/root). This
works with sysvinit or systemd. If that file does not exist
then send SIGTERM (for shutdown) or SIGHUP (for reboot). These
signals are not any kind of particular standard for shutdown
or reboot, just something apps can choose to handle. The new
virDomainSendProcessSignal allows for sending custom signals.

We might allow the choice of SIGTERM/HUP to be configured for
LXC containers via the XML in the future.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/lxc/lxc_driver.c