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 1021581 - list --consumed should report "" (not None) when there is no Contract or Account number
Summary: list --consumed should report "" (not None) when there is no Contract or Acco...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Carter Kozak
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel70 rhsm-rhel66
TreeView+ depends on / blocked
 
Reported: 2013-10-21 14:52 UTC by John Sefler
Modified: 2014-06-18 00:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:22:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2013-10-21 14:52:56 UTC
Description of problem:
Although I believe a Red Hat subscription should always be assigned to a Contract and Account number, if for some reason there is not one defined, then the subscription-manager list --consumed report should show an empty string for these values rather than "None".  This will make the report more consistent with other reported field values (e.g. Service Level and Status Details). 


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


How reproducible:


Steps to Reproduce:
[root@jsefler-6 ~]# subscription-manager register --serverurl=subscription.rhn.stage.redhat.com:443/subscription
Username: stage_test_12
Password: 
The system has been registered with ID: 05d4f313-bbea-4f42-ae63-c49432e9b34d 

[root@jsefler-6 ~]# subscription-manager list --available
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)
Provides:          Red Hat Beta
                   Red Hat Enterprise Linux Server
                   Red Hat Software Collections Beta (for RHEL Server)
SKU:               RH0103708
Pool ID:           8a99f98441c647900141d92a36b3020f
Available:         1000
Suggested:         1
Service Level:     PREMIUM
Service Type:      L1-L3
Multi-Entitlement: No
Ends:              12/31/2013
System Type:       Physical

Subscription Name: Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)
Provides:          Red Hat Beta
                   Red Hat Enterprise Linux Server
                   Red Hat Software Collections Beta (for RHEL Server)
SKU:               RH0103708
Pool ID:           8a99f98441c647900141d92a37d40222
Available:         3999
Suggested:         1
Service Level:     PREMIUM
Service Type:      L1-L3
Multi-Entitlement: No
Ends:              12/31/2013
System Type:       Virtual

[root@jsefler-6 ~]# subscription-manager attach --pool 8a99f98441c647900141d92a37d40222
Successfully attached a subscription for: Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)

[root@jsefler-6 ~]# rct cat-cert --no-content /etc/pki/entitlement/1906039542823594376.pem | egrep ^Order: -A20
Order:
	Name: Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)
	Number: 
	SKU: RH0103708
	Contract:            <========= NOTICE NO Contract
	Account:             <========= NOTICE NO Account
	Service Level: PREMIUM
	Service Type: L1-L3
	Quantity: 4000
	Quantity Used: 1
	Socket Limit: 8
	RAM Limit: 
	Core Limit: 
	Virt Only: True
	Subscription: 
	Stacking ID: 
	Warning Period: 0
	Provides Management: False

[root@jsefler-6 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)
Provides:          Red Hat Software Collections Beta (for RHEL Server)
                   Red Hat Enterprise Linux Server
                   Red Hat Beta
SKU:               RH0103708
Contract:          None      <========= EXPECTED to be empty
Account:           None      <========= EXPECTED to be empty
Serial:            1906039542823594376
Pool ID:           8a99f98441c647900141d92a37d40222
Active:            True
Quantity Used:     1
Service Level:     PREMIUM
Service Type:      L1-L3
Status Details:    
Starts:            12/31/2012
Ends:              12/31/2013
System Type:       Virtual




Actual results:
above

Expected results:
The subscription-manager list --consumed should not have reported "None" for Contract and Account.

Additional info:

Comment 6 Michael Stead 2013-10-23 17:29:38 UTC
When I list available, I'm seeing Contract show up as None.

[mstead@boogady subscription-manager]$ sudo subscription-manager list --avail
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)
Provides:          Red Hat Beta
                   Red Hat Enterprise Linux Server
                   Red Hat Software Collections Beta (for RHEL Server)
SKU:               RH0103708
Contract:          None             <===== RIGHT HERE
Pool ID:           8a99f98441c647900141d92a36b3020f
Available:         998
Suggested:         1
Service Level:     PREMIUM
Service Type:      L1-L3
Multi-Entitlement: No
Ends:              12/31/2013
System Type:       Physical


In the example in the description, it doesn't appear at all.

NOTE:
I've verified that this is not due to this patch.

Comment 7 Michael Stead 2013-10-23 17:31:04 UTC
Sorry, by "I've verified that this is not due to this patch." I mean, not due to patch submitted to fix this issue.

Comment 8 Carter Kozak 2013-10-23 21:03:01 UTC
commit 4454d568b3fc8f0267b4027788021eca8b02ca35
Author: ckozak <ckozak>
Date:   Mon Oct 21 10:56:40 2013 -0400

    1021581: account/contract display nothing when no data exists

Comment 9 John Sefler 2013-10-23 21:54:52 UTC
Verifying with continuous integration build...

[root@jsefler-7 ~]# rpm -q subscription-manager
subscription-manager-1.10.4-1.git.5.4454d56.el7.x86_64

[root@jsefler-7 ~]# subscription-manager register --serverurl=subscription.rhn.stage.redhat.com:443/subscription
Username: stage_test_12
Password: 
The system has been registered with ID: f5846ca6-01de-4ffc-9015-9428dfd9e4b5 
[root@jsefler-7 ~]# subscription-manager list --available
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)
Provides:          Red Hat Beta
                   Red Hat Enterprise Linux Server
                   Red Hat Software Collections Beta (for RHEL Server)
SKU:               RH0103708
Contract:          None
Pool ID:           8a99f98441c647900141d92a37d40222
Available:         3998
Suggested:         1
Service Level:     PREMIUM
Service Type:      L1-L3
Multi-Entitlement: No
Ends:              12/31/2013
System Type:       Virtual

Subscription Name: Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)
Provides:          Red Hat Beta
                   Red Hat Enterprise Linux Server
                   Red Hat Software Collections Beta (for RHEL Server)
SKU:               RH0103708
Contract:          None
Pool ID:           8a99f98441c647900141d92a36b3020f
Available:         997
Suggested:         1
Service Level:     PREMIUM
Service Type:      L1-L3
Multi-Entitlement: No
Ends:              12/31/2013
System Type:       Physical

[root@jsefler-7 ~]# subscription-manager attach --pool 8a99f98441c647900141d92a37d40222
Successfully attached a subscription for: Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)
[root@jsefler-7 ~]# rct cat-cert --no-content /etc/pki/entitlement/1486885631087957531.pem | egrep ^Order: -A20
Order:
	Name: Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)
	Number: 
	SKU: RH0103708
	Contract: 
	Account: 
	Service Level: PREMIUM
	Service Type: L1-L3
	Quantity: 4000
	Quantity Used: 1
	Socket Limit: 8
	RAM Limit: 
	Core Limit: 
	Virt Only: True
	Subscription: 
	Stacking ID: 
	Warning Period: 0
	Provides Management: False

[root@jsefler-7 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)
Provides:          Red Hat Software Collections Beta (for RHEL Server)
                   Red Hat Enterprise Linux Server
                   Red Hat Beta
SKU:               RH0103708
Contract:                                <============ VERIFIED
Account:                                 <============ VERIFIED
Serial:            1486885631087957531
Pool ID:           8a99f98441c647900141d92a37d40222
Active:            True
Quantity Used:     1
Service Level:     PREMIUM
Service Type:      L1-L3
Status Details:    
Starts:            12/31/2012
Ends:              12/31/2013
System Type:       Virtual

[root@jsefler-7 ~]#

Comment 11 Sharath Dwaral 2013-11-05 23:06:01 UTC
Version:

# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription-manager: 1.10.5-1.el7
python-rhsm: 1.10.5-1.el7


# subscription-manager register
Username: stage_testuser1
Password: 
The system has been registered with ID: a4ddacd7-f602-4477-b8d7-2016b52d3ee6 

# subscription-manager list --available
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Server Beta
Provides:          Red Hat Enterprise Linux 7 Public Beta
SKU:               RH00069
Contract:          None   ---------------------------> CHECK
Pool ID:           8a99f983422903e40142294e223e0702
Available:         20
Suggested:         1
Service Level:     Self-Support
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              12/30/2013
System Type:       Physical

Subscription Name: Red Hat Enterprise Linux Desktop Beta
Provides:          Red Hat Enterprise Linux 7 Public Beta
SKU:               RH00073
Contract:          None      ------------------------>  CHECK
Pool ID:           8a99f983422903e40142294e22e00750
Available:         20
Suggested:         1
Service Level:     Self-Support
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              12/30/2013
System Type:       Physical

Subscription Name: Red Hat Enterprise Linux Workstation Beta
Provides:          Red Hat Enterprise Linux 7 Public Beta
SKU:               RH00074
Contract:          None  ------------------------------> CHECK
Pool ID:           8a99f983422903e40142294e23350765
Available:         20
Suggested:         1
Service Level:     Self-Support
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              12/30/2013
System Type:       Physical


# rct cat-cert --no-content /etc/pki/entitlement/5128962057381115227.pem | egrep ^Order: -A20
Order:
	Name: Red Hat Enterprise Linux for Virtual Datacenters, Premium
	Number: 
	SKU: RH00001
	Contract:          --------------------->  NOTHING
	Account:           --------------------->  NOTHING
	Service Level: Premium
	Service Type: L1-L3
	Quantity: 10
	Quantity Used: 1
	Socket Limit: 2
	RAM Limit: 
	Core Limit: 
	Virt Only: False
	Subscription: 
	Stacking ID: RH00001
	Warning Period: 0
	Provides Management: False



# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux for Virtual Datacenters, Premium
Provides:          
SKU:               RH00001
Contract:          --------------------------------->  VERIFIED
Account:           --------------------------------->  VERIFIED
Serial:            5128962057381115227
Pool ID:           8a99f983422903e40142294e23bb078b
Active:            True
Quantity Used:     1
Service Level:     Premium
Service Type:      L1-L3
Status Details:    Only covers 2 of 20 sockets.
Starts:            12/31/2012
Ends:              12/30/2013
System Type:       Physical



VERIFIED

Comment 12 Ludek Smid 2014-06-13 11:22:38 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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