summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2022-01-20 14:14:54 -0500
committerCole Robinson <crobinso@redhat.com>2022-01-21 11:03:23 -0500
commit8bb64ad5afd5eb1bb15c25affc5544a3acefe48f (patch)
treed24f2fe4cc2317ad3509016bdd77109e4e8f475c
parent2815b7406ef89c5f0ce0ad662bedee280d5dd5f1 (diff)
downloadvirt-manager-8bb64ad5afd5eb1bb15c25affc5544a3acefe48f.tar.gz
console: Don't block console reconnect for non-error
https://listman.redhat.com/archives/virt-tools-list/2022-January/msg00012.html On xen, a guest reboot will trigger a non-error viewer-disconnected signal, but we treat it like an error, which makes it difficult to reconnect to the VM console. If there's no error message raised, treat the disconnect like a non-error cases. Signed-off-by: Cole Robinson <crobinso@redhat.com>
-rw-r--r--virtManager/details/console.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/virtManager/details/console.py b/virtManager/details/console.py
index fafb7202..9b1e5db5 100644
--- a/virtManager/details/console.py
+++ b/virtManager/details/console.py
@@ -814,14 +814,23 @@ class vmmConsolePages(vmmGObjectUI):
return
msg = _("Viewer was disconnected.")
+ errmsg = ""
if errdetails:
- msg += "\n" + errdetails
+ errmsg += "\n" + errdetails
if ssherr:
log.debug("SSH tunnel error output: %s", ssherr)
- msg += "\n\n"
- msg += _("SSH tunnel error output: %s") % ssherr
+ errmsg += "\n\n"
+ errmsg += _("SSH tunnel error output: %s") % ssherr
- self._activate_gfx_unavailable_page(msg)
+ if errmsg:
+ self._activate_gfx_unavailable_page(msg + errmsg)
+ return
+
+ # If no error message was reported, this isn't a clear graphics
+ # error that should block reconnecting. So use the top level
+ # 'VM unavailable' page which makes it easier for the user to
+ # reconnect.
+ self._activate_vm_unavailable_page(msg)
def _viewer_disconnected(self, ignore, errdetails, ssherr):
self._activate_gfx_unavailable_page(_("Viewer disconnected."))