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 1959048 - what does 'Warning: This org does not have any subscriptions with an available "addons" is empty.' mean to the user?
Summary: what does 'Warning: This org does not have any subscriptions with an availabl...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: subscription-manager
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: beta
: 9.0 Beta
Assignee: Pino Toscano
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-10 16:05 UTC by John Sefler
Modified: 2021-12-07 21:58 UTC (History)
3 users (show)

Fixed In Version: subscription-manager-1.29.14-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-07 21:55:02 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 2634 0 None closed 1959048: improve wording for missing or empty syspurpose values 2021-06-14 12:30:51 UTC
Github candlepin subscription-manager pull 2656 0 None closed 1959048: improve wording for invalid syspurpose values 2021-06-14 12:30:52 UTC

Description John Sefler 2021-05-10 16:05:11 UTC
Description of problem:
This is a follow up to Bug 1897767 for which changes have been made in https://github.com/candlepin/subscription-manager/commit/f4d903a88422ee661dc66459305d993b892be91a

The following message will be displayed when a user tries to add a syspurpose addon value when the organization has not purchased any subscriptions that provide a syspurpose addon attribute.  In this case, there are no valid addon values to set.

[root@kvm-07-guest13 ~]# subscription-manager addons --add "EUS"
Warning: This org does not have any subscriptions with an available "addons" is empty.
addons updated.

My complaint is that this message is difficult to understand. I suggest changing the string to...

'Warning: This organization does not have any subscriptions that provide a system purpose "{attr}".  This setting will not influence auto-attaching subscriptions.'

Likewise this change also applies to "role", "usage", and "service_level_agreement".




Version-Release number of selected component (if applicable):
[root@kvm-07-guest13 ~]# rpm -q subscription-manager
subscription-manager-1.29.12-1.el9.x86_64
[root@kvm-07-guest13 ~]# rpm -q subscription-manager --changelog | grep 1897767 
- 1897767: what does 'No Valid values provided for usage' mean to the user
- 1897767: what does 'No valid values provided for usage' mean to the user


How reproducible:


Steps to Reproduce:
[root@kvm-07-guest13 ~]# subscription-manager register --serverurl=subscription.rhsm.stage.redhat.com --user=stage_bug_nosyspurpose
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: 35545647-fb71-40f7-834c-daf56642cea5
The registered system name is: kvm-07-guest13.hv2.lab.eng.bos.redhat.com

[root@kvm-07-guest13 ~]# subscription-manager addons --add "EUS"
Warning: This org does not have any subscriptions with an available "addons" is empty.
addons updated.

[root@kvm-07-guest13 ~]# subscription-manager role --set "Red Hat Enterprise Linux Server"
Warning: This org does not have any subscriptions with an available "role" is empty.
role set to "Red Hat Enterprise Linux Server".

[root@kvm-07-guest13 ~]# subscription-manager usage --set "Development/Test"
Warning: This org does not have any subscriptions with an available "usage" is empty.
usage set to "Development/Test".

[root@kvm-07-guest13 ~]# subscription-manager service-level --set "Standard"
Warning: This org does not have any subscriptions with an available "service_level_agreement" is empty.
service_level_agreement set to "Standard".


Actual results:
Warning: This org does not have any subscriptions with an available "{attr}" is empty.

Expected results:
Warning: This organization does not have any subscriptions that provide a system purpose "{attr}".  This setting will not influence auto-attaching subscriptions.

Additional info:
This string change can be made on line 214 of /usr/lib64/python3.9/site-packages/subscription_manager/cli_command/abstract_syspurpose.py



--------------------------------------------------------

Very similar to the string change above, I also recommend changing line 347 of /usr/lib64/python3.9/site-packages/subscription_manager/cli_command/abstract_syspurpose.py which affects the list commands like this...

[root@kvm-07-guest13 ~]# subscription-manager addons --list
This org does not have any subscriptions with an available "addons"

[root@kvm-07-guest13 ~]# subscription-manager role --list
This org does not have any subscriptions with an available "role"

[root@kvm-07-guest13 ~]# subscription-manager usage --list
This org does not have any subscriptions with an available "usage"

and change line 182 of /usr/lib64/python3.9/site-packages/subscription_manager/cli_command/service_level.py which affects this list command...

[root@kvm-07-guest13 ~]# subscription-manager service-level --list
This org does not have any subscriptions with an available "service level".

Actual Results
above

Expected Results
This organization does not have any subscriptions with an available "{syspurpose_attr}".
NOTICE THAT ORG IS NOT ABBREVIATED AND THE SENTENCE ENDS WITH A PERIOD

Comment 2 Rehana 2021-06-03 15:07:54 UTC
Reproducing the failure on: 
===========================
# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.18-1
subscription management rules: 5.41
subscription-manager: 1.29.12-1.el9

# subscription-manager register --serverurl=subscription.rhsm.stage.redhat.com --user=*****
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: *******
The registered system name is:**********

# subscription-manager addons --add "EUS"
Warning: This org does not have any subscriptions with an available "addons" is empty.
addons updated.

# subscription-manager role --set "Red Hat Enterprise Linux Server"
Warning: This org does not have any subscriptions with an available "role" is empty.
role set to "Red Hat Enterprise Linux Server".

# subscription-manager usage --set "Development/Test"
Warning: This org does not have any subscriptions with an available "usage" is empty.
usage set to "Development/Test".

# subscription-manager service-level --set "Standard"
Warning: This org does not have any subscriptions with an available "service_level_agreement" is empty.
service_level_agreement set to "Standard".


Pre-testing  the fix on :
==========================
# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.18-1
subscription management rules: 5.41
subscription-manager: 1.29.12-1.git.56.f6ec6a1.el9

# subscription-manager register --serverurl=subscription.rhsm.stage.redhat.com --user=******
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: *******
The registered system name is: **********

# subscription-manager addons --add "EUS"
Warning: There are no available values for the system purpose "addons" from the available subscriptions in this organization.
addons updated.

# subscription-manager role --set "Red Hat Enterprise Linux Server"
Warning: There are no available values for the system purpose "role" from the available subscriptions in this organization.
role set to "Red Hat Enterprise Linux Server".

# subscription-manager usage --set "Development/Test"
Warning: There are no available values for the system purpose "usage" from the available subscriptions in this organization.
usage set to "Development/Test".

# subscription-manager service-level --set "Standard"
Warning: There are no available values for the system purpose "service_level_agreement" from the available subscriptions in this organization.
service_level_agreement set to "Standard".

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

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

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

#  subscription-manager service-level --list
This org does not have any subscriptions with an available "service level".

^^ Notice the message is not updated for service-level --list 

Also I dont see the message " Warning: This organization does not have any subscriptions that provide a system purpose "{attr}".  This setting will not influence auto-attaching subscriptions. " when setting a bad value, instead I see 

# subscription-manager role --set=foo
Warning: There are no available values for the system purpose "role" from the available subscriptions in this organization.
role set to "foo".

Notice the text "This setting will not influence auto-attaching subscriptions" is missing . 

Moving back to New

Comment 3 Pino Toscano 2021-06-10 14:33:16 UTC
So, we had a offline conversation about this, and we thought about the following:

1) the distinction between "missing syspurpose attribute in the SKU" and "the syspurpose has no valid value" is a bit stretched, and in the end there is little value in showing different messages to the user (they cannot do anything about either, anyway)

2) the message for "service-level" was indeed missed because there is a slightly different implementation of "syspurpose command" for "service_level"

3) "This setting will not influence auto-attaching subscriptions." is only shown on --set/--add and not on --list: this is because they are an "active action" rather than a simple query

Hence, the changes (submitted upstream as [1]) are the following:

a) the message for either missing and empty syspurpose values on --set/--add becomes:
'Warning: This organization does not have any subscriptions that provide a system purpose "{attr}".  This setting will not influence auto-attaching subscriptions.'
(obviously {attr} means the actual syspurpose attribute)

b) the message for either missing and empty syspurpose values on --list (also for "service_level") becomes:
'There are no available values for the system purpose "{syspurpose_attr}" from the available subscriptions in this organization.'
(obviously {syspurpose_attr} means the actual syspurpose attribute)

[1] https://github.com/candlepin/subscription-manager/pull/2656

Comment 4 Rehana 2021-06-30 11:40:53 UTC
Pre-verifying on:
===============

# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.18-1
subscription management rules: 5.41
subscription-manager: 1.29.15-1.git.14.dcbf3e7.el9

# rpm -q subscription-manager --changelog | grep 1959048
- 1959048: improve wording for invalid syspurpose values (ptoscano)
- 1959048: improve wording for missing or empty syspurpose values

# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: stage_test_nosku
Password: 
The system has been registered with ID: *************
The registered system name is: ****

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

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

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

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

Based on the above observations , setting verified:tested.

Comment 7 Rehana 2021-07-19 09:47:32 UTC
Verifying on :
============
# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.19-1
subscription management rules: 5.41
subscription-manager: 1.29.18-1.el9

# rpm -q subscription-manager --changelog | grep 1959048
- 1959048: improve wording for invalid syspurpose values (ptoscano)
- 1959048: improve wording for missing or empty syspurpose values

# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: stage_test_nosku
Password: 
The system has been registered with ID: 79903f73-2195-49cd-b934-7614df79fe8e
The registered system name is: kvm-08-guest26.hv2.lab.eng.bos.redhat.com

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

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

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

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

Based on the above observations moving the bug to Verified!!


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