Re: [PATCH] Improve error reporting when virsh console is run without a TTY

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

 



On Wed, Feb 15, 2012 at 13:16:05 +0000, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> If attempting to run
> 
>   ssh root@somehost virsh console someguest
> 
> You'll get an error
> 
>   2012-02-15 13:11:47.683+0000: 4765: info : libvirt version: 0.9.10, package: 1.fc18 (Unknown, 2012-02-15-11:48:57, lettuce.camlab.fab.redhat.com)
>   2012-02-15 13:11:47.683+0000: 4765: error : vshRunConsole:320 : unable to get tty attributes: Invalid argument
>   Connected to domain f16x86_64
>   Escape character is ^]
> 
> There are several problems here
> 
>  - The actual error message is bad for users
>  - We shouldn't rely on VIR_ERROR for this case
>  - The prompt makes it look like we still connected
>    because we didn't flush stdout.
> 
> * virsh.c: Flush stdout before starting console and check
>   for a valid tty
> ---
>  tools/virsh.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)

ACK

Jirka

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