Re: [PATCH 2/2] Report better error message in remoteGetUNIXSocket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 28, 2023 at 01:02:40PM +0100, Martin Kletzander wrote:
> Before this patch users might be confused with the error when no daemon
> nor systemd socket unit is running due to the error message being a bit
> vague when running as root with no URI:
> 
>   # virsh list
>   error: failed to connect to the hypervisor
>   error: Operation not supported: Cannot use direct socket mode if no
>   URI is set
> 
> Instead of merely suggesting to start any daemon, also give a hint as to
> what socket we have tried looking up:
> 
>   # virsh list
>   error: failed to connect to the hypervisor
>   error: Operation not supported: Cannot connect to
>   '/var/run/libvirt/virtqemud-sock' and no URI is set, is any virt
>   daemon or systemd socket unit started?

As Peter points out, this is a misleading message because it is
arbitrarily reporting the first compiled in driver, which may
be no resemblance to what the user was expecting to run. I think
we should not include the sock path here, but we could include
the sock *directory*, as that would help diagnose when someone
built with the wrong install prefix, eg

  "No active daemon socket found in /var/run/libvirt, and no
   URI is set. Is any libvirt daemon or socket unit started ?"

With 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 :|
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux