Re: [libvirt PATCH] remote: fix driver name check for libxl driver

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

 



On Mon, May 04, 2020 at 11:33:46AM -0600, Jim Fehlig wrote:
> On 5/4/20 10:48 AM, Daniel P. Berrangé wrote:
> > The virConnectGetType() returns "xenlight" for libxl, not "LIBXL".
> 
> The libxl driver implements connectGetType, where it returns "Xen"
> 
> https://gitlab.com/libvirt/libvirt/-/blob/master/src/libxl/libxl_driver.c#L909
> 
> Is the driver function table not initialized, in which case
> virConnectGetType returns the driver's name? Either way, I'm really
> lamenting my choice of names and inconsistent use of them in the libxl
> driver :-(. But I don't think it is possible to change the type returned
> through virConnectGetType, as that could break existing users.

Doh, I missed that. So we have virHypervisorDriver using "xenlight",
and virStateDriver using  "LIBXL" and virConnectGetType using "Xen".

Can we changes the driver tables to use "Xen" too, now that we got
rid of the old Xen driver. I can't remember if the driver tables
names leak out anywhere important ?

> 
> Regards,
> Jim
> 
> > This prevents users opening a connection to the libxl driver when using
> > the modular daemons.
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
> > ---
> >   src/remote/remote_daemon_dispatch.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c
> > index 5d1c6971c0..a8ac795d71 100644
> > --- a/src/remote/remote_daemon_dispatch.c
> > +++ b/src/remote/remote_daemon_dispatch.c
> > @@ -2111,7 +2111,7 @@ remoteDispatchConnectOpen(virNetServerPtr server G_GNUC_UNUSED,
> >       VIR_DEBUG("Primary driver type is '%s'", type);
> >       if (STREQ(type, "QEMU") ||
> > -        STREQ(type, "LIBXL") ||
> > +        STREQ(type, "xenlight") ||
> >           STREQ(type, "LXC") ||
> >           STREQ(type, "VBOX") ||
> >           STREQ(type, "bhyve") ||
> > 
> 

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 :|





[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