[virt-tools-list] [PATCH 1/5] ConnectionInfo: console is active if fd can be provided

Cole Robinson crobinso at redhat.com
Mon May 2 21:23:35 UTC 2016


On 04/28/2016 08:22 AM, Marc-André Lureau wrote:
> A domain doesn't need to have TCP socket listening, virt-manager can
> now connect to it as long as libvirt can provide some fd (through
> local unix sockets).
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
> ---
>  virtManager/sshtunnels.py | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/virtManager/sshtunnels.py b/virtManager/sshtunnels.py
> index 4fe8c3f..8749fa2 100644
> --- a/virtManager/sshtunnels.py
> +++ b/virtManager/sshtunnels.py
> @@ -101,6 +101,10 @@ class ConnectionInfo(object):
>      def console_active(self):
>          if self.gsocket:
>              return True
> +        connfd = self.get_conn_fd()
> +        if connfd != -1:
> +            os.close(connfd)
> +            return True
>          if (self.gport in [None, -1] and self.gtlsport in [None, -1]):
>              return False
>          return True
> 

Thanks for the patch. Actually rather than call into libvirt/qemu for this
minor check I just dropped console_active entirely:

commit 0a1d22f395e86861c3725e37fec9f592a616a4ce
Author: Cole Robinson <crobinso at redhat.com>
Date:   Mon May 2 17:19:15 2016 -0400

    console: Remove console_active check

    This is largely left over from the old days when a xen VM could
    start up but still take a bit of time for the allocated VNC port
    to be reflected in the XML.

    This may still be an issue with old old xen, but I suspect it's
    not relevant for anything modern, and it causes some issues with
    listen=none behavior that spice supports. Just drop it and see if
    anyone complains

- Cole




More information about the virt-tools-list mailing list