[Pkg-libvirt-maintainers] Bug#955216: Bug#955216: upgrading libvirt-daemon-system stops VMs without asking

Guido Günther agx at sigxcpu.org
Mon Mar 30 09:57:02 BST 2020


Hi,
On Mon, Mar 30, 2020 at 09:39:18AM +0200, Marc Haber wrote:
> On Sat, Mar 28, 2020 at 08:19:45PM +0100, Guido Günther wrote:
> > On Sat, Mar 28, 2020 at 03:21:14PM +0100, Marc Haber wrote:
> > > since a few package versions, VMs get stopped when libvirt-daemon-system
> > > upgrade. This is new behavior. In past versions, it was possible to
> > > upgrade the host system without affecting the virtual machines.
> > 
> > Stopped in what sense? Shutodwn, paused? Which hypervisor URL? Does this
> > also happen when restarting libvirt?
> 
> I apologize for my unclear terminology. To answer your questions:
> 
> - A running windows does an orderly shutdown
> - The syslog gets entries like "Mar 30 07:52:38 drop
>   libvirt-guests.sh[1168673]: tWaiting for guest generic to shut down,
>   300 seconds left"

So this is libvirt-guests stopping the VMs.

> - apt/dpkg pause until the VM is really gone, when I don't allow windows
>   to shut down, the package update will only continue after VM shutdown
> - a Linux VM will shut down as well.
> - The VM is "Shutoff" in virt-manager, will not show up in virsh list,
>   and is "shut off" in virsh list --all
> - Restarting libvirt-bin will leave them running

That looks a lot like #954291 (this is for systems using sysvinit)...

> 
> While things are waiting for the VMs to go down, apt's output is like:
> Setting up libuno-purpenvhelpergcc3-3 (1:6.4.2-3) ...
> Setting up ure (1:6.4.2-3) ...
> Setting up libvirt-daemon-system (6.0.0-4) ...
> Installing new version of config file /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper ...
> Installing new version of config file /etc/libvirt/libvirtd.conf ...
> Installing new version of config file /etc/libvirt/qemu.conf ...
> Installing new version of config file /etc/libvirt/virtlockd.conf ...
> Installing new version of config file /etc/libvirt/virtlogd.conf ...
> Removing obsolete conffile /etc/init.d/virtlogd ...
> Removing obsolete conffile /etc/init.d/libvirtd ...
> Removing obsolete conffile /etc/init.d/libvirt-guests ...
> Job failed. See "journalctl -xe" for details.
> A dependency job for libvirtd-admin.socket failed. See 'journalctl -xe' for details.
> A dependency job for libvirtd-ro.socket failed. See 'journalctl -xe' for details.
> Job failed. See "journalctl -xe" for details.
> Setting up libjurt-java (1:6.4.2-3) ...
> Setting up libreoffice-common (1:6.4.2-3) ...

...but it seems you're using systemd. And indeed we're doing this wrong
for the systemd case too:

  https://salsa.debian.org/libvirt-team/libvirt/-/blob/debian/sid/debian/rules#L245

(i checked when fixing #954291 but missed that due it using a
variable). So i think this should fix it (untested):

  https://salsa.debian.org/agx/libvirt/-/commit/091af690d054123df0ad0bb8bfea5cf366c24078

So another fallout of the init system rework to make sysvinit
easier. Should you get around to test it, that would be great, otherwise
i'll do so before the next relase.

Thanks for providing all the useful details!
 -- Guido



More information about the Pkg-libvirt-maintainers mailing list