Bug 1704984 - Upgrading katello-ca-consumer package revert rhsm.conf to point to CDN/RHN
Summary: Upgrading katello-ca-consumer package revert rhsm.conf to point to CDN/RHN
Keywords:
Status: CLOSED DUPLICATE of bug 1619533
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Registration
Version: 6.4
Hardware: All
OS: Linux
medium
medium with 1 vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Stephen Wadeley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-01 00:09 UTC by achadha
Modified: 2023-09-07 19:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-07 08:49:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
fixed spec file (931 bytes, text/plain)
2019-05-15 09:40 UTC, Cyrill Näf
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 4392471 0 None None None 2019-09-07 20:34:42 UTC

Description achadha 2019-05-01 00:09:57 UTC
Description of problem:
While upgrading katello-ca-consumer package on the client system register to satellite, it reverts rhsm.conf to point to CDN/RHN

Version-Release number of selected component (if applicable):
katello-ca-consumer package


How reproducible:


Steps to Reproduce:
1. Create a new version of katello-ca-consumer package on satellite
2. Upgrade the same on the client, for example
# rpm -Uvh http://ssatellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm
3. Now check hostname entry in /etc/rhsm/rhsm.conf or output of command "subscription-manager config"

Actual results:
It points to CDN/RHN


Expected results:
It should point to satellite


Additional info:

Comment 4 Cyrill Näf 2019-05-15 09:38:46 UTC
In the post uninstall section is no differentiation between upgrade and removal.

According to the RPM build docs from fedora (https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#Syntax) it should look like the following lines:


...
%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
...

instead of

...
%postun
test -f /etc/rhsm/rhsm.conf.kat-backup && command cp /etc/rhsm/rhsm.conf.kat-backup /etc/rhsm/rhsm.conf
...



With that in place, it will restore the default configuration if the package gets uninstalled. If the package gets upgraded it won't do anything which is the expected behavior.

Comment 5 Cyrill Näf 2019-05-15 09:40:23 UTC
Created attachment 1568918 [details]
fixed spec file

Comment 8 Roman Bobek 2019-11-07 08:49:52 UTC
Hi all, this is a duplicate of BZ #1619533. Please attach your cases to the other one to increase visibility. I'm closing this one.
-Roman

*** This bug has been marked as a duplicate of bug 1619533 ***


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