Bug 1367657 - an empty error dialog message can appear in subscription-manager-gui when the server response message contains a pair of < >
Summary: an empty error dialog message can appear in subscription-manager-gui when the...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.3
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Chris Snyder
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-17 06:41 UTC by qianzhan
Modified: 2016-11-03 20:31 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 20:31:04 UTC
Target Upstream Version:


Attachments (Terms of Use)
invalid_window_blocks_registration_to_ppc64_in_GUI.png (675.98 KB, image/png)
2016-08-17 06:41 UTC, qianzhan
no flags Details
rhsm.log (21.10 KB, text/plain)
2016-08-17 06:42 UTC, qianzhan
no flags Details
foreman-debug-U57YK.tar.xz (584.36 KB, application/x-xz)
2016-09-06 05:47 UTC, qianzhan
no flags Details


Links
System ID Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1482 None None None 2016-09-07 21:52:53 UTC
Red Hat Bugzilla 1367676 None None None Never
Red Hat Product Errata RHSA-2016:2592 normal SHIPPED_LIVE Moderate: subscription-manager security, bug fix, and enhancement update 2016-11-03 12:10:42 UTC

Internal Links: 1367676

Description qianzhan 2016-08-17 06:41:07 UTC
Description of problem:
invalid_window_blocks_registration_to_ppc64_in_GUI

Version-Release number of selected component (if applicable):
subscription-manager: 1.17.10-1.el7
python-rhsm: 1.17.6-1.el7


How reproducible:
always

Steps to Reproduce:
1. Install RHEL-7.3-server-ppc64-Beta-1.0 (RHEL-7.3-20160811.0).
2. Open subscription-manager-gui.
3. Register in GUI, and an invalid window prompts.

Actual results:
As step 3.

Expected results:
Registration should succeed.

Additional info:
Please see attachments 'rhsm.log' and 'invalid_window_blocks_registration_to_ppc64_in_GUI.png'

Comment 1 qianzhan 2016-08-17 06:41:32 UTC
Created attachment 1191473 [details]
invalid_window_blocks_registration_to_ppc64_in_GUI.png

Comment 2 qianzhan 2016-08-17 06:42:36 UTC
Created attachment 1191474 [details]
rhsm.log

Comment 4 qianzhan 2016-08-19 05:50:56 UTC
The bug happened on RHEL-7.3-server-ppc64le-Beta-1.1 when register the system second time in GUI against Satellite-6.2.0-RHEL-7-20160817.0

Comment 5 Chris Snyder 2016-08-19 21:21:54 UTC
Please attach the foreman-debug output from the satellite server when this occurred.

Comment 6 qianzhan 2016-08-22 03:13:24 UTC
I tried again both on RHEL-7.3-server-ppc64le-Beta-1.1 and RHEL-7.3-server-ppc64-Beta-1.1, but this bug can not be reproduced. So close this bug As WORKSFORME. If this bug happens again, I will attach the foreman-debug output.

Comment 7 qianzhan 2016-09-06 05:44:03 UTC
This bug is reproduced with RHEL-7.3-server-ppc64-snapshot-2.0 and Satellite-6.2.0-RHEL-7-20160831.0, so reopen it. 
I ran 'foreman-debug' on satellite after this bug happened again. Please see attachment 'foreman-debug-U57YK.tar.xz'.

Comment 8 qianzhan 2016-09-06 05:47:59 UTC
Created attachment 1198066 [details]
foreman-debug-U57YK.tar.xz

Comment 9 Kevin Howell 2016-09-07 19:52:46 UTC
We see there is an issue. Can you please run `rhsm-debug system` and attach the resulting zip file? Also, if we could get access to the system in order to reproduce/validate/debug, that would be helpful.

Comment 10 Kevin Howell 2016-09-07 19:59:33 UTC
Note for dev: fix the way the GUI responds to the 500, the 500 error can be fixed with bug 1367676. Additionally, initial high priority is to validate that the error box is not a regression in 7.3.

Comment 11 Chris Snyder 2016-09-07 21:29:53 UTC
I can reproduce this by breaking my registergui.py. Specifically, inside the try block of _register_consumer of the registergui.py I place the following:
"""
raise RestlibException(404, "Problem creating unit Consumer<id=8a90c4a8568da2550156972d1aaf03bd, uuid=8e6aadbf-6d57-40b0-8dff-3e2822627425, type=system, name=ibm-p8-kvm-05-guest-01.rhts.eng.bos.redhat.com>")
"""

The issue appears to be with the way we are placing the message contained within RestlibExceptions into a GTK parsed string that already contains markup.

The following is printed to the cli when the empty dialog box appears:

"""
(subscription-manager-gui:7055): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 2 char 35: Odd character '=', expected a '>' or '/' character to end the start tag of element 'id', or optionally an attribute; perhaps you used an invalid character in an attribute name
"""


A potential fix would be to sanitize error messages received from candlepin. (Remove '<>' and friends).

Comment 12 qianzhan 2016-09-08 05:37:43 UTC
(In reply to Kevin Howell from comment #9)
> We see there is an issue. Can you please run `rhsm-debug system` and attach
> the resulting zip file? Also, if we could get access to the system in order
> to reproduce/validate/debug, that would be helpful.

This bug is not always reproduced. I tried 2 times to reproduce it, but failed today. I prefer to keep it as NEW and retest it with next RHEL7.3 build.

Comment 13 Chris Snyder 2016-09-08 14:42:56 UTC
I have a PR up that should fix this issue (linked by the github tracker). It is not always reproducible because reproducing it depends entirely on candlepin failing in the right way to give an error message to be displayed by subman that includes characters that look like markup (as above).

Comment 15 qianzhan 2016-09-14 09:49:48 UTC
I tried RHEL-7.3-server-ppc64-20160908.3 and RHEL-7.3-server-ppc64le-20160908.3 against Satellite-6.2.0-RHEL-7-20160831.0, and failed to reproduce this bug:

[root@ibm-p730-03-lp3 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.0.0.78-Unknown
subscription management rules: 5.15.2
subscription-manager: 1.17.14-1.el7
python-rhsm: 1.17.9-1.el7

So move it from ON_QA to VERIFIED. If this bug is reproduced again, I will reopen it.

Comment 17 errata-xmlrpc 2016-11-03 20:31:04 UTC
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.

https://rhn.redhat.com/errata/RHSA-2016-2592.html


Note You need to log in before you can comment on or make changes to this bug.