Bug 997189

Summary: Useless error messages displayed with service level errors in Firstboot
Product: Red Hat Enterprise Linux 5 Reporter: Alex Wood <awood>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 5.10CC: bkearney, jesusr, jsefler, lmiksik
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Firstboot would display useless error messages to the user causing confusion. Consequence: Users confused by the messages. Fix: Make the messages more clear. Result: User no longer confused by the error messages.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-30 23:16:09 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:
Bug Depends On:    
Bug Blocks: 840995    
Attachments:
Description Flags
A screenshot of the useless error message
none
No installed products on system.
none
Unable to auto-attach, server does not support service levels.
none
Network error
none
Unable to verify server's identity none

Description Alex Wood 2013-08-14 21:29:10 UTC
Created attachment 786711 [details]
A screenshot of the useless error message

Description of problem:
When the user hits a service level error in Firstboot, the subscription-manager module displays an error message reading "Error Subscribing" rather than its previous behavior of taking the user to a screen informing them of the error and directing them to manually subscribe.

Version-Release number of selected component (if applicable): subscription-manager-1.9.2-1


How reproducible: Always


Steps to Reproduce:
1. Move all your product certificates under /etc/pki/product to another directory.
2. Run subscription-manager clean
3. Delete /etc/sysconfig/firstboot
4. Run firstboot
5. Walk through the Red Hat Subscription Management registration process.
6. After selecting an owner (if necessary), firstboot will move to a pulsing bar as it begins the registration process.

Actual results:
An error window reading "Error subscribing"

Expected results:
The user is taken to a screen displaying the message "No installed products on system.  No need to update subscriptions at this time."

Comment 1 Alex Wood 2013-08-14 21:33:12 UTC
In the description of comment #0, I mention "when the user hits a service level error".  To be more specific, I meant whenever an error is thrown during the attempt to find a suitable service level.  This can include a ServiceLevelNotSupportedException, NoProductsException, or AllProductsCoveredException.

Comment 3 John Sefler 2013-08-14 21:45:18 UTC
Including links to scenario comments in bug 966422 that led to this bug report...
https://bugzilla.redhat.com/show_bug.cgi?id=966422#c5
https://bugzilla.redhat.com/show_bug.cgi?id=966422#c9

Comment 4 John Sefler 2013-08-15 15:46:53 UTC
This bug has been judged urgent for fix to be included in the rhel510 release.
This bug is present in subscription-manager-1.8.20-1.el5

Moving release to RHEL5 and setting blocker flags...

Comment 6 John Sefler 2013-08-16 19:40:33 UTC
Verifying Version...
[root@jsefler-5 ~]# rpm -q subscription-manager-firstboot python-rhsm
subscription-manager-firstboot-1.8.21-1.el5
python-rhsm-1.8.17-1.el5


Case NoProductsException...
[root@jsefler-5 ~]# subscription-manager config --server.hostname=subscription.rhn.stage.redhat.com
[root@jsefler-5 ~]# mv /etc/pki/product/69.pem /etc/pki/product/69.pem.bak
[root@jsefler-5 ~]# subscription-manager list --installed
No installed products to list
[root@jsefler-5 ~]# rm -f /etc/sysconfig/firstboot 
[root@jsefler-5 ~]# firstboot -r
Manually step through the firstboot registration
VERIFIED: See attached screenshot: No installed products on system.


Case ServiceLevelNotSupportedException...
The easiest way to encounter this exception during firstboot is against an older candlepin deployment (will deploy candlepin-0.5.18-1)
[root@jsefler-5 ~]# subscription-manager config --server.hostname=jsefler-f14-candlepin.usersys.redhat.com --server.port=8443 --server.prefix=/candlepin
[root@jsefler-5 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.5.18-1
subscription-manager: 1.8.21-1.el5
python-rhsm: 1.8.17-1.el5
[root@jsefler-5 ~]# mv /etc/pki/product/69.pem.bak /etc/pki/product/69.pem
[root@jsefler-5 ~]# rm -f /etc/sysconfig/firstboot
[root@jsefler-5 ~]# firstboot -r
Manually step through the firstboot registration
VERIFIED: See attached screenshot: Unable to auto-attach, server does not support service levels.


Case AllProductsCoveredException...
Could not figure out a way to encounter this exception without code alterations.  Therefore I'll pass on this verification test stating that the software is reliably designed to *not* encounter this exception.  If it did occur via some circumstance unknown to me, I believe the other verifications in this comment are sufficient confidence that this case would also be handled gracefully. 


Case from https://bugzilla.redhat.com/show_bug.cgi?id=966422#c5
[root@jsefler-5 ~]# subscription-manager clean
All local data removed
[root@jsefler-5 ~]# subscription-manager config --server.hostname=jsefler-f14-candlepin.usersys.redhat.com --server.port=8443 --server.prefix=/candlepin
[root@jsefler-5 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.8.18-1
subscription-manager: 1.8.21-1.el5
python-rhsm: 1.8.17-1.el5
[root@jsefler-5 ~]# rm -f /etc/sysconfig/firstboot
[root@jsefler-5 ~]# firstboot -r
Manually step through the firstboot registration and pause on the Organization Selection panel to stop the server.
[root@jsefler-f14-candlepin ~]# service tomcat6 stop
Stopping tomcat6:                                          [  OK  ]
Then click Forward in firstboot
VERIFIED: See attached screenshot: Network error
Click Ok
[root@jsefler-f14-candlepin ~]# service tomcat6 start
Starting tomcat6:                                          [  OK  ]
Manually step through the firstboot registration and immediately after choosing an org, stop the server.
[root@jsefler-f14-candlepin ~]# service tomcat6 stop
Stopping tomcat6:   
VERIFIED: See attached screenshot: Unable to verify server's identity
[root@jsefler-f14-candlepin ~]# service tomcat6 start
Starting tomcat6:                                          [  OK  ]


VERIFIED: Firstboot did not hang after dismissing any of the error dialogs in the test scenarios above.

Comment 7 John Sefler 2013-08-16 19:42:00 UTC
Created attachment 787448 [details]
No installed products on system.

Comment 8 John Sefler 2013-08-16 19:44:02 UTC
Created attachment 787450 [details]
Unable to auto-attach, server does not support service levels.

Comment 9 John Sefler 2013-08-16 19:45:19 UTC
Created attachment 787451 [details]
Network error

Comment 10 John Sefler 2013-08-16 19:46:25 UTC
Created attachment 787452 [details]
Unable to verify server's identity

Comment 11 John Sefler 2013-08-16 19:47:16 UTC
Moving to VERIFIED

Comment 13 errata-xmlrpc 2013-09-30 23:16:09 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.

http://rhn.redhat.com/errata/RHBA-2013-1332.html