Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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

Summary: subscription-manager role --list shows empty string in list of valid values for role
Product: Red Hat Enterprise Linux 8 Reporter: Archana Pandey <arpandey>
Component: subscription-managerAssignee: Jiri Hnidek <jhnidek>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: medium Docs Contact:
Priority: high    
Version: 8.3CC: jhnidek, jsefler, redakkan, wpoteat
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 01:39:41 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:    
Bug Blocks: 1634023    

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