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.
Description of problem:
After the solution for bug 1223860 was implemented, the subscription-manager config --remove=SECTION.NAME function no longer eradicates the NAME parameter from the /etc/rhsm/rhsm.conf file. Instead it restores the default value. This appears to work for all of the existing parameters except rhsm.repo_ca_cert.
Technically the default value is...
[root@jsefler-os6 ~]# grep repo_ca_cert /etc/rhsm/rhsm.conf
repo_ca_cert=%(ca_cert_dir)sredhat-uep.pem
But after running the set and remove command, the variable is lost...
[root@jsefler-os6 ~]# subscription-manager config --rhsm.repo_ca_cert=/tmp/foobar
[root@jsefler-os6 ~]# grep repo_ca_cert /etc/rhsm/rhsm.conf
repo_ca_cert=/tmp/foobar
[root@jsefler-os6 ~]# subscription-manager config --remove=rhsm.repo_ca_cert
You have removed the value for section rhsm and name repo_ca_cert.
The default value for repo_ca_cert will now be used.
[root@jsefler-os6 ~]# grep repo_ca_cert /etc/rhsm/rhsm.conf
repo_ca_cert=/etc/rhsm/ca/redhat-uep.pem
[root@jsefler-os6 ~]#
FAILED: expected repo_ca_cert=%(ca_cert_dir)sredhat-uep.pem
Version-Release number of selected component (if applicable):
[root@jsefler-os6 ~]# rpm -q subscription-manager
subscription-manager-1.14.8-1.el6.x86_64
How reproducible:
Steps to Reproduce:
1. above
Actual results:
repo_ca_cert=/etc/rhsm/ca/redhat-uep.pem
Expected results:
repo_ca_cert=%(ca_cert_dir)sredhat-uep.pem
Verifying Version...
[root@jsefler-os6 ~]# rpm -q python-rhsm subscription-manager
python-rhsm-1.14.3-1.el6.x86_64
subscription-manager-1.14.9-1.el6.x86_64
[root@jsefler-os6 ~]# grep repo_ca_cert /etc/rhsm/rhsm.conf
repo_ca_cert=%(ca_cert_dir)sredhat-uep.pem
[root@jsefler-os6 ~]# subscription-manager config --rhsm.repo_ca_cert=/tmp/foobar
[root@jsefler-os6 ~]# grep repo_ca_cert /etc/rhsm/rhsm.conf
repo_ca_cert=/tmp/foobar
[root@jsefler-os6 ~]# subscription-manager config --remove=rhsm.repo_ca_cert
You have removed the value for section rhsm and name repo_ca_cert.
The default value for repo_ca_cert will now be used.
[root@jsefler-os6 ~]# grep repo_ca_cert /etc/rhsm/rhsm.conf
repo_ca_cert=%(ca_cert_dir)sredhat-uep.pem
[root@jsefler-os6 ~]#
VERIFIED: The original default repo_ca_cert is restored after setting and removing using the config module
Additional Note...
Although the default value for rhsm.repo_ca_cert is now restored after setting and removing using the config module, the subscription-manager config --list does not report the repo_ca_cert value in brackets to indicate the Default value is in use. That is likely due to the python variable substitution for ca_cert_dir. This seems like a reasonable compromise.
[root@jsefler-os6 ~]# subscription-manager config --list | tail -20
[rhsm]
baseurl = [https://cdn.redhat.com]
ca_cert_dir = [/etc/rhsm/ca/]
consumercertdir = [/etc/pki/consumer]
entitlementcertdir = [/etc/pki/entitlement]
full_refresh_on_yum = [0]
manage_repos = [1]
pluginconfdir = [/etc/rhsm/pluginconf.d]
plugindir = [/usr/share/rhsm-plugins]
productcertdir = [/etc/pki/product]
repo_ca_cert = /etc/rhsm/ca/redhat-uep.pem <======= DEFAULT VALUE?
report_package_profile = [1]
[rhsmcertd]
autoattachinterval = [1440]
certcheckinterval = [240]
[] - Default value in use
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, 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://rhn.redhat.com/errata/RHBA-2015-1345.html