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 1634023 - [RFE] - Provide a way to list the valid syspurpose values for end user
Summary: [RFE] - Provide a way to list the valid syspurpose values for end user
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
unspecified
high
Target Milestone: rc
: ---
Assignee: Jiri Hnidek
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
: 1841156 1887048 (view as bug list)
Depends On: 1857100 1859532
Blocks: 1825061
TreeView+ depends on / blocked
 
Reported: 2018-09-28 13:12 UTC by Rehana
Modified: 2023-12-15 16:10 UTC (History)
19 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: The subscription-manager CLI tool now has the ability to list available values for all system purpose attributes (role, usage, addons* and service-level) of a user's organization. While this capability was already implemented for service-level, it is now possible for role, usage and addons* using the --list option. When a system is registered, simply use following syntax: [root@localhost ~]# subscription-manager usage --list +-------------------------------------------+ Available usage +-------------------------------------------+ - Production - Development When the system is not registered, then it is necessary to provide authentication options --username --password and --org as follows: [root@localhost ~]# subscription-manager usage --list --username user@redhat.com --password secret --org 12345678 +-------------------------------------------+ Available usage +-------------------------------------------+ - Production - Development When a user tries to set a non-available value, then subscription-manager will print a warning. Keep in mind that subscription-manager will still set the value despite the printed warning as shown here: [root@localhost ~]# subscription-manager usage --set=Foo Warning: Provided value "Foo" is not included in the list of valid values - Production - Development usage set to "Foo". Likewise when the system is not registered and the user tries to set a non-available value while passing credentials, a warning will also be displayed and the value of the system purpose attribute value will still be set: [root@localhost ~]# subscription-manager usage --set=Foo --username user@redhat.com --password secret --org 12345678 Warning: Provided value "Foo" is not included in the list of valid values - Production - Development usage set to "Foo". Caution: While setting invalid system purpose attribute values is still possible, the warning messages are only printed when the user has already registered or has provided authentication options. Reason: This new feature will improve user experience with setting system purpose values. Result: This new feature will reduce the probability of setting an unavailable system purpose attribute. Note: * Please note that the following release note on addons option is still true. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/8.1_release_notes/index#known-issue_subscription-management
Clone Of:
Environment:
Last Closed: 2020-11-04 01:38:37 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1632283 0 high CLOSED [RFE] subscription-manager and syspurpose should warn when setting a role, addon, usage, or SLA not available for the or... 2023-12-15 16:10:35 UTC
Red Hat Product Errata RHBA-2020:4460 0 None None None 2020-11-04 01:38:57 UTC

Internal Links: 1632283

Description Rehana 2018-09-28 13:12:51 UTC
Description of problem:
Currently there is no way for user to know the valid syspurpose attribute values once the anaconda gui installer screen is past.

Version-Release number of selected component (if applicable):
subscription management server: 2.3.9-1
subscription management rules: 5.26
subscription-manager: 1.23.6-1.el8


How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:
There is no way for user to know the  valid syspurpose values in order to have a successful auto-attach experience

Expected results:
Request to provide a option to list the valid syspurpose values and there by reducing the number of wrong syspurpose value request to server

Additional info:

Comment 2 John Sefler 2018-09-28 13:34:05 UTC
Note that this RFE complements RFE Bug 1632283 and will help improve the customer experience...

As a user who tries to set a system purpose value and is warned (from RFE Bug 1632283) that the value is invalid, now I want a way to list the available valid syspurpose values.

Comment 7 Archana Pandey 2020-07-28 10:59:41 UTC
Preliminary verification for listing valid syspurpose values on the scratch build is completed.

following are the results for preliminary testing of newly added options for sub-man role/usage/addons commands-

[root@ibm-x3650m4-01-vm-16 /]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.1.16-1
subscription management rules: 5.40
subscription-manager: 1.27.10-1.git.4.52c790a.el8

Before Registration:

Verifying –org –username –password –list options

[root@localhost /]# subscription-manager role --list 
Error: you must register or specify --username and --password to list role

[root@localhost /]# subscription-manager role --list --username=stage-ethel --password=****** 
Organization: 12997644
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Server
 - Red Hat Enterprise Linux Compute Node
[root@localhost /]#

[root@localhost /]# subscription-manager role --list --username=stage-ethel --password=****** --org=12997644
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Server
 - Red Hat Enterprise Linux Compute Node

[root@localhost /]# subscription-manager usage --list --username=stage-ethel --password=****** --org=12997644
+-------------------------------------------+
               Available usage
+-------------------------------------------+
 - Development/Test
 - Production

[root@localhost /]# subscription-manager addons --list --username=stage-ethel --password=****** --org=12997644
No valid values provided for "addons"
[root@localhost /]# 


proxy tests: proxy set in rhsm.conf

[root@ibm-x3650m4-01-vm-16 /]# subscription-manager  role --list --username=stage-ethel --password=I***** --org=12997644
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Server
 - Red Hat Enterprise Linux Compute Node

[root@ibm-x3650m4-01-vm-16 /]# subscription-manager  role --list --username=stage-ethel --password=***** --org=12997644 --proxy=auto-services.usersys.redhat.com:3127 --proxyuser **** --proxypassword ****
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Server
 - Red Hat Enterprise Linux Compute Node

[root@ibm-x3650m4-01-vm-16 /]# subscription-manager  role --list --username=stage-ethel --password=**** --org=12997644 --proxy=auto-services.usersys.redhat.com:3129
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Server
 - Red Hat Enterprise Linux Compute Node

=====================================================================

After registration:


[root@localhost /]# subscription-manager role --list
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Server
 - Red Hat Enterprise Linux Compute Node
[root@localhost /]# subscription-manager usage --list
+-------------------------------------------+
               Available usage
+-------------------------------------------+
 - Development/Test
 - Production
[root@localhost /]# subscription-manager addons --list
No valid values provided for "addons"
[root@localhost /]# 

--show option 

[root@localhost /]# subscription-manager role --show 
Current Role: Red Hat Enterprise Linux Server

[root@localhost /]# subscription-manager usage --show 
Current Usage: Production

[root@localhost /]# subscription-manager addons --show
Addons not set.
[root@localhost /]# 

verifying bash completion:

[root@localhost /]# subscription-manager role -
-h               --noproxy        --proxy          --set            --unset
--help           --org            --proxypassword  --show           --username
--list           --password       --proxyuser      --token    
      
[root@localhost /]# subscription-manager usage -
-h               --noproxy        --proxy          --set            --unset
--help           --org            --proxypassword  --show           --username
--list           --password       --proxyuser      --token          

[root@localhost /]# subscription-manager addons -
--add            --list           --password       --proxyuser      --token
-h               --noproxy        --proxy          --remove         --unset
--help           --org            --proxypassword  --show           --username

Tests with proxy optional
proxy set in rhsm.conf
[root@ibm-x3650m4-01-vm-16 build]# subscription-manager  role --list
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Server
 - Red Hat Enterprise Linux Compute Node

proxy on cli

[root@ibm-x3650m4-01-vm-16 build]# subscription-manager  role --list --proxy=auto-services.usersys.redhat.com:3129
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Server
 - Red Hat Enterprise Linux Compute Node

[root@ibm-x3650m4-01-vm-16 /]# subscription-manager  role --list --proxy=auto-services.usersys.redhat.com:3127 --proxyuser ***** --proxypassword ****
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Server
 - Red Hat Enterprise Linux Compute Node

Comment 11 Archana Pandey 2020-08-07 14:11:53 UTC
Verifying feature on latest build subscription-manager-1.27.13-1.el8.x86_64

[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.1.16-1
subscription management rules: 5.40
subscription-manager: 1.27.13-1.el8
[root@ibm-x3650m4-01-vm-14 ~]#

Verification on unregistered machine:

role  :
Test aims to verify that subscription-manager role –list returns error for missing options values  –username –password and –org , on unregistered system
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager role --list
Error: you must register or specify --username and --password to list role

Test aims to verify that subscription-manager role –list successfully returns a list of valid roles when correct values for –username –password and –org is provided, on unregistered system
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager role --list --username stage-ethel --password ****** --org 12997644
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Workstation
 - Red Hat Enterprise Linux Server
- Red Hat Enterprise Linux Compute Node

Test aims to verify that subscription-manager role –list successfully returns a list of valid roles when correct values for –username –password and –org is provided, on unregistered system with valid proxy on CLI
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager role --list --username stage-ethel --password ****** --org 12997644 --proxy auto-services.usersys.redhat.com:3129
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Workstation
 - Red Hat Enterprise Linux Server
- Red Hat Enterprise Linux Compute Node

Test aims to verify that subscription-manager role –list  returns error on unregistered system with invalid proxy on CLI
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager role --list --username stage-ethel --password ****** --org 12997644 --proxy auto-services.usersys.redhat.redhat.com:3129
Proxy connection failed, please check your settings.

Above tests repeated for usage command:
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager usage --list
Error: you must register or specify --username and --password to list usage

[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager usage --list --username stage-ethel --password ****** --org 12997644
+-------------------------------------------+
               Available usage
+-------------------------------------------+
 - Development/Test
 - Production
 - Disaster Recovery
[root@ibm-x3650m4-01-vm-14 ~]# 
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager usage --list --username stage-ethel --password ****** --org 12997644 --proxy auto-services.usersys.redhat.com:3129
+-------------------------------------------+
               Available usage
+-------------------------------------------+
 - Development/Test
 - Production
- Disaster Recovery

addons:
oot@ibm-x3650m4-01-vm-14 ~]# subscription-manager addons --list 
Error: you must register or specify --username and --password to list addons

[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager addons --list --username stage-ethel --password ****** --org 12997644 --proxy auto-services.usersys.redhat.com:3129
No valid values provided for "addons"

[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager addons --list --username stage-ethel --password ****** --org 12997644 
No valid values provided for "addons"


Verification on registered  machine:
role :
Test aims to verify that subscription-manager role –list successfully returns a list of valid roles, on registered system
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager role --list
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Workstation
 - Red Hat Enterprise Linux Server
- Red Hat Enterprise Linux Compute Node

Test aims to verify that subscription-manager role –list successfully returns a list of valid roles with authproxy on CLI, on registered system
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager  role --list --proxy=auto-services.usersys.redhat.com:3127 --proxyuser **** --proxypassword *****
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Workstation
 - Red Hat Enterprise Linux Server
 - Red Hat Enterprise Linux Compute Node

tests repeated for usage and addons below
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager usage –list
+-------------------------------------------+
               Available usage
+-------------------------------------------+
 - Development/Test
 - Production
- Disaster Recovery

[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager  usage --list --proxy=auto-services.usersys.redhat.com:3127 --proxyuser redhat --proxypassword redhat
+-------------------------------------------+
               Available usage
+-------------------------------------------+
 - Development/Test
 - Production
 - Disaster Recovery

no-auth proxy
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager  usage --list --proxy=auto-services.usersys.redhat.com:3129
+-------------------------------------------+
               Available usage
+-------------------------------------------+
 - Development/Test
 - Production
 - Disaster Recovery 

Test aims to verify that subscription-manager addons –list successfully returns a list of valid roles, on registered system
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager addons --list
No valid values provided for "addons"

Results: Functionality verified

Comment 13 Chris Snyder 2020-10-13 14:04:07 UTC
*** Bug 1887048 has been marked as a duplicate of this bug. ***

Comment 15 errata-xmlrpc 2020-11-04 01:38:37 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 (subscription-manager bug fix and enhancement update), 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-2020:4460

Comment 16 Rehana 2021-02-19 10:29:16 UTC
*** Bug 1841156 has been marked as a duplicate of this bug. ***


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