console: Try to catch xen race errors when opening VNC

This commit is contained in:
Cole Robinson 2010-01-11 10:30:40 -05:00
parent 3fb1e6e155
commit 9b7bf37c55

View File

@ -546,8 +546,16 @@ class vmmConsolePages(gobject.GObject):
self.schedule_retry() self.schedule_retry()
return return
try:
(protocol, host,
port, trans, username) = self.vm.get_graphics_console()
except Exception, e:
# We can fail here if VM is destroyed: xen is a bit racy
# and can't handle domain lookups that soon after
logging.debug("Getting graphics console failed: %s" % str(e))
return
connport = None connport = None
protocol, host, port, trans, username = self.vm.get_graphics_console()
if host.count(":"): if host.count(":"):
host, connport = host.split(":", 1) host, connport = host.split(":", 1)