Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1371585 - Removing katello-ca-consumer rpm should revert rhsm.conf
Summary: Removing katello-ca-consumer rpm should revert rhsm.conf
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: katello-agent
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-30 14:36 UTC by Sean O'Keeffe
Modified: 2021-09-09 11:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When removing katello-ca-consumer RPM, the backup of /etc/rhsm/rhsm.conf was not restored. This is now fixed.
Clone Of:
Environment:
Last Closed: 2018-02-21 12:57:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 16388 0 Normal Closed Removing katello-ca-consumer rpm should revert rhsm.conf 2021-01-14 12:15:49 UTC
Red Hat Product Errata RHBA-2018:0338 0 normal SHIPPED_LIVE Red Hat Satellite 6.3 Tools 2018-02-21 19:30:02 UTC

Description Sean O'Keeffe 2016-08-30 14:36:13 UTC
Description of problem:
if you install the katello-ca-consumer rpm and them remove it /etc/rhsm/rhsm.conf, doesnt revert back. 
During install there is a backup created /etc/rhsm/rhsm.conf-kat-backup, we should copy this file to /etc/rhsm/rhsm.conf on removal.


Version-Release number of selected component (if applicable):
6.X

How reproducible:
100%

Steps to Reproduce:
1. ms5sum /etc/rhsm/rhsm.conf 
2. rpm -Uvh http://<SATELLITE6>/pub/katello-ca-consumer-latest.noarch.rpm
3. rpm -e katello-ca-consumer
4. ms5sum /etc/rhsm/rhsm.conf

md5sum's should match. 

Actual results:
the rhsm.conf pointing to Satellite is left after removing it

Expected results:
rhsm.conf should be restored from rhsm.conf-kat-backup

Additional info:

Comment 2 Bryan Kearney 2016-09-07 20:18:33 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16388 has been resolved.

Comment 5 Evgeni Golov 2017-08-23 09:04:37 UTC
I am not QA contact, so I am not going to officially mark this as VERIFIED, but it works as advertised in my setup (6.3.0 Snap 12):

Make a copy of the old rhsm.conf:
# cp /etc/rhsm/rhsm.conf ./rhsm.conf.orig

Install katello-ca-consumer:
# yum localinstall http://192.168.121.147/pub/katello-ca-consumer-latest.noarch.rpm

Make a copy of the modified rhsm.conf:
# cp /etc/rhsm/rhsm.conf ./rhsm.conf.katello

Remove katello-ca-consumer:
# yum erase katello-ca-consumer\*

Make a copy of the restored rhsm.conf
# cp /etc/rhsm/rhsm.conf ./rhsm.conf.new

Verify that only the modified version has a different checksum:
# md5sum rhsm.conf.*
ea0b3593f3d504b16a266d58b0f83c85  rhsm.conf.katello
625497ba8aaa66608a79c4eefd81ff09  rhsm.conf.new
625497ba8aaa66608a79c4eefd81ff09  rhsm.conf.orig

Comment 6 Nikhil Kathole 2017-12-21 09:54:24 UTC
VERIFIED

Version Tested:
Satellite-6.3 Snap 29

steps:
# md5sum /etc/rhsm/rhsm.conf
f8f5f059d09476660fab36d8b0d65367  /etc/rhsm/rhsm.conf

# rpm -Uvh http://satellite/pub/katello-ca-consumer-latest.noarch.rpm
Retrieving http://satellite/pub/katello-ca-consumer-latest.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:katello-ca-consumer-sat.################################# [100%]

# md5sum /etc/rhsm/rhsm.conf
f8b0bc5db94930e869535d146b9d2b15  /etc/rhsm/rhsm.conf

# yum erase katello-ca-consume\*
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package katello-ca-consumer-satellite.noarch 0:1.0-1 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================
 Package                                                                 Arch                  Version              Repository                Size
===================================================================================================================================================
Removing:
 katello-ca-consumer-satellite                noarch                1.0-1                installed                 15 k

Transaction Summary
===================================================================================================================================================
Remove  1 Package

Installed size: 15 k
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Erasing    : katello-ca-consumer-satellite-1.0-1.noarch                                                           1/1
  Verifying  : katello-ca-consumer-satellite-1.0-1.noarch                                                           1/1

Removed:
  katello-ca-consumer-satellite.noarch 0:1.0-1

Complete!

# md5sum /etc/rhsm/rhsm.conf
f8f5f059d09476660fab36d8b0d65367  /etc/rhsm/rhsm.conf

Comment 9 errata-xmlrpc 2018-02-21 12:57:01 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, 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-2018:0338


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