[virt-tools-list] [virt-manager PATCH] virtManager/viewers: fix connection to remote SPICE with password
Pavel Hrdina
phrdina at redhat.com
Tue Feb 7 17:00:23 UTC 2017
When connecting to remote SPICE we use ssh tunnel if the SPICE is
listening only on "localhost". Our ssh tunnel scheduler uses locks
to serialize the requests for FD in order to not spam user for ssh
password.
However when the main_channel is connected and emits AUTH_ERROR
we ask user for password and request for new FD. Unfortunately
after the new request is handled we didn't unlock the scheduler
and all other request would remain waiting for the lock.
We need to unlock every FD request for the SPICE main channel not
only the first one when the channel itself is created.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1401790
Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
virtManager/viewers.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/virtManager/viewers.py b/virtManager/viewers.py
index 2f7d2e95..54c2c973 100644
--- a/virtManager/viewers.py
+++ b/virtManager/viewers.py
@@ -562,6 +562,8 @@ class SpiceViewer(Viewer):
#####################
def _main_channel_event_cb(self, channel, event):
+ self._tunnels.unlock()
+
if event == SpiceClientGLib.ChannelEvent.CLOSED:
self._emit_disconnected()
elif event == SpiceClientGLib.ChannelEvent.ERROR_AUTH:
@@ -614,7 +616,6 @@ class SpiceViewer(Viewer):
if (type(channel) == SpiceClientGLib.MainChannel and
not self._main_channel):
- self._tunnels.unlock()
self._main_channel = channel
hid = self._main_channel.connect_after("channel-event",
self._main_channel_event_cb)
--
2.11.1
More information about the virt-tools-list
mailing list