Re: [libvirt] [PATCH] qemu: Properly report a startup timeout error

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

 



On Tue, Feb 09, 2010 at 03:31:41PM -0500, Cole Robinson wrote:
> The timeout errors were unconditionally being overwritten by the less
> helpful 'unable to start guest' error.
> 
> Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
> ---
>  src/qemu/qemu_driver.c |   17 +++++++----------
>  1 files changed, 7 insertions(+), 10 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 4374291..2172c99 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -1358,15 +1358,15 @@ qemudReadLogOutput(virConnectPtr conn,
>          buf[got] = '\0';
>          if (got == buflen-1) {
>              qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
> -                             _("Out of space while reading %s log output"),
> -                             what);
> +                             _("Out of space while reading %s log output: %s"),
> +                             what, buf);
>              return -1;
>          }
>  
>          if (isdead) {
>              qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
> -                             _("Process exited while reading %s log output"),
> -                             what);
> +                             _("Process exited while reading %s log output: %s"),
> +                             what, buf);
>              return -1;
>          }
>  
> @@ -1378,7 +1378,8 @@ qemudReadLogOutput(virConnectPtr conn,
>      }
>  
>      qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
> -                     _("Timed out while reading %s log output"), what);
> +                     _("Timed out while reading %s log output: %s"),
> +                     what, buf);
>      return -1;
>  }
>  
> @@ -1557,12 +1558,8 @@ qemudWaitForMonitor(virConnectPtr conn,
>                   virStrerror(errno, ebuf, sizeof ebuf));
>      }
>  
> -    if (ret < 0) {
> -        /* Unexpected end of file - inform user of QEMU log data */
> -        qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
> -                         _("unable to start guest: %s"), buf);
> +    if (ret < 0)
>          return -1;
> -    }
>  
>      VIR_DEBUG("Connect monitor to %p '%s'", vm, vm->def->name);
>      if (qemuConnectMonitor(vm) < 0)

  ACK,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

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