Bug 1897767

Summary: what does 'No valid values provided for "usage"' mean to the user?
Product: Red Hat Enterprise Linux 8 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.3CC: arpandey, cdonnell, ptoscano, redakkan
Target Milestone: rcKeywords: EasyFix, Triaged
Target Release: 8.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.28.19-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 19:37:35 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:

Description John Sefler 2020-11-14 05:44:43 UTC
Description of problem:
This is a bug request to improve the feedback message and consistency when trying to list available usage|role|addons|service-level as suggested by the help...

[root@kvm-02-guest10 ~]# subscription-manager usage --help | grep -- --list
  --list                list all usage available

[root@kvm-02-guest10 ~]# subscription-manager role --help | grep -- --list
  --list                list all role available

[root@kvm-02-guest10 ~]# subscription-manager addons --help | grep -- --list
  --list                list all addons available

[root@kvm-02-guest10 ~]# subscription-manager service-level --help | grep -- --list
  --list                list all service_level_agreement available

Notice above that the help information for --list is rather consistent and describes that it's function is to list available values - not "provide" values.


Version-Release number of selected component (if applicable):
[root@kvm-02-guest10 ~]# rpm -q subscription-manager
subscription-manager-1.28.5-1.el8.x86_64


How reproducible:
When using a new account that has no subscriptions available....


Steps to Reproduce:
[root@kvm-02-guest10 ~]# subscription-manager usage --list --username=stage_newuser --password=REDACTED --org=13056508
No valid values provided for "usage"

[root@kvm-02-guest10 ~]# subscription-manager role --list --username=stage_newuser --password=REDACTED --org=13056508
No valid values provided for "role"

[root@kvm-02-guest10 ~]# subscription-manager addons --list --username=stage_newuser --password=REDACTED --org=13056508
No valid values provided for "addons"

[root@kvm-02-guest10 ~]# subscription-manager service-level --list --username=stage_newuser --password=REDACTED --org=13056508
This org does not have any subscriptions with service levels.

Notice above that the feedback when listing available values is not consistent and uses the word "provided" which is confusing from the perspective of the user who is trying to list "available" values.

Actual results:
  No valid values provided for "usage"
  No valid values provided for "role"
  No valid values provided for "addons"
  This org does not have any subscriptions with service levels.
                  
Proposed results:
  This org does not have any subscriptions with an available "usage".
  This org does not have any subscriptions with an available "role".
  This org does not have any subscriptions with an available "addons".
  This org does not have any subscriptions with an available "service-level".


Additional info:

Comment 2 Tiffany Merry 2021-04-28 16:12:28 UTC
PR for subscription-manager-1.28:  https://github.com/candlepin/subscription-manager/pull/2612

Comment 3 John Sefler 2021-05-10 16:14:33 UTC
This bug FailedQA in comment 1 because the fix did not yet land in subscription-manager-1.28 from comment 2.  However, I would still argue that this bug will still failQA because the actual results will be missing a trailing period to complete the sentence.

Nevertheless, I suggest resolving new Bug 1959048 which manipulates the same strings and then using this bugzilla to backport/cherry-pick the fix back to subscription-manager-1.28 for the benefit of RHEL-8.5.

Comment 10 Rehana 2021-07-16 10:49:13 UTC
# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.19-1
subscription management rules: 5.41
subscription-manager: 1.28.19-1.el8

# rpm -q subscription-manager --changelog | grep 1897767
- 1897767: improve wording for invalid syspurpose values (ptoscano)
- 1897767: improve wording for missing or empty syspurpose values
- 1897767: what does 'No valid values provided for usage' mean to the user for

# subscription-manager usage --list --username=***** --password=****
There are no available values for the system purpose "usage" from the available subscriptions in this organization.

# subscription-manager role --list --username=***** --password=****
There are no available values for the system purpose "role" from the available subscriptions in this organization.

# subscription-manager service-level --list --username=***** --password=****
There are no available values for the system purpose "service_level" from the available subscriptions in this organization.

# subscription-manager addons --list --username=***** --password=****
There are no available values for the system purpose "addons" from the available subscriptions in this organization.

Based on the above observation , moving the bug to Verified!!

Comment 13 errata-xmlrpc 2021-11-09 19:37:35 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-2021:4390