]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tools: do not loop in libvirt-guests test_connect
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Mon, 16 Dec 2019 07:20:59 +0000 (08:20 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 16 Dec 2019 10:10:49 +0000 (10:10 +0000)
commit8ea9e032dd31d8c106bbc813df868326687ed4ef
tree6cbf6c232f747e7f3387d54322f8e2c47516615e
parent8a8961da36c64603653feffc7b819832da5666dd
tools: do not loop in libvirt-guests test_connect

These days libvirt is pretty reliable and even remote connections
(not the default for libvirt-guests anyway) either work or fail but are
uncommon to be flaky.

On the other hand users might have disabled the service and while we are
After=libvirtd for ordering we are not Requiring it. Adding that or any
harder dependency might break our ordering. But if people have disabled
libvirt they will do a full retry loop until timeout.

Lets drop the loop to be much faster if a remote is not reachable.

Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1854653
This reverts

  commit 4e7fc8305a53676ba2362bfaa8ca05c4851b7e12
  Author: Michal Prívozník <mprivozn@redhat.com>
  Date:   Fri Feb 21 12:46:08 2014 +0100

    libvirt-guests: Wait for libvirtd to initialize

The race described in that commit no longer exists using systemd as
we now have socket activation. If not using systemd, then it is also
safe if using the libvirtd --daemon flag, since the parent process
won't return to the caller until the child is accepting connections.

Reported-by: Doug Smythies <dsmythies@telus.net>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
tools/libvirt-guests.sh.in