[virt-tools-list] [virt-manager PATCH] virtManager/viewers: fix connection to remote SPICE with password
Cole Robinson
crobinso at redhat.com
Thu Feb 9 21:25:28 UTC 2017
On 02/07/2017 12:00 PM, Pavel Hrdina wrote:
> 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)
>
ACK
- Cole
More information about the virt-tools-list
mailing list