Re: [PATCH 1/5] ConnectionInfo: console is active if fd can be provided

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

 



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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxx>
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

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux