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

Re: [libvirt] [PATCH] Improve some error messages about unsupported APIs/URIs



On Tue, Jun 22, 2010 at 08:01:09PM +0200, Matthias Bolte wrote:
> 2010/6/22 Daniel P. Berrange <berrange redhat com>:
> > If there is no driver for a URI we report
> >
> >  "no hypervisor driver available"
> >
> > This is bad because not all virt drivers are hypervisors (ie container
> > based virt).
> >
> > If there is no driver support for an API we report
> >
> >  "this function is not supported by the hypervisor"
> >
> > This is bad for the same reason, and additionally because it is
> > also used for the network, interface & storage drivers.
> >
> > * src/util/virterror.c: Improve error messages
> > ---
> >  src/util/virterror.c |    8 ++++----
> >  1 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/src/util/virterror.c b/src/util/virterror.c
> > index 96dd1e7..9f632ec 100644
> > --- a/src/util/virterror.c
> > +++ b/src/util/virterror.c
> > @@ -760,15 +760,15 @@ virErrorMsg(virErrorNumber error, const char *info)
> >             break;
> >         case VIR_ERR_NO_SUPPORT:
> >             if (info == NULL)
> > -                errmsg = _("this function is not supported by the hypervisor");
> > +                errmsg = _("this function is not supported by the connection driver");
> >             else
> > -                errmsg = _("this function is not supported by the hypervisor: %s");
> > +                errmsg = _("this function is not supported by the connection driver: %s");
> 
> As you said this message can also be triggered by network, interface,
> storage, etc. drivers not supporting a function. Therefore, I think we
> should not include the word 'connection' in the message.

The virConnectPtr is the connection in this context and the driver activated
there determines what's used for the hypervisor, storage, network, interface
APIs. Hypervisor was too narrow, but connection is relevant here IMHO.

Regards,
Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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