Created attachment 752052 [details] Firstboot hung during registration Description of problem: firstboot is hung after you try to attach Instance based Subscription with quantity which is not divisible by 2 Version-Release number of selected component (if applicable): [root@shwethahostname ~]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 0.8.7-1 subscription-manager: 1.8.8-1.git.10.f718984.el6 python-rhsm: 1.8.11-1.git.1.7236cc2.el6 How reproducible: Steps to Reproduce: 1.firstboot -r 2.have only 32060.pem cert in your product folder 3.register with auto-subscribe 4.try to attach subscription with quantity not divisible by 2 Actual results: After you click ok on Error Dialogue,does not take you back or to next page,just hung in the current dialogue Expected results: Additional info:
Created attachment 752054 [details] Error dialogue
I've been unable to reproduce this issue. What version of Candlepin were you running against? Were you doing anything special to get Candlepin to report odd-numbered suggested quantities? Do you still see this issue when running against recent installations of Candlepin?
[root@shwethahostname ~]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 0.8.13-1 subscription-manager: 1.8.10-1.git.6.0f3fe84.el6 python-rhsm: 1.8.12-1.git.0.d747a65.el6 To get odd numbered quantities I subscribed 1 quantity on Virtual machine running on host and odd numbered quantities was available then. Now I get to see only even numbered quantities on firstboot ,even though there are odd numbered quantities in the list --available [root@shwethahostname ~]# subscription-manager list --avail | grep Instance -A9 Subscription Name: Awesome OS Instance Based (Standard Support) SKU: awesomeos-instancebased Pool ID: 8ac6a3a23f328aed013f328c2c76080d Quantity: 20 Service Level: Standard Service Type: L1-L3 Multi-Entitlement: Yes Ends: 06/11/2014 System Type: Physical Subscription Name: Awesome OS Instance Based (Standard Support) SKU: awesomeos-instancebased Pool ID: 8ac6a3a23f328aed013f328c2cb0081c Quantity: 9 Service Level: Standard Service Type: L1-L3 Multi-Entitlement: Yes Ends: 06/11/2014 System Type: Physical
Getting a suggested quantity that is not a multiple of the product increment should now be impossible as subscription-manager no longer does any calculation of suggested quantity. However, it is still possible to hang firstboot if you encounter errors during the registration process. I have written a patch that will return the user to the credentials screen if *any* error occurs during registration. Below is a simple procedure to test hanging firstboot. 1. $ rm /etc/sysconfig/firstboot 2. $ subscription-manager clean 2. $ firstboot 3. In the "I will register with:" field, enter the relevant information for a Candlepin server that is under your control. 4. Enter credentials for a user who must select an organization. E.g. "admin/admin" 5. You will now be on the Organization Selection screen. 6. Stop the Candlepin server that you have registered to: # service tomcat6 stop 7. Hit the Forward button on the Organization Selection screen. 8. Firstboot will display an error window. After dismissing that window, Firstboot will hang. After applying the bug fix, Firstboot should no longer hang and should instead take the user back to the credentials screen.
commit a71f18cef93a26068fa80e13ebee8ad014ddb81d Author: Alex Wood <awood> Date: Thu Jul 25 18:13:42 2013 -0400 966422: Do not hang firstboot if there is an exception during registration.
Having verified bug 966430, the circumstance that caused the hang in comment 0 (a quantity of instance based pools that is not evenly divisible by its instance multiplier) is no longer possible. Hence verification of the original comment 0 scenario is found here: https://bugzilla.redhat.com/show_bug.cgi?id=966430#c9 Comment 5 suggests another way to force an exception during firstboot registration. Testing comment 5 scenario continues to yield a hung firstboot when the candlepin server is stop just before attaching subscriptions... [root@jsefler-5 ~]# tail -f /var/log/rhsm/rhsm.log 2013-08-13 17:59:48,835 [DEBUG] @connection.py:415 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/ 2013-08-13 17:59:48,844 [WARNING] @certmgr.py:107 - Exception caught while running <subscription_manager.cache.PackageProfileLib object at 0x2accbdd4e7d0> update 2013-08-13 17:59:48,845 [ERROR] @certmgr.py:108 - Proxy connection failed: 503 Traceback (most recent call last): File "/usr/share/rhsm/subscription_manager/certmgr.py", line 100, in update updates += lib.update() File "/usr/share/rhsm/subscription_manager/certlib.py", line 68, in update return self._do_update() File "/usr/share/rhsm/subscription_manager/cache.py", line 56, in _do_update return profile_mgr.update_check(self.uep, consumer_uuid) File "/usr/share/rhsm/subscription_manager/cache.py", line 345, in update_check if not uep.supports_resource(PACKAGES_RESOURCE): File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 623, in supports_resource self._load_supported_resources() File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 610, in _load_supported_resources resources_list = self.conn.request_get("/") File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 481, in request_get return self._request("GET", method) File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 422, in _request conn.request(request_type, handler, body=body, headers=headers) File "/usr/lib64/python2.4/httplib.py", line 810, in request self._send_request(method, url, body, headers) File "/usr/lib64/python2.4/httplib.py", line 833, in _send_request self.endheaders() File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 174, in endheaders httpslib.HTTPSConnection.endheaders(self) File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders self._send_output() File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output self.send(msg) File "/usr/lib64/python2.4/httplib.py", line 652, in send self.connect() File "/usr/lib64/python2.4/site-packages/M2Crypto/httpslib.py", line 186, in connect raise socket.error, "Proxy connection failed: %d" % code error: Proxy connection failed: 503 2013-08-13 17:59:48,846 [DEBUG] @injection.py:80 - Returning instance for feature PROD_DIR 2013-08-13 17:59:48,848 [INFO] @cache.py:168 - Checking current system info against cache: /var/lib/rhsm/cache/installed_products.json 2013-08-13 17:59:48,849 [INFO] @cache.py:185 - No changes. See attachment "firstboot is hung after stopping candlepin just before attaching subscriptions"
Created attachment 786320 [details] "firstboot is hung after stopping candlepin just before attaching subscriptions" the spinner just oscillates back and forth....
Moving back to ASSIGNED/FailedQA because the scenario in comment 5 is still failing as desribed in comment 9. [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.19-1.el5 python-rhsm: 1.8.16-1.el5
The server side changes have fixed this. Closing out.
I just want to clarify that the original problem in comment 0 has been fixed and verified. The remaining problem in comment 9 should be fixed as part of bug 997189.