Hide Forgot
+++ This bug was initially created as a clone of Bug #1390420 +++ Description of problem: When I try to register to stage server,failed both in CLI and GUI Version-Release number of selected component (if applicable): python-rhsm-1.17.9-1.el7.x86_64 python-rhsm-certificates-1.17.9-1.el7.x86_64 subscription-manager-1.17.15-1.el7.x86_64 subscription-manager-gui-1.17.15-1.el7.x86_64 subscription-manager-initial-setup-addon-1.17.15-1.el7.x86_64 How reproducible: always Steps to Reproduce: 1.Install build RHEL-7.3-20161019.0 2.Try to register in CLI with valid account information : (new_test/redhat/7967630) [root@dhcp-128-214 ~]# subscription-manager register Registering to: subscription.rhsm.stage.redhat.com:443/subscription Username: new_test Password: Organization: 7967630 'idCert' 3.Try to register in GUI #subscription-manager-gui 4.Input valid account and password,then click 'Register' button Actual results: CLI: return 'idCert'.Then manually check the system has not been registered GUI: after click 'Register' button,stay in the window "Registering" for a long time Expected results: Register successfully both in CLI and GUI Additional info: --- Additional comment from Wei Liu on 2016-10-31 23:08 EDT --- --- Additional comment from Wei Liu on 2016-10-31 23:10 EDT --- --- Additional comment from Chris Snyder on 2016-11-07 10:27:02 EST --- Wei, Can we please see more of the rhsm log showing the entire registration process. You may need to edit your rhsm.conf default_log_level to 'DEBUG'. Candlepin devs, We suspect this was the result of maintenance done on stage. If so this is a temporary failure. We need to investigate if there is any case in CP that could cause a successful http return code but not include the 'idCert' property.
The purpose of this bug is to investigate subman's handling of errors in the response from CP. In the case of missing keys we should not fail in the manner above. Instead we should present some more useful error message. It might be difficult to actually repro the root cause. A suggestion is to use mitmproxy to remove the 'idCert' property from the response. mitmproxy can be pip installed. For more info see http://mitmproxy.org/ (Or khowell).
Note to dev: let's add some defensive coding to two code paths: 1) in `RegisterCommand._determine_owner_key`, check that `owners` as returned by `cp.getOwnerList` is indeed a list (since it comes from http://www.candlepinproject.org/swagger/?url=candlepin/swagger-2.0.13.json#!/owners/list). If it is not, we should raise an error to indicate an issue with the server. 2) similar check to (1) should happen in registergui.py (OrganizationScreen). 3) in `managerlib.persist_consumer_cert`, check that `consumer` as does have `idCert` key. If it does not, we should raise an error to indicate an issue with the server.
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available. The official life cycle policy can be reviewed here: http://redhat.com/rhel/lifecycle This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL: https://access.redhat.com/
Still a valid request for subscription-manager generally. We'll look at it for RHEL7.
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.