If you are simply restarting libvirtd (eg for an openssl upgrade), the VMs should be KEPT running. Please add LIBVIRTD_KVM_RESTART as a configuration option, with a default of 'none', so that running VMs are NOT touched during a restart of libvirt. This caused a 15 minute outage of woodpecker, as infra does automatic restarts of daemons that use deleted libraries, and the restart behavior was not intuitive.
The openrc init script has "reload" and "halt" as additional commands to restart and stop the daemon without touching the VMs. "restart" and "stop" honor LIBVIRTD_KVM_SHUTDOWN. Is it possible to use "reload" instead of "restart" for infra (and specific daemons)? Further - if we decide to change the current behavior - I'd say, reimplementing "restart" in terms of "reload" without an additional configuration option is the way to go.
*ping*
The infra case is already temporarily changed to use reload. I think the root cause here, is should existing child processes be affected by a restart command, by default? Make restart honor a different variable than stop, say LIBVIRTD_KVM_RESTART, then it will be trivial.
*libvirt-1.2.16-r1 (24 Jun 2015) 24 Jun 2015; Matthias Maier <tamiko@gentoo.org> +files/libvirtd.confd-r5, +files/libvirtd.init-r15, +libvirt-1.2.16-r1.ebuild, -libvirt-1.2.16.ebuild, files/libvirtd.init-r14: provide a configuration option for domains and network on restart, bug #551854
This is now fixed in version 1.2.16-r1 with two new configuration options in /etc/conf.d/libvirtd, "LIBVIRTD_KVM_RESTART", and "LIBVIRTD_KVM_NET_RESTART".
(In reply to Robin Johnson from comment #3) > The infra case is already temporarily changed to use reload. > > I think the root cause here, is should existing child processes be affected > by a restart command, by default? > > Make restart honor a different variable than stop, say LIBVIRTD_KVM_RESTART, > then it will be trivial. This was done this way back in the day before OpenRC was forked off and we couldn't add extra commands. The only extra command we could use was 'reload'. 'reload' was defined as 'non-intrusive' while 'restart' was defined as 'intrusive'. We currently tell users to restart libvirtd when dealing with QEMU vulnerabilities so that they get their VMs running with a newer version of QEMU without much downtime. The real answer is to not add yet another variable and configuration but to use the right command which is 'reload'. This change needs to be reverted.
*libvirt-1.2.17-r4 (31 Jul 2015) 31 Jul 2015; Matthias Maier <tamiko@gentoo.org> +libvirt-1.2.17-r4.ebuild, -files/libvirtd.confd-r6, -files/libvirtd.init-r16, -libvirt-1.2.17-r3.ebuild, libvirt-9999.ebuild: on behalf of cardoe; revert all changes made to the openrc runscripts; as per discussions on bug #555736 and on bug #551854
To clarify: Cardoe and I have decided to split out the guest managed from the libvirtd runscipt into its own "libvirt-guests" runsript (as is already the case for the systemd unit files): /etc/init.d/libvirtd - solely manages the libvirtd daemon /etc/init.d/libvirt-guests - solely takes care of running guests upon restart/shutdown of the host With that, the policy decision is obsolete. (See also bug #555736)
commit 75a2af9e00d8701cb3a6f201976ed9ba27bcc7d0 Author: Matthias Maier <tamiko@gentoo.org> Date: Wed Aug 19 20:07:43 2015 -0500 app-emulation/libvirt: Update init scripts for 1.2.18-r2 and 9999 update init scripts for 1.2.18-r2 und 9999. Drop keywords for testing due to major runscript change. Bugs: 551854 Bugs: 555736 Bugs: 558034 Package-Manager: portage-2.2.20.1 commit aed11adf8c5bdff71154e1c5e0c375951d237f36 Author: Doug Goldstein <cardoe@gentoo.org> Date: Tue Aug 18 16:08:56 2015 -0500 app-emulation/libvirt: break apart OpenRC init script This breaks apart the startup/shutdown of libvirtd from the startup/shutdown of the libvirt domains. Additionally this expands out the domain support to work for all the libvirtd backends instead of just QEMU. Signed-off-by: Doug Goldstein <cardoe@gentoo.org> Signed-off-by: Matthias Maier <tamiko@gentoo.org>
This is fixed in 1.2.19 which is in the wild now.