Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1400326

Summary: regression in feedback when the consumer cert is corrupted
Product: Red Hat Enterprise Linux 6 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Jiri Hnidek <jhnidek>
Status: CLOSED CURRENTRELEASE QA Contact: John Sefler <jsefler>
Severity: low Docs Contact:
Priority: low    
Version: 6.9CC: csnyder, jhnidek, khowell, redakkan, skallesh
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.20.2-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-14 20:20:25 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:

Description John Sefler 2016-11-30 21:55:17 UTC
Description of problem:
While troubleshooting some subscription-manager exception handling, we revealed this regression in feedback when a consumer cert has been corrupted.  The original feedback implemented in the solution for Bug 607162 informed the user...

"Consumer identity either does not exist or is corrupted. Try register --help"

Which is accurate.  This was the behavior from subscription-manager-0.96.17-1 on RHEL62

Today with subscription-manager-1.18 on RHEL69, the less accurate feed back is...

"This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register."




Version-Release number of selected component (if applicable):
[root@jsefler-rhel6 ~]# rpm -q subscription-manager python-rhsm
subscription-manager-1.18.5-1.el6.x86_64
python-rhsm-1.18.5-1.el6.x86_64


How reproducible:


Steps to Reproduce:
[root@jsefler-rhel6 ~]# subscription-manager register --serverurl=subscription.rhsm.stage.redhat.com:443/subscription
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: qa
Password: 
The system has been registered with ID: 24d1605b-1a31-47d8-a782-56642f908504 
[root@jsefler-rhel6 ~]# 
[root@jsefler-rhel6 ~]# subscription-manager identity
system identity: 24d1605b-1a31-47d8-a782-56642f908504
name: jsefler-rhel6.usersys.redhat.com
org name: Quality Assurance
org ID: 711497
[root@jsefler-rhel6 ~]# 
[root@jsefler-rhel6 ~]# sed -i "s/CERTIFICATE/BAD CERTIFICATE/" /etc/pki/consumer/cert.pem 
[root@jsefler-rhel6 ~]# 
[root@jsefler-rhel6 ~]# subscription-manager identity
This system is not yet registered. Try 'subscription-manager register --help' for more information.
[root@jsefler-rhel6 ~]# 



Actual results:
"This system is not yet registered. Try 'subscription-manager register --help' for more information."

Expected results:
Expected stderr to tell us that it had trouble loading certificates due to corruption similar to the behavior established in Bug 607162



Additional info:
To demonstrate the original behavior ith feedback that is more accurate, I need to downgrade the packages to the released RHEL6.2 version...

[root@jsefler-rhel6 ~]# yum downgrade subscription-manager* python-rhsm* --enablerepo=released-rhel62-server --quiet --assumeyes
This system is not registered with RHN Classic or RHN Satellite.
You can use rhn_register to register.
RHN Satellite or RHN Classic support will be disabled.
warning: /etc/rhsm/rhsm.conf created as /etc/rhsm/rhsm.conf.rpmnew
[root@jsefler-rhel6 ~]# 
[root@jsefler-rhel6 ~]# rpm -q subscription-manager python-rhsm
subscription-manager-0.96.17-1.el6.x86_64
python-rhsm-0.96.15-1.el6.noarch
[root@jsefler-rhel6 ~]# 
[root@jsefler-rhel6 ~]# subscription-manager identity 
Consumer identity either does not exist or is corrupted. Try register --help
[root@jsefler-rhel6 ~]#

Comment 4 Shwetha Kallesh 2017-10-11 07:32:58 UTC
Reproducer:

[root@intel-e31225-8-3 yum]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.0.40-1
subscription management rules: 5.24.1
subscription-manager: 1.18.9-1.el6
python-rhsm: 1.18.6-1.el6

[root@intel-e31225-8-3 yum]# subscription-manager identity
system identity: 3c65be69-5edd-4b07-b154-20ba7352949d
name: intel-e31225-8-3.englab.nay.redhat.com
org name: 11343157
org ID: 11343157
[root@intel-e31225-8-3 yum]#  sed -i "s/CERTIFICATE/BAD CERTIFICATE/" /etc/pki/consumer/cert.pem 
[root@intel-e31225-8-3 yum]# subscription-manager identity
This system is not yet registered. Try 'subscription-manager register --help' for more information.

Comment 5 Shwetha Kallesh 2017-10-11 07:33:30 UTC
Preliminary Verification:

[root@hp-dl160g8-1 subscription_manager]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.0.40-1
subscription management rules: 5.24.1
subscription-manager: 1.20.2-1.el7
python-rhsm: 1.20.2-1.el7


[root@hp-dl160g8-1 subscription_manager]# subscription-manager identity
system identity: f0c56ce7-07fd-403c-b297-5acfe06a923f
name: hp-dl160g8-1.gsslab.pek2.redhat.com
org name: 11343157
org ID: 11343157
[root@hp-dl160g8-1 subscription_manager]# sed -i "s/CERTIFICATE/BAD CERTIFICATE/" /etc/pki/consumer/cert.pem 
[root@hp-dl160g8-1 subscription_manager]# subscription-manager identity
Consumer identity either does not exist or is corrupted. Try register --help