[libvirt] [PATCH] tools: skip libvirt-guests fast if libvirtd is not active

Christian Ehrhardt christian.ehrhardt at canonical.com
Mon Dec 16 07:07:19 UTC 2019


On Fri, Dec 13, 2019 at 11:23 AM Daniel P. Berrangé <berrange at redhat.com>
wrote:

> On Tue, Dec 03, 2019 at 09:56:15AM +0100, Christian Ehrhardt wrote:
> > The most common operation of libvirt-guests is to manage the local
> > libvirtd. But users might have disabled that and while we are
> > After=libvirtd for ordering we are not Requiring it..
> > OTOH adding that or any harder dependency might affect our ordering.
> >
> > But if people have disabled libvirt they will do a full retry loop
> > until timeout. Lets check if the local service is active at all and skip
> > fast if it is not.
>
> I don't really get why we have that retry logic at all.
> If libvirtd is running, or systemd autostart is present then
> virsh connect should work immediately.  If it autostarts and
> no guests are present, then ther's no work todo so it'll be
> fast enough.
>
> If it fails something either it is stopped and autostart is
> disabled, or it is completely broken.
>
> Either way,  a retry loop looks pointless to me.
>

Yeah I agree and thank you for that POV.
Maybe the loop sits there since more unreliable times and just is outdated
now.


> IOW, instead of adding a check on libvirtd, just
> kill the retry loop.
>
>
> Regards,
> Daniel
> --
> |: https://berrange.com      -o-
> https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-
> https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-
> https://www.instagram.com/dberrange :|
>
>

-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20191216/85cd0e31/attachment-0001.htm>


More information about the libvir-list mailing list