Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1704984

Summary: Upgrading katello-ca-consumer package revert rhsm.conf to point to CDN/RHN
Product: Red Hat Satellite Reporter: achadha
Component: RegistrationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Stephen Wadeley <swadeley>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: cyrill.naef, pdwyer, rbobek, sraut
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-07 08:49:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
fixed spec file none

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 ***