[Pkg-libvirt-maintainers] Bug#579555: virt-manager: vnc connection aborts

Jan Schneider j.schneider at uib.de
Wed Apr 28 14:54:39 UTC 2010


Package: virt-manager
Version: 0.8.4-2
Severity: important


I am using virt-manager 0.8.4 ssh-tunneled.
From time to time the vnc connection to a machine aborts after sending a 
libvirt command like destroy.
This is very annoying because you then have to reconnect to virtualization 
host to get back vnc for this machine.

Debug log:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/console.py", line 452, in 
_vnc_disconnected
    errout = self.get_tunnel_err_output()
  File "/usr/share/virt-manager/virtManager/console.py", line 576, in 
get_tunnel_err_output
    new = errfd.recv(1024)
socket.error: [Errno 11] Resource temporarily unavailable

I could fix the problem with the following patch:

--- virt-manager-0.8.4_orig/src/virtManager/console.py       2010-03-23 
19:25:28.000000000 +0100
+++ virt-manager-0.8.4/src/virtManager/console.py       2010-04-26 
18:13:26.901004884 +0200
@@ -573,7 +573,13 @@
         errfd = self.vncTunnel[1]
         errout = ""
         while True:
-            new = errfd.recv(1024)
+           new = None
+           try:
+               new = errfd.recv(1024)
+           except socket.error, e:
+               # 11: temporarily unavailable
+               if (e[0] != 11):
+                   raise
             if not new:
                 break





More information about the Pkg-libvirt-maintainers mailing list