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 1968420 - Update rhsm.conf man page with additional note duplicate entries are not honoured by subscription-manager
Summary: Update rhsm.conf man page with additional note duplicate entries are not hono...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.4
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: beta
: 8.5
Assignee: Pino Toscano
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-07 11:28 UTC by Craig Donnelly
Modified: 2021-11-10 07:54 UTC (History)
3 users (show)

Fixed In Version: subscription-manager-1.28.19-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:37:58 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 2674 0 None closed 1968420: improve description of rhsm.conf format 2021-06-28 15:30:31 UTC
Github candlepin subscription-manager pull 2681 0 None closed [1.28] 1968420: improve description of rhsm.conf format 2021-06-29 10:38:14 UTC
Red Hat Product Errata RHBA-2021:4390 0 None None None 2021-11-09 19:38:07 UTC

Description Craig Donnelly 2021-06-07 11:28:44 UTC
Description of problem:
subscription-manager will allow a user to duplicate definitions of configuration items in rhsm.conf, but ignores all but the last definition. This is mostly expected, but it does not warn the user of discarded configuration definitions.

Version-Release number of selected component (if applicable):
1.28.16-1

How reproducible:
100%

Steps to Reproduce:
1. Duplicate a config definition, such as a proxy or prefix/hostname, anything testable.
2. Run sub-man, see it only performing based on last defined variable.

An example is to set prefix twice:

# Server prefix:
prefix = /subscription
prefix = /rhsm

Now we attempt a refresh:

# subscription-manager refresh
Remote server error. Please check the connection details, or see /var/log/rhsm/rhsm.log for more information.

Log:

2021-06-07 07:24:05,831 [ERROR] subscription-manager:10096:MainThread @managercli.py:219 - Server error attempting a GET to /rhsm/consumers/2865f156-0dcb-4140-bc1c-60ae2d6f0234/certificates/serials returned status 404

Expected results:
Configuration Error: There are duplicate configuration definitions in /etc/rhsm/rhsm.conf for: prefix.
Please remove or comment duplicate items, then re-run your command.

OR

Notice: There are two entires in /etc/rhsm/rhsm.conf for: prefix.
Using last entry: '/rhsm'.

Additional info:

Comment 2 Rehana 2021-06-09 08:59:06 UTC
Based on the triage discussion , converting this bug in to a man page update.

Comment 3 Rehana 2021-07-01 14:43:49 UTC
Pre-verifying the man page update for rhsm.conf : 
==============================================
subscription-manager: 1.28.17-1.git.41.5224c70.el8

RHSM.CONF(5)                                                                                                                                                   

NAME
       rhsm.conf - Configuration file for the subscription-manager tooling

DESCRIPTION
       The rhsm.conf file is the configuration file for various subscription manager tooling. This includes subscription-manager, subscription-manager-gui, rhsmcertd, and
       virt-who.

       The format of this file is a simple INI-like structure, with keys and values inside sections. Duplicated keys in sections are not allowed, and only the last occurrence of each key is actually used. Duplicated section names are not allowed.

Comments:
========

The text "The format of this file is a simple INI-like structure, with keys and values inside sections. Duplicated keys in sections are not allowed, and only the last occurrence of each key is actually used. Duplicated section names are not allowed. "  ​was added in the rhsm.conf man page

Comment 7 Rehana 2021-07-16 10:35:14 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 1968420
- 1968420: improve description of rhsm.conf format (ptoscano)

# man rhsm.conf | grep " The format of this file" -A1 -B3
       The rhsm.conf file is the configuration file for various subscription manager tooling. This includes subscription-manager, subscription-manager-gui, rhsmcertd,
       and virt-who.

       The format of this file is a simple INI-like structure, with keys and values inside sections. Duplicated keys in sections are not allowed, and only the last
       occurrence of each key is actually used. Duplicated section names are not allowed.

^^ above section was added as a part of the bug fix. Moving the bug to Verified!!.

Comment 9 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.