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 1857100 - subscription-manager role --list shows empty string in list of valid values for role
Summary: subscription-manager role --list shows empty string in list of valid values f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.3
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: 8.0
Assignee: Jiri Hnidek
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks: 1634023
TreeView+ depends on / blocked
 
Reported: 2020-07-15 06:44 UTC by Archana Pandey
Modified: 2020-11-04 01:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 01:39:41 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 2295 0 None closed 1857100: Do not print empty string as valid value; ENT-2634 2020-11-10 06:51:18 UTC
Red Hat Product Errata RHBA-2020:4460 0 None None None 2020-11-04 01:40:01 UTC

Description Archana Pandey 2020-07-15 06:44:43 UTC
Description of problem:
Empty string is getting listed as valid value in output of subscription-manager role --list


Version-Release number of selected component (if applicable):
[root@ibm-x3650m4-01-vm-08 ~]# 
[root@ibm-x3650m4-01-vm-08 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.1.15-1
subscription management rules: 5.40
subscription-manager: 1.27.9-1.git.1.5ce543e.el8

How reproducible:


Steps to Reproduce:

[root@ibm-x3650m4-01-vm-08 ~]# subscription-manager register --username=stage-ethel
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: ***********************
The registered system name is: ibm-x3650m4-01-vm-08.ibm2.lab.eng.bos.redhat.com
[root@ibm-x3650m4-01-vm-08 ~]# 

[root@ibm-x3650m4-01-vm-08 ~]# subscription-manager role --list
+-------------------------------------------+
               Available role
+-------------------------------------------+
 -                                           <<<<<--- here is the empty string
 - Red Hat Enterprise Linux Server
 - Red Hat Enterprise Linux Compute Node


Actual results:
Empty string getting listed as part of list of valid values for role

Expected results:
Empty string should be removed 

Additional info:

Comment 4 Archana Pandey 2020-08-07 08:00:23 UTC
Verifying Issue on latest build subscription-manager-1.27.13-1.el8.x86_64


Version-Release number of selected component (if applicable):
[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 ~]# rpm -qa subscription-manager --changelog | grep 1857100
- 1857100: Do not print empty string as valid value (jhnidek)



Verifying on unregistered system:

[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager role --list --username **** --password **** --org ****
+-------------------------------------------
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Server                          <<<<<<<<<<<<<< empty string removed
 - Red Hat Enterprise Linux Compute Node
[root@ibm-x3650m4-01-vm-14 ~]# 


Verifying on registered system:

[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager role --list
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Server                          <<<<<<<<<<<<<< empty string removed
 - Red Hat Enterprise Linux Compute Node
[root@ibm-x3650m4-01-vm-14 ~]# 


[root@ibm-x3650m4-01-vm-14 ~]# cat /var/lib/rhsm/cache/valid_fields.json
{"539e9ef8-9312-41bf-92f9-4badf077b89b": {"owner": {"id": "8a99f9a1730c204f01730f4a61131aa6", "key": "12997644", "displayName": "******", "href": "/owners/12997644"}, "systemPurposeAttributes": {"addons": [], "usage": ["Development/Test", "Production", "Disaster Recovery"], "role": ["", "Red Hat Enterprise Linux Server", "Red Hat Enterprise Linux Compute Node"], "service_level_agreement": ["Layered", "Premium", "Standard", "Self-Support"]}}}[root@ibm-x3650m4-01-vm-14 ~]# 




Actual results:
Empty string removed from list of valid values for role

Expected results:
Empty string should be removed 

Additional info:

Comment 7 errata-xmlrpc 2020-11-04 01:39:41 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


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