a372183af9
This change adds the lxc.haltsignal option to the container config which ensures containers are gracefully stopped but quickly. Presently, when a container is restart they can hang for 20 - 30 seconds which is due to the fact that the default stop signal is SIGPWR. While the hang when stopping a container is not 100% reproducible in all environments it can be seen when simply executing `lxc-stop`. If the user were to stream the container journal while stopping the container it's would be seen that the container hangs when trying to shutdown some systemd services. If the `lxc-stop` command is executed a second time the container is stopped more forcibly with SIGRTMIN+3. This change is using an example stop signal from the lxc documentation [0] which is implementing a Real-time signal, SIGRTMIN+n. More on the signal used can be found here [1]. [0] http://manpages.ubuntu.com/manpages/xenial/en/man5/lxc.container.conf.5.html [1] http://manpages.ubuntu.com/manpages/xenial/en/man7/signal.7.html Change-Id: I01e82eabf17d2ac5a89c13ef56616fd1fe0607dd Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>