Red Hat Bugzilla – Bug 1371585
Removing katello-ca-consumer rpm should revert rhsm.conf
Last modified: 2018-08-17 12:51:01 EDT
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:
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16388 has been resolved.
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
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
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