Description of problem: I think this is the regression of Bug #1371585. %postun will be triggered on upgrade and cause the rhsm.conf to restore back to default. ... %postun test -f /etc/rhsm/rhsm.conf.kat-backup && command cp /etc/rhsm/rhsm.conf.kat-backup /etc/rhsm/rhsm.conf <========= move the backup rhsm.conf back ... # rpm -Uvh katello-ca-consumer-lonlx80022.nomura.com-1.0-8.noarch.rpm Preparing... ################################# [100%] Updating / installing... 1:katello-ca-consumer-lonlx80022.no################################# [ 50%] Cleaning up / removing... 2:katello-ca-consumer-lonlx80022.no################################# [100%] <=========== %postun will be triggered here % egrep -i 'host|server' /etc/rhsm/rhsm.conf | egrep -v '^#' [server] hostname = subscription.rhsm.redhat.com
Created redmine issue https://projects.theforeman.org/issues/25683 from this bug
Still present in Satellite 6.5. :(
*** Bug 1704984 has been marked as a duplicate of this bug. ***
Hey Team, Any update? Is there any patch/hotfix or workaround? regards rbertol
This is the updated postun scriptlet I proposed in my support case w/RH to get this fixed -- essentially it's only reverting if it's an actual removal and not during an upgrade situation: ``` %postun if [ $1 -eq 0 ]; then test -f /etc/rhsm/rhsm.conf.kat-backup && command cp /etc/rhsm/rhsm.conf.kat-backup /etc/rhsm/rhsm.conf fi ``` I didn't try to rebuild myself so I haven't verified this to work, but it seems like it should. If you want to avoid re-building the package you could try setting the file immutable or better yet setup a yum post-transaction action to run /usr/bin/katello-rhsm-consumer to reconfigure the file whenever that package is updated.
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25683 has been resolved.
*** Bug 1683835 has been marked as a duplicate of this bug. ***
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/RHSA-2020:1454