Bug 1634023
| Summary: | [RFE] - Provide a way to list the valid syspurpose values for end user | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Rehana <redakkan> |
| Component: | subscription-manager | Assignee: | Jiri Hnidek <jhnidek> |
| Status: | CLOSED ERRATA | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.0 | CC: | arpandey, candlepin-bugs, csnyder, jsefler, liliu, lmiksik, mkolman, mmatsuya, pdudley, pdwyer, peter.vreman, pvlasin, rjerrido, saydas, skallesh, swadeley, tbowling, torkil, wpoteat |
| Target Milestone: | rc | Keywords: | FutureFeature, Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-11-04 01:38:37 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: | |||
| Bug Depends On: | 1857100, 1859532 | ||
| Bug Blocks: | 1825061 | ||
|
Description
Rehana
2018-09-28 13:12:51 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. 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
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
*** Bug 1887048 has been marked as a duplicate of this bug. *** 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 *** Bug 1841156 has been marked as a duplicate of this bug. *** |