Error connecting to remote console session

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

 




The current implementation of connecting to a VNC console on remote hypervisor via qemu+ssh where the VNC listen address is localhost doesn't work.

I think this was originally introduced in 422c0216d8 (which is what ubuntu packaged causing me to chase this down). However, the refactoring in a455ba72b6 changed the code leaving a new version of the bug in place.

The code (HEAD) is using the `is` operator (identity) to compare strings where equality is desired. This has the result of not setting up the tunnel over ssh to the remote server when required. The following patch fixes that.

Regards,
Nathan Bird
>From a78f74cde37cdc00b68cd72f8965a3ad0ff2c9c0 Mon Sep 17 00:00:00 2001
From: Nathan Bird <nathan@xxxxxxxxxxxxxxxx>
Date: Wed, 4 Apr 2012 14:45:11 -0400
Subject: [PATCH] console: fix logic in need_tunnel for non-local connections.

---
 src/virtManager/console.py |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/virtManager/console.py b/src/virtManager/console.py
index b14b5c4..2ac68ff 100644
--- a/src/virtManager/console.py
+++ b/src/virtManager/console.py
@@ -73,10 +73,8 @@ class ConnectionInfo(object):
             self._connhost, self._connport = self._connhost.split(":", 1)
 
     def need_tunnel(self):
-        if self.gaddr is not "127.0.0.1":
-            return False
-
-        return self.transport in ["ssh", "ext"]
+        return self.gaddr == "127.0.0.1" and \
+          self.transport in ["ssh", "ext"]
 
     def get_conn_host(self):
         host = self._connhost
-- 
1.7.9.1


[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