[virt-tools-list] [PATCH 1/1] vmmConsolePages: cleanup: close tunnels

Cole Robinson crobinso at redhat.com
Thu Dec 22 18:07:04 UTC 2011


On 12/14/2011 02:38 PM, Serge Hallyn wrote:
> 
> Connect to a remote host with virt-manager (qemu+ssh://localhost/system
> will suffice).  Open a vnc connection to a VM.  Close it, and re-open
> it.  Re-open will hang.  Tested both on fedora 16 and ubuntu.
> 
> The ssh tunnels do not appear to be re-usable.  So close the tunnels
> when the viewer is closed.
> 
> With this patch, re-opening vnc viewers works like a charm.
> 
> Signed-off-by: Serge Hallyn <serge.hallyn at canonical.com>
> ---
>  src/virtManager/console.py |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/src/virtManager/console.py b/src/virtManager/console.py
> index 559bb31..f96718e 100644
> --- a/src/virtManager/console.py
> +++ b/src/virtManager/console.py
> @@ -853,6 +853,9 @@ class vmmConsolePages(vmmGObjectUI):
>          v.cleanup()
>          self.viewer_connected = False
>          self.leave_fullscreen()
> +        if self.tunnels is not None:
> +            self.tunnels.close_all()
> +            self.tunnels = None
>  
>      def update_widget_states(self, vm, status_ignore):
>          runable = vm.is_runable()


Thanks for the patch. I looked into this, and tunnels should have been cleaned
up when VNC disconnected like it has always worked. Turns out some cleanup
code I added was cleaning up the VNC widget too early, preventing the
disconnect signal from being delivered.

I've pushed a different patch that fixes the issue here and should be a simple
backport. More info also in the description:

http://git.fedorahosted.org/git?p=virt-manager.git;a=commit;h=becf776d6af3455f6c89396e3ccc330cd2c85434

Thanks,
Cole




More information about the virt-tools-list mailing list