Re: [PATCH] Stop libxl driver polluting logs on non-Xen hosts

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

 



Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
>
> If the libxl driver is compiled in, then everytime libvirtd
> starts up on a non-Xen Dom0 host, it logs a error message.
> Since this is an expected condition, we should not log at
> 'error' level, only 'info'.
>   

Ah, yes.  I noticed this when creating the virDomainMigrateGetMaxSpeed()
API, but then forgot to knock up a patch.

> * src/libxl/libxl_driver.c: Lower log level for certain
>   expected errors during driver init
> ---
>  src/libxl/libxl_driver.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
> index d6e0c28..3cffb5d 100644
> --- a/src/libxl/libxl_driver.c
> +++ b/src/libxl/libxl_driver.c
> @@ -963,19 +963,19 @@ libxlStartup(int privileged) {
>      libxl_driver->logger =
>              (xentoollog_logger *)xtl_createlogger_stdiostream(libxl_driver->logger_file, XTL_DEBUG,  0);
>      if (!libxl_driver->logger) {
> -        VIR_ERROR(_("cannot create logger for libxenlight"));
> +        VIR_INFO(_("cannot create logger for libxenlight, disabling driver"));
>          goto fail;
>      }
>  
>      if (libxl_ctx_init(&libxl_driver->ctx,
>                         LIBXL_VERSION,
>                         libxl_driver->logger)) {
> -        VIR_ERROR(_("cannot initialize libxenlight context"));
> +        VIR_INFO(_("cannot initialize libxenlight context, probably not running in a Xen Dom0, disabling driver"));
>          goto fail;
>      }
>  
>      if ((ver_info = libxl_get_version_info(&libxl_driver->ctx)) == NULL) {
> -        VIR_ERROR(_("cannot version information from libxenlight"));
> +        VIR_INFO(_("cannot version information from libxenlight, disabling driver"));
>          goto fail;
>      }
>      libxl_driver->version = (ver_info->xen_version_major * 1000000) +
>   

ACK.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[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]