Michal Privoznik 73307499df libvirt-guests: Wait for libvirtd to initialize
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.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 4e7fc8305a53676ba2362bfaa8ca05c4851b7e12)
2014-03-10 09:16:41 -04:00
..
2013-10-29 16:13:03 +00:00
2013-09-17 17:47:33 -06:00