libvirt does not wait for guests to shut down

Bug #1480440 reported by Nathaniel W. Turner
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
High
Unassigned
Vivid
Won't Fix
Undecided
Unassigned

Bug Description

In previous releases, such as 14.04, a host shutdown would initiate a clean shutdown of all libvirt guests, and wait (up to some configurable amount) for them to cleanly shut down before proceeding with the host shutdown.

In wily, this no longer happens, and a clean host shutdown results in a dirty shutdown of all guest VMs.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for filing this bug. We had fixed this in the upstart script, but systemd is using the sysvinit script, so we need to augment its stop() handler to also shut down vms.

Changed in kvm (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Unfortunately this can't be fixed in the sysvinit script , because '/etc/init.d/libvirt-bin stop' is not caled until all vms have already been killed. We'll need to write a systemd unit for libvirt.

Adam Conrad (adconrad)
tags: added: block-proposed
Adam Conrad (adconrad)
affects: kvm (Ubuntu) → libvirt (Ubuntu)
tags: added: wily
tags: removed: block-proposed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 1.2.16-2ubuntu8

---------------
libvirt (1.2.16-2ubuntu8) wily; urgency=medium

  * Support OVMF images in virt-aa-helper. (LP: #1483071)
  * Fix the libvirt-bin.preinst to not stop libvirt-bin on upgrade
    from 1.2.16-2ubuntu7.

 -- Serge Hallyn <email address hidden> Fri, 14 Aug 2015 07:34:30 -0500

Changed in libvirt (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Armin Schindler (armin-melware) wrote :

I have the same problem with Vivid. Will there be a fix / backport available?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

We can try, however switching the init scripts seems a harder thing to do in an SRU.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Note - a probably unacceptable workaround is to use upstart (sudo apt-get install upstart-sysv).

Revision history for this message
Armin Schindler (armin-melware) wrote :

Actually it is a very acceptable workaround. I switched to upstart and it works fine. Boot and shutdown is even faster (which I don't really need in a server environment). The upstart way seems to be more stable and reliable than systemd. My two cents from a server administrator point of view: Avoid this complex systemd thing.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

(The backport to vivid will have to wait for the current vivid-proposed package to clear. It was only accepted yesterday so will be awhile yet)

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hi,

I'd really prefer to avoid the potential breakage by trying to backport this with 2months left to EOL. So I'm going to mark this wontfix for vivid. If you reall need this, please reply here. Please remember you can work around this by using upstart, or you can upgrade to wily which has the fix.

Changed in libvirt (Ubuntu Vivid):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.