[libvirt] [PATCH 2/3] libvirt-guests: Wait for libirtd to initialize

Daniel P. Berrange berrange at redhat.com
Fri Feb 21 12:50:31 UTC 2014


On Fri, Feb 21, 2014 at 01:32:36PM +0100, Michal Privoznik wrote:
> I've noticed that in some cases systemd was quick enough and even
> if libvirt-guests.service is marked to be started after the
> libvirtd.service my guests were not resumed as
> libvirt-guests.sh failed to connect. This is because of a
> simple fact: systemd correctly starts libvirt-guests after it
> execs libvirtd. However, the daemon is not able to accept
> connections right from the start. It's doing some
> initialization which may take ages. This problem is not limited
> to systemd only, indeed. Any init system that is able to startup
> services in parallel (e.g. OpenRC) may run into this situation.
> The fix is to try connecting not only once, but continuously a few
> times with a small sleep in between tries.

The long term fix for this will be to use socket activation for
libvirtd. Unfortunately we can't do that yet since then VMs marked
to autostart on boot won't be booted


ACK

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list