]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Add handling for reboots of LXC containers
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 23 Jul 2012 11:25:37 +0000 (12:25 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 30 Jul 2012 12:09:56 +0000 (13:09 +0100)
commitcb612ee489dfe556063f88b89c369a8ec08abec7
tree4d57bd662d318e5ac026cc457a9de98f27d42f7f
parentb46b1c762a15fa7a85a95669631c4207b67c94bf
Add handling for reboots of LXC containers

The reboot() syscall is allowed by new kernels for LXC containers.
The LXC controller can detect whether a reboot was requested
(instead of a normal shutdown) by looking at the "init" process
exit status. If a reboot was triggered, the exit status will
record SIGHUP as the kill reason.

The LXC controller has cleared all its capabilities, and the
veth network devices will no longer exist at this time. Thus
it cannot restart the container init process itself. Instead
it emits an event which is picked up by the LXC driver in
libvirtd. This will then re-create the container, using the
same configuration as it was previously running with (ie it
will not activate 'newDef').

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/lxc/lxc_controller.c
src/lxc/lxc_domain.h
src/lxc/lxc_process.c
src/lxc/lxc_protocol.x