Fix reboot and shutdown command for LXC containers (Closes: #991773)
From 93c47e2c39521aba760486f0238458ef1a37490c Mon Sep 17 00:00:00 2001
- Author: Joachim Falk joachim.falk@gmx.de
- Date: Thu, 2 Dec 2021 19:56:07 +0100
- Description: [PATCH] Fix reboot command for LXC containers (Closes: #991773)
- Forwarded: https://gitlab.com/libvirt/libvirt/-/issues/237
- Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=991773
- Signed-off-by: Joachim Falk joachim.falk@gmx.de
- Reviewed-by: Michal Privoznik mprivozn@redhat.com
- Abstract: The virNetDaemonQuit(dmn) command in virLXCControllerSignalChildIO triggers an early close of all clients of lxc_controller. Here, libvirtd itself is a client of this controller, and the client connection is used to notify libvirtd if a reboot of the container is required. However, the client connection was closed before such a status could be sent to libvirtd. To fix this bug, we will immediately send the reboot or shutdown status of the container to libvirtd, and only after client disconnect will we trigger virNetDaemonQuit.
This is a backport of the patch that has been applied upstream and will be contained in libvirt >= 8.0