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 1665167 - [RFE] subscription-manager list --available and --consumed should report new roles and usage
Summary: [RFE] subscription-manager list --available and --consumed should report new ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.0
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: ---
Assignee: Jiri Hnidek
QA Contact: Red Hat subscription-manager QE Team
Michal Stubna
URL:
Whiteboard:
Depends On:
Blocks: 1737894
TreeView+ depends on / blocked
 
Reported: 2019-01-10 15:44 UTC by John Sefler
Modified: 2020-11-14 11:03 UTC (History)
9 users (show)

Fixed In Version: subscription-manager-1.25.11-1
Doc Type: Enhancement
Doc Text:
.`subscription-manager` now reports the role, usage, and add-ons values With this update, the `subscription-manager` can now display the Role, Usage, and Add-ons values for each subscription available in the current organization, which is registered to either the Customer Portal or to the Satellite. * To show the available subscriptions with the addition of Role, Usage, and Add-ons values for those subscriptions use: + ---- # subscription-manager list --available ---- * To show the consumed subscriptions including the additional Role, Usage, and Add-ons values use: + ---- # subscription-manager list --consumed ----
Clone Of:
: 1737894 (view as bug list)
Environment:
Last Closed: 2019-11-05 22:15:32 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 2105 0 'None' closed 1665167: Print roles and usage in list of subscriptions; ENT-1315 2020-10-27 06:13:07 UTC
Github candlepin subscription-manager pull 2121 0 'None' closed 1665167: list --consumed print syspurpose attributes from ent. cert; ENT-1315 2020-10-27 06:13:06 UTC
Red Hat Product Errata RHBA-2019:3561 0 None None None 2019-11-05 22:16:24 UTC

Description John Sefler 2019-01-10 15:44:40 UTC
Description of problem:

With the introduction of new SKU attributes "roles" and "usage", it would be informative to see these values reported in the list of available subscriptions.  Hence this is a request for enhancement on the existing list module.

Version-Release number of selected component (if applicable):
[root@rhsm-auto8-client2 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.3.12-1
subscription management rules: 5.30
subscription-manager: 1.23.8-12


How reproducible:


Steps to Reproduce:
[root@rhel8 ~]# subscription-manager list --available
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Server, Premium (Physical or
                     Virtual Nodes)
Provides:            dotNET on RHEL Beta (for RHEL Server)
                     Red Hat CodeReady Linux Builder for x86_64
                     ...
                     Red Hat S-JIS Support (for RHEL Server) - Extended Update
                     Support
Roles:               Red Hat Enterprise Linux Server  <======== RFE (COULD BE LONGER DUE TO CSV VALVE)
SKU:                 RH00003
Contract:            11679499
Pool ID:             8a99f9a96819add501682f9c313213b8
Provides Management: No
Available:           20
Suggested:           1
Service Level:       Premium
Service Type:        L1-L3
Usage:               Production   <============================ RFE
Subscription Type:   Instance Based
Starts:              01/08/2019
Ends:                01/07/2020
System Type:         Physical





[root@rhel8 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Server, Premium (Physical or
                     Virtual Nodes)
Provides:            dotNET on RHEL Beta (for RHEL Server)
                     Red Hat CodeReady Linux Builder for x86_64
                     ...
                     Red Hat S-JIS Support (for RHEL Server) - Extended Update
                     Support
Roles:               Red Hat Enterprise Linux Server  <======== RFE (COULD BE LONGER DUE TO CSV VALVE)
SKU:                 RH00003
Contract:            11679499
Account:             6167240
Serial:              2712133871280934690
Pool ID:             8a99f9a96819add501682f9c313213b8
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Premium
Service Type:        L1-L3
Usage:               Production   <============================ RFE
Status Details:      Subscription is current
Subscription Type:   Instance Based
Starts:              01/08/2019
Ends:                01/07/2020
System Type:         Physical

Comment 1 Jiri Hnidek 2019-06-03 15:59:32 UTC
Hi John,
why do we want to see "Usage" and "Roles" in output of: "subscription-manager list --consumed"?

I can see technical problem. Output of this command in fact dump of entitlement certificate, but entitlement certificate doesn't include any information about usage and roles.

Thanks.

BTW: it is possible to add Usage and Roles to the output of: "subscription-manager list --available".

Comment 2 Jiri Hnidek 2019-06-04 09:21:24 UTC
Hi John,
I have another question/suggestion. I think that it makes sense to add "Addons" to the output of list too. It should be easy to add it to the list of available subscriptions.

Is there any reason, why attribute "Addons" wasn't mentioned in your RFE?

Thanks,

Jiri

Comment 3 Jiri Hnidek 2019-06-14 14:36:55 UTC
I just added list of Add-ons to output of list --available and list --consumed

Comment 9 Rehana 2019-07-22 09:42:29 UTC
Verifying on :
============

1) This comment demonstrates and verifies the role/usage values in list --available and --consumed output, for testing the "Add-ons" a separate comment will be added with test data as Add-ons values are not yet added in to stage skus 

 rpm -qa subscription-manager --changelog | grep 1665167
- 1665167: syspurpose attributes in list --consumed; ENT-1315
- 1665167: Print roles and usage in list of subscriptions; ENT-1315

# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.7.2-1
subscription management rules: 5.37
subscription-manager: 1.25.12-1.el8

[root@kvm-01-guest05 ~]# subscription-manager register --auto-attach
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: stage*****
Password: 
The system has been registered with ID: b589f353-c61f-4bd5-9e16-f62651038ff8
The registered system name is: kvm-01-guest05.lab.eng.rdu2.redhat.com
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64 Beta
Status:       Subscribed

[root@kvm-01-guest05 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Beta Access
Provides:            Red Hat Enterprise Linux for Power, little endian Beta
                     Red Hat Enterprise Linux for ARM 64 Beta
                     Red Hat CodeReady Linux Builder for x86_64 Beta
                     Red Hat CodeReady Linux Builder for Power, little endian Beta
                     Red Hat Enterprise Linux for SAP HANA for Power, little endian Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for Power, little endian
                     Red Hat Enterprise Linux for x86_64 Beta
                     Red Hat CodeReady Linux Builder for ARM 64 Beta
                     Red Hat Enterprise Linux High Availability Beta
                     Red Hat CodeReady Linux Builder for IBM z Systems Beta
                     Red Hat Enterprise Linux for SAP Applications for Power, little endian Beta
                     Red Hat Enterprise Linux for Real Time Beta
                     Red Hat Enterprise Linux for IBM z Systems Beta
                     Red Hat Enterprise Linux Resilient Storage Beta
                     Red Hat Enterprise Linux for SAP Applications for IBM z Systems Beta
                     Red Hat Enterprise Linux for SAP Applications for IBM z Systems
                     Red Hat Enterprise Linux for Real Time for NFV Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for x86_64
                     Red Hat Enterprise Linux for SAP HANA for x86_64 Beta
SKU:                 RH00069
Contract:            11887281
Account:             6215951
Serial:              5992525534543248768
Pool ID:             8a99f9a66b091636016bdb5f9afe466a
Provides Management: No
Active:              True
Quantity Used:       1
Service Type:        L1-L3
Roles:                               -->> NOTICE ROLES is now listed  in the list --consumed output
Service Level:       Self-Support
Usage:                               -->> NOTICE Usage is now listed  in the list --consumed output
Add-ons:                             --->> NOTICE Add-ons is now listed  in the list --consumed output
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              Tuesday 09 July 2019
Ends:                Wednesday 08 July 2020
Entitlement Type:    Physical

^^ ITS expected to see NO values for role/usage/addon for Beta subscription 

Let's manually attach a subscription with role/usage values and verify the same 

[root@kvm-01-guest05 ~]# subscription-manager list --available
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Server (Disaster Recovery), Standard (Physical or Virtual Nodes)
Provides:            dotNET on RHEL Beta (for RHEL Server)
                     Oracle Java (for RHEL Server)
                     Red Hat Software Collections (for RHEL Server)
                     Red Hat CodeReady Linux Builder for x86_64
                     Red Hat Ansible Engine
                     Red Hat Container Images Beta
                     Red Hat Enterprise Linux Atomic Host Beta
                     Red Hat Enterprise Linux Atomic Host
                     Red Hat Container Images
                     Red Hat Developer Tools (for RHEL Server)
                     Red Hat Beta
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Enterprise Linux Server
                     Red Hat Developer Tools Beta (for RHEL Server)
                     Red Hat Enterprise Linux for x86_64
                     Red Hat Developer Toolset (for RHEL Server)
                     dotNET on RHEL (for RHEL Server)
SKU:                 RH00014
Contract:            11887272
Pool ID:             8a99f9a66b091636016bdb5f61a64607
Provides Management: No
Available:           2
Suggested:           1
Service Type:        L1-L3
Roles:               Red Hat Enterprise Linux Server
Service Level:       Standard
Usage:               Disaster Recovery
Add-ons:             
Subscription Type:   Instance Based
Starts:              Tuesday 09 July 2019
Ends:                Wednesday 08 July 2020
Entitlement Type:    Physical

Subscription Name:   Red Hat Enterprise Linux Workstation, Premium
Provides:            dotNET on RHEL (for RHEL Workstation)
                     dotNET on RHEL Beta (for RHEL Server)
                     Oracle Java (for RHEL Workstation)
                     Red Hat CodeReady Linux Builder for x86_64
                     Oracle Java (for RHEL Client)
                     Red Hat Ansible Engine
                     Red Hat Container Images Beta
                     Red Hat Container Images
                     Red Hat Beta
                     Red Hat Software Collections Beta (for RHEL Workstation)
                     Red Hat Enterprise Linux for x86_64
                     dotNET on RHEL Beta (for RHEL Workstation)
                     dotNET on RHEL (for RHEL Server)
                     Red Hat Enterprise Linux Workstation
SKU:                 RH0923296
Contract:            11887270
Pool ID:             8a99f9a66b091636016bdb5f6a4d4610
Provides Management: No
Available:           1
Suggested:           1
Service Type:        L1-L3
Roles:               Red Hat Enterprise Linux Workstation
Service Level:       Premium
Usage:               Production
Add-ons:             
Subscription Type:   Standard
Starts:              Tuesday 09 July 2019
Ends:                Wednesday 08 July 2020
Entitlement Type:    Physical


^^ NOTICE subscription-manager list --available command also now displays the system purpose attributes (roles/usage) 

[root@kvm-01-guest05 ~]# subscription-manager  attach --pool 8a99f9a66b091636016bdb5f61a64607
Successfully attached a subscription for: Red Hat Enterprise Linux Server (Disaster Recovery), Standard (Physical or Virtual Nodes)

[root@kvm-01-guest05 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Beta Access
Provides:            Red Hat Enterprise Linux for Power, little endian Beta
                     Red Hat Enterprise Linux for ARM 64 Beta
                     Red Hat CodeReady Linux Builder for x86_64 Beta
                     Red Hat CodeReady Linux Builder for Power, little endian Beta
                     Red Hat Enterprise Linux for SAP HANA for Power, little endian Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for Power, little endian
                     Red Hat Enterprise Linux for x86_64 Beta
                     Red Hat CodeReady Linux Builder for ARM 64 Beta
                     Red Hat Enterprise Linux High Availability Beta
                     Red Hat CodeReady Linux Builder for IBM z Systems Beta
                     Red Hat Enterprise Linux for SAP Applications for Power, little endian Beta
                     Red Hat Enterprise Linux for Real Time Beta
                     Red Hat Enterprise Linux for IBM z Systems Beta
                     Red Hat Enterprise Linux Resilient Storage Beta
                     Red Hat Enterprise Linux for SAP Applications for IBM z Systems Beta
                     Red Hat Enterprise Linux for SAP Applications for IBM z Systems
                     Red Hat Enterprise Linux for Real Time for NFV Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for x86_64
                     Red Hat Enterprise Linux for SAP HANA for x86_64 Beta
SKU:                 RH00069
Contract:            11887281
Account:             6215951
Serial:              5992525534543248768
Pool ID:             8a99f9a66b091636016bdb5f9afe466a
Provides Management: No
Active:              True
Quantity Used:       1
Service Type:        L1-L3
Roles:               
Service Level:       Self-Support
Usage:               
Add-ons:             
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              Tuesday 09 July 2019
Ends:                Wednesday 08 July 2020
Entitlement Type:    Physical

Subscription Name:   Red Hat Enterprise Linux Server (Disaster Recovery), Standard (Physical or Virtual Nodes)
Provides:            Red Hat Beta
                     Red Hat Enterprise Linux Atomic Host
                     Red Hat CodeReady Linux Builder for x86_64
                     Red Hat Enterprise Linux Atomic Host Beta
                     Oracle Java (for RHEL Server)
                     Red Hat Developer Tools (for RHEL Server)
                     Red Hat Container Images
                     Red Hat Container Images Beta
                     Red Hat Developer Tools Beta (for RHEL Server)
                     Red Hat Developer Toolset (for RHEL Server)
                     Red Hat Software Collections (for RHEL Server)
                     Red Hat Enterprise Linux for x86_64
                     Red Hat Software Collections Beta (for RHEL Server)
                     dotNET on RHEL (for RHEL Server)
                     dotNET on RHEL Beta (for RHEL Server)
                     Red Hat Ansible Engine
                     Red Hat Enterprise Linux Server
SKU:                 RH00014
Contract:            11887272
Account:             6215951
Serial:              6601155571073290984
Pool ID:             8a99f9a66b091636016bdb5f61a64607
Provides Management: No
Active:              True
Quantity Used:       1
Service Type:        L1-L3
Roles:               Red Hat Enterprise Linux Server
Service Level:       Standard
Usage:               Disaster Recovery
Add-ons:             
Status Details:      Subscription is current
Subscription Type:   Instance Based
Starts:              Tuesday 09 July 2019
Ends:                Wednesday 08 July 2020
Entitlement Type:    Physical

Comment 10 Rehana 2019-07-22 11:17:35 UTC
Demonstrating the "add-ons" values in list --consumed and --available with test data.

[root@kvm-01-guest05 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.7.2-1
subscription management rules: 5.37
subscription-manager: 1.25.12-1.el8

[root@kvm-01-guest05 ~]# subscription-manager list --installed ; subscription-manager  attach --auto
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   SP Server Bits
Product ID:     99000
Version:        3.11
Arch:           x86_64
Status:         Not Subscribed
Status Details: Not supported by a valid subscription.
Starts:         
Ends:           

Product Name:   SP Addon 1 bits
Product ID:     99003
Version:        3.11
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         Sunday 21 July 2019
Ends:           Monday 20 July 2020

Installed Product Current Status:
Product Name: SP Server Bits
Status:       Subscribed

Product Name: SP Addon 1 bits
Status:       Subscribed

[root@kvm-01-guest05 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   SP Smart Management (A: ADDON1)
Provides:            SP Addon 1 bits
SKU:                 sp-with-addon-1
Contract:            0
Account:             12331131231
Serial:              2184796757802923777
Pool ID:             8ac6a39d6c193784016c193c60190921
Provides Management: Yes
Active:              True
Quantity Used:       1
Service Type:        
Roles:               
Service Level:       
Usage:               
Add-ons:             ADDON1    ---> Notice the add-ons value
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              Sunday 21 July 2019
Ends:                Monday 20 July 2020
Entitlement Type:    Physical

Subscription Name:   SP Starter Pack (S: Premium, R: SP Starter)
Provides:            SP Starter Pack Bits
                     SP Server Bits
SKU:                 sp-starter-pack
Contract:            0
Account:             12331131231
Serial:              7048627009469374248
Pool ID:             8ac6a39d6c193784016c193c584c0852
Provides Management: Yes
Active:              True
Quantity Used:       1
Service Type:        L1-L3
Roles:               SP Starter
Service Level:       Premium
Usage:               
Add-ons:             
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              Sunday 21 July 2019
Ends:                Monday 20 July 2020
Entitlement Type:    Physical

[root@kvm-01-guest05 ~]# subscription-manager list --available --match-installed
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   SP Smart Management (A: ADDON1)
Provides:            SP Addon 1 bits
SKU:                 sp-with-addon-1
Contract:            1
Pool ID:             8ac6a39d6c193784016c193c3bca051d
Provides Management: Yes
Available:           10
Suggested:           1
Service Type:        
Roles:               
Service Level:       
Usage:               
Add-ons:             ADDON1   ---> Notice the add-ons value
Subscription Type:   Standard
Starts:              Sunday 21 July 2019
Ends:                Monday 20 July 2020
Entitlement Type:    Physical

Subscription Name:   SP Smart Management (A: ADDON1)
Provides:            SP Addon 1 bits
SKU:                 sp-with-addon-1
Contract:            0
Pool ID:             8ac6a39d6c193784016c193c60190921
Provides Management: Yes
Available:           5
Suggested:           1
Service Type:        
Roles:               
Service Level:       
Usage:               
Add-ons:             ADDON1
Subscription Type:   Standard
Starts:              Sunday 21 July 2019
Ends:                Monday 20 July 2020
Entitlement Type:    Physical

# subscription-manager list --available --all | grep "ADDON"
Subscription Name:   SP Addon 2 (A: ADDON2)
Add-ons:             ADDON2
Subscription Name:   SP Addon 3 (S: Premium, R: SP Server,SP Starter, A: ADDON3)
Add-ons:             ADDON3
Subscription Name:   SP Smart Management (A: ADDON1)
Add-ons:             ADDON1
Subscription Name:   SP Addon 3 (S: Premium, R: SP Server,SP Starter, A: ADDON3)
Add-ons:             ADDON3
Subscription Name:   SP Addon 2 (A: ADDON2)
Add-ons:             ADDON2
Subscription Name:   SP Smart Management (A: ADDON1)
Add-ons:             ADDON1

Comment 11 Rehana 2019-07-22 11:19:41 UTC
Based on the observations on comment 9 and comment 10 , moving the bug to verified

Comment 13 errata-xmlrpc 2019-11-05 22:15:32 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://access.redhat.com/errata/RHBA-2019:3561


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