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 1973731 - unexpected error message due to an overzealous change from bug 1897767
Summary: unexpected error message due to an overzealous change from bug 1897767
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 8.5
Assignee: Pino Toscano
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks: 1973807
TreeView+ depends on / blocked
 
Reported: 2021-06-18 15:12 UTC by John Sefler
Modified: 2021-11-10 07:54 UTC (History)
2 users (show)

Fixed In Version: subscription-manager-1.28.19-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1973807 (view as bug list)
Environment:
Last Closed: 2021-11-09 19:37:58 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 2685 0 None open [1.28] 1973731: fix wording on error when listing syspurpose values 2021-06-29 04:26:49 UTC
Red Hat Product Errata RHBA-2021:4390 0 None None None 2021-11-09 19:38:07 UTC

Description John Sefler 2021-06-18 15:12:25 UTC
Description of problem:

In the following pull request for subscription-manager-1.28 (FBO RHEL-8.5), 
https://github.com/candlepin/subscription-manager/pull/2638/files#

line 904 should not have been changed
https://github.com/candlepin/subscription-manager/pull/2638/files#diff-1396e670b0ee7b2adb272b6e44cd21c4d78c0fe44c0646bf8d8faea82675cfa0L904

please revert back to print(_('Unable to get list of valid values for "{syspurpose_attr}"').format(syspurpose_attr=self.attr))

In the following scenario when bad credentials are used, the former message was the better message....

On RHEL 8.4:
[root@kvm-04-guest13 ~]# rpm -q subscription-manager
subscription-manager-1.28.13-2.el8.x86_64
[root@kvm-04-guest13 ~]# subscription-manager role --list --username=bad-username --password=password
Unable to get list of valid values for "role"

On RHEL 8.5:
[root@kvm-05-guest16 ~]# rpm -q subscription-manager
subscription-manager-1.28.17-1.el8.x86_64
[root@kvm-05-guest16 ~]# subscription-manager role --list --username=bad-username --password=password
This organization does not have any subscriptions that provide a system purpose "role.



Actual results:
This organization does not have any subscriptions that provide a system purpose "role.


Expected results:
Unable to get list of valid values for "role"
(and put a period at the end of the sentence)^


Additional info:


The same fix would also need to be made in the main branch (FBO RHEL9)....
https://github.com/candlepin/subscription-manager/commit/f4d903a88422ee661dc66459305d993b892be91a

Please revert the change on line 350
https://github.com/candlepin/subscription-manager/commit/f4d903a88422ee661dc66459305d993b892be91a#diff-0247574debe612887d14837bd63466752eda54f604cc19f9bfab9810dfe83b6aL350

Expected results:
'Unable to get list of valid values for "{syspurpose_attr}"'
(also add a period at the end of the sentence)

Comment 1 Rehana 2021-07-01 14:38:22 UTC
Reproducing bug 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.28.17-1.el8

# subscription-manager role --list --username=bad-username --password=password
This organization does not have any subscriptions that provide a system purpose "role


Pre-verifying 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.28.17-1.git.41.5224c70.el8

# subscription-manager role --list --username=bad-username --password=password
Unable to get the list of valid values for the system purpose "role".

# subscription-manager usage  --list --username=bad-username --password=password
Unable to get the list of valid values for the system purpose "usage".

# subscription-manager service-level --list --username=bad-username --password=password
Invalid username or password. To create a login, please visit https://www.redhat.com/wapps/ugc/register.html 

^^^^ Notice the messaging on "service-level" module is slightly different , opened a new Bug 1977720 to make service-level error message to be consistent with other system purpose modules.

# subscription-manager addons --list --username=bad-username --password=password
Unable to get the list of valid values for the system purpose "addons".

Based on the above observations , moving the bug to Verified:tested

Comment 5 Rehana 2021-07-16 10:31:44 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.28.19-1.el8

# rpm -qa subscription-manager --changelog | grep 1973731
- 1973731: fix wording on error when listing syspurpose values

# subscription-manager role --list --username=test --password=test
Unable to get the list of valid values for the system purpose "role".

# subscription-manager usage  --list --username=test --password=test
Unable to get the list of valid values for the system purpose "usage".

# subscription-manager service-level --list --username=test --password=test
Invalid username or password. To create a login, please visit https://www.redhat.com/wapps/ugc/register.html

# subscription-manager addons --list --username=test --password=test
Unable to get the list of valid values for the system purpose "addons".

As mentioned earlier , a separate bug has been logged to address the service-level messaging  Bug 1977720. Based on the observation, moving the bug to Verified.

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


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