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 1309553 - Failed to register with consumer id against SAM1.4
Summary: Failed to register with consumer id against SAM1.4
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.8
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Chris Snyder
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-18 05:53 UTC by qianzhan
Modified: 2016-05-10 20:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-10 20:40:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
katello-debug-20160218213327.tar.gz (283.26 KB, application/x-gzip)
2016-02-19 02:48 UTC, qianzhan
no flags Details
rhsm.log (16.76 KB, text/plain)
2016-02-19 02:49 UTC, qianzhan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0797 0 normal SHIPPED_LIVE python-rhsm and subscription-manager bug fix and enhancement update 2017-01-06 16:31:50 UTC

Description qianzhan 2016-02-18 05:53:41 UTC
Description of problem:
Failed to register with consumer id against SAM1.4

Version-Release number of selected component (if applicable):
subscription-manager: 1.16.8-2.el6
python-rhsm: 1.16.6-1.el6


How reproducible:
Always

Steps to Reproduce:
1. Register system against SAM1.4.
[root@dhcp-129-73 ~]# subscription-manager identity
system identity: eb31655a-afa2-4613-bc2f-a3cdd4fba44f
name: dhcp-129-73.nay.redhat.com
org name: ACME_Corporation
org ID: ACME_Corporation


2. Clean consumer certs
[root@dhcp-129-73 ~]# rm -f /etc/pki/consumer/*

3. Re-register with consumer id:
[root@dhcp-129-73 ~]# subscription-manager register --consumerid=eb31655a-afa2-4613-bc2f-a3cdd4fba44f
Registering to: samserv.redhat.com:443/sam/api
Username: admin
Password: 
'type'

4. Re-register without consumer id:
[root@dhcp-129-73 ~]# subscription-manager register
Registering to: samserv.redhat.com:443/sam/api
Username: admin
Password: 
The system has been registered with ID: 55382f25-51b6-4902-a6dd-2406923f1f66 


Actual results:
As step 3.

Expected results:
Registration with consumer id should be successful.

Additional info:

Comment 2 Barnaby Court 2016-02-18 20:55:56 UTC
Please attach the candlepin log file while this error occurred.

Comment 3 qianzhan 2016-02-19 02:48:06 UTC
Please see katello-debug info from SAM server: katello-debug-20160218213327.tar.gz

And the rhsm.log from client: rhsm.log

Comment 4 qianzhan 2016-02-19 02:48:46 UTC
Created attachment 1128401 [details]
katello-debug-20160218213327.tar.gz

Comment 5 qianzhan 2016-02-19 02:49:36 UTC
Created attachment 1128402 [details]
rhsm.log

Comment 6 Barnaby Court 2016-02-22 18:20:24 UTC
The relevant log entries from rhsm.log:

2016-02-18 19:36:46,614 [DEBUG] subscription-manager:32054 @connection.py:557 - Making request: GET /sam/api/consumers/3faa59c5-3bef-4fd0-ad34-1aaaff55fe06
2016-02-18 19:36:46,828 [DEBUG] subscription-manager:32054 @connection.py:589 - Response: status=200
2016-02-18 19:36:46,829 [WARNING] subscription-manager:32054 @connection.py:593 - Clock skew detected, please check your system time
2016-02-18 19:36:46,835 [ERROR] subscription-manager:32054 @managercli.py:174 - Error during registration: 'type'
2016-02-18 19:36:46,835 [ERROR] subscription-manager:32054 @managercli.py:175 - 'type'
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1084, in _do_command
    if consumer['type']['manifest']:
KeyError: 'type'

Comment 9 Chris Snyder 2016-02-25 22:41:39 UTC
Upon further investigation it appears that Sam 1.4 is not returning the consumer type as part of the json returned from calls to /sam/api/consumers/<consumerid>.

The PR above will allow the command to succeed even in the case the json does not include the type but that is not desirable as it would allow users of the latest subman to register as distributors (reintroducing a bug that was previously fixed).

It appears that the version of candlepin included with sam 1.4 has the necessary information as part of its model.

Christine, is there any way that sam could be filtering out the consumer type for some reason?

Comment 10 Chris Snyder 2016-03-05 07:00:48 UTC
Vritant and I have accepted the suggested fix for the time being after talking with Christine. I no longer require additional information from her for this issue.

Comment 13 qianzhan 2016-03-07 10:05:46 UTC
I will verify it when next RHEL6.8 build comes.

Comment 14 John Sefler 2016-03-08 19:20:49 UTC
(In reply to qianzhan from comment #13)
> I will verify it when next RHEL6.8 build comes.

Thank you qianzhan for verifying...  It is now available in build...

[root@jsefler-6 ~]# rpm -q subscription-manager
subscription-manager-1.16.8-4.el6.x86_64
[root@jsefler-6 ~]# rpm -q subscription-manager --changelog | grep 1309553
- 1309553: Do not fail on check for consumer["type"]["manifest"]

Comment 15 qianzhan 2016-03-09 03:27:29 UTC
Thanks for John's reminder.

I installed RHEL-6.8-20160308.0, and it's subscription version:

[root@dhcp-128-75 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 1.4.3.28-1.el6sam_splice-Headpin
subscription management rules: Unknown
subscription-manager: 1.16.8-3.el6
python-rhsm: 1.16.6-1.el6

Failed in build RHEL-6.8-20160308.0:
[root@dhcp-128-75 ~]# subscription-manager register --consumerid=eb799120-448c-4350-b0ea-27c7f0ea5162
Registering to: samserv.redhat.com:443/sam/api
Username: admin
Password: 
'type'

So still need to wait for next new build.

Comment 16 John Sefler 2016-03-09 13:52:15 UTC
My apologies to qianzhan.  The fixed package is in the nightly compose RHEL-6.8-20160308.n.0 but it is NOT in the rel-eng compose RHEL-6.8-20160308.0.  I agree that we should wait for verification in a rel-eng compose.  Thanks.

Comment 17 qianzhan 2016-03-17 03:17:40 UTC
Verified.

Version-Release number of selected component:
subscription-manager: 1.16.8-5.el6
python-rhsm: 1.16.6-1.el6

Verification:
[root@dhcp-128-48 ~]# subscription-manager register
Registering to: samserv.redhat.com:443/sam/api
Username: admin
Password: 
The system has been registered with ID: 19edb3d4-cffb-4a63-8eb4-df8858899af6 
[root@dhcp-128-48 ~]# rm -f /etc/pki/consumer/*
[root@dhcp-128-48 ~]# subscription-manager register --consumerid=19edb3d4-cffb-4a63-8eb4-df8858899af6
Registering to: samserv.redhat.com:443/sam/api
Username: admin
Password: 
The system has been registered with ID: 19edb3d4-cffb-4a63-8eb4-df8858899af6 


Moving this bug from ON_QA to VERIFIED.

Comment 19 errata-xmlrpc 2016-05-10 20:40:41 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/RHBA-2016-0797.html


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