Bug 1025706
Summary: | virt-manager causes a python trace-back instead of handling the error when it cannot open display | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Christos Triantafyllidis <ctrianta> | ||||
Component: | virt-manager | Assignee: | Giuseppe Scrivano <gscrivan> | ||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 6.4 | CC: | ctrianta, dyuan, gscrivan, jbuchta, lcui, mkletzan, mzhan, pkoro, rbalakri, tzheng | ||||
Target Milestone: | rc | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | virt-manager-0.9.0-20.el6 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2014-10-14 06:26:19 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Christos Triantafyllidis
2013-11-01 10:58:55 UTC
Created attachment 818257 [details]
Replaces raise with print + sys.exit
(Ugly) patch that workarounds the issue.
Simple replaces the raise with "print + sys.exit"
I don't think virt-manager should try to intercept this error and try to guess the reason why it fails. The "RuntimeError: could not open display" error message is raised by GTK and if it has to be improved, it should definitely be done there. I am not sure we want to drop the stack-trace, I am personally inclined to keep it as it is, the stack-trace is very helpful when it comes to troubleshoot problems. All graphical applications I have tried, are affected by this problem: $ LANG=C DISPLAY= pidgin (Pidgin:20168): Gdk-CRITICAL **: IA__gdk_display_get_name: assertion `GDK_IS_DISPLAY (display)' failed Pidgin 2.10.7-3.fc19 ** (Pidgin:20168): WARNING **: cannot open display: unset $ LANG=C DISPLAY= firefox (process:20169): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed Error: cannot open display: $ LANG=C DISPLAY= chromium-browser (chromium-browser:20185): Gtk-WARNING **: cannot open display: $ LANG=C DISPLAY= gimp Cannot open display: Please reopen if you disagree with me. Cole just pushed a change that seems to have fixed this issue: commit 395a20edd82f1072d23e80ecbb25dbeed9359304 Author: Cole Robinson <crobinso> Date: Fri Nov 1 09:44:14 2013 -0400 virt-manager: Yet more fixes for DISPLAY unset error Since these days we have to import Gtk _after_ forking, _and_ Gtk doesn't raise a nice error for us, we need to postpone dropping stdio so the user has any chance of seeing the error. Also try to add an explicit error about DISPLAY again, since we don't get it from Gtk these days. It has the side effect of dropping the python trace-back you had before. Can you please confirm it? I can reproduce with # rpm -qa virt-manager virt-manager-0.9.0-19.el6.x86_64 # virt-manager Traceback (most recent call last): File "/usr/share/virt-manager/virt-manager.py", line 383, in <module> main() File "/usr/share/virt-manager/virt-manager.py", line 286, in main raise gtk_error RuntimeError: could not open display I'll try again once the new package available on rhel6. I can reproduce this issue with virt-manager-0.9.0-19.el6.x86_64 like comment5. Verify this issue with: virt-manager-0.9.0-20.el6.x86_64 python-virtinst-0.600.0-20.el6.noarch libvirt-0.10.2-29.el6_5.7.x86_64 Steps: 1. From a remote host, Connect to that host via ssh without X forwarding 2. Execute virt-manager Results: # virt-manager Unable to initialize GTK: could not open display virt-manager handle the error when it cannot open display, and python track-back did not display. So change the status from 'QN_QA' to 'VERIFIED' BTW, remove the needinfo as Christos needinfo himself, as a reporter, he should clear the bug and see the verify result. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1447.html |