Bug 1331710

Summary: Satellite 6.2 Beta: reinstalling katello-ca-consumer on RHEL7 Content Host does not restart goferd service
Product: Red Hat Satellite Reporter: Pavel Moravec <pmoravec>
Component: katello-agentAssignee: Stephen Benjamin <stbenjam>
Status: CLOSED ERRATA QA Contact: Kedar Bidarkar <kbidarka>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.0CC: bbuckingham, kbidarka, stbenjam, sthirugn, swadeley
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Reinstalling katello-ca-consumer on a RHEL 7 Content Host did not restart goferd service. Consequently, katello agent did not reconnect to Satellite. This is now fixed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 12:57:01 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:
Bug Depends On:    
Bug Blocks: 1115190    

Description Pavel Moravec 2016-04-29 10:59:24 UTC
Description of problem:
Updating SSL certificates on Satellite/Capsule, katello-ca-consumer-latest package needs to be reinstalled on Content Hosts. Post-install script of the package should automatically restart goferd service to let it reload new certificates. But this works only on RHEL[5-6], since:

rpm2cpio /var/www/html/pub/katello-ca-consumer-latest.noarch.rpm | cpio -iv --to-stdout
..

# restart goferd if it is installed and running
[ -f /etc/init.d/goferd ] && \
  service goferd status >/dev/null && \
  service goferd restart >/dev/null 2&>1

exit 0

# vim:sw=2:ts=2:et:
./usr/bin/katello-rhsm-consumer
30 blocks


RHEL7 does not have init scripts :-/


Version-Release number of selected component (if applicable):
Sat6.2 Beta Snap 9.3


How reproducible:
100%


Steps to Reproduce:
on RHEL7:
1. ps aux | grep gofer
2. yum reinstall http://satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm -y
3. ps aux | grep gofer


Actual results:
In 3., same goferd process with same PID is running


Expected results:
In 3., goferd should be restarted


Additional info:
Same bug is in 6.1 and I think *this* caused lot of redundant customer concerns "why katello agent isnt connected?" resolved by manual goferd restart..

Since change is trivial and has impact to approx. 1/3 of customers (anybody who updates certs), asking for blocker?

Comment 4 Stephen Benjamin 2016-12-13 15:12:58 UTC
Created redmine issue http://projects.theforeman.org/issues/17658 from this bug

Comment 5 Bryan Kearney 2016-12-14 19:21:32 UTC
Upstream bug assigned to stbenjam

Comment 6 Bryan Kearney 2016-12-15 23:21:25 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17658 has been resolved.

Comment 7 Kedar Bidarkar 2017-08-28 20:32:41 UTC
[root@mae-defoe ~]# ps aux | grep gofer
root      1324  0.3  5.0 1042996 51252 ?       Ssl  15:48   0:52 python /usr/bin/goferd --foreground
root     10728  0.0  0.0 112660   972 pts/0    R+   20:26   0:00 grep --color=auto gofer


[root@mae-defoe ~]# yum reinstall http://qe-rhel7.domain.redhat.com/pub/katello-ca-consumer-latest.noarch.rpm 
katello-ca-consumer-latest.noarch.rpm                    | 6.9 kB     00:00     
Examining /var/tmp/yum-root-qutUVN/katello-ca-consumer-latest.noarch.rpm: katello-ca-consumer-qe-rhel7.domain.redhat.com-1.0-1.noarch
Resolving Dependencies
--> Running transaction check
---> Package katello-ca-consumer-qe-rhel7.domain.redhat.com.noarch 0:1.0-1 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                  Arch   Version
                                       Repository                          Size
================================================================================
Reinstalling:
 katello-ca-consumer-qe-rhel7.domain.redhat.com
                          noarch 1.0-1 /katello-ca-consumer-latest.noarch  15 k

Transaction Summary
================================================================================
Reinstall  1 Package

Total size: 15 k
Installed size: 15 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : katello-ca-consumer-qe-rhel7.domain.red   1/1 
Uploading Package Profile
Default_Organization_Sat6Tools7_sat6tool7                | 2.1 kB     00:00     
rhel-7-server-rpms/7Server/x86_64                        | 2.0 kB     00:00     
Uploading Tracer Profile
  Verifying  : katello-ca-consumer-qe-rhel7.domain.red   1/1 

Installed:
  katello-ca-consumer-qe-rhel7.domain.redhat.com.noarch 0:1.0-1

Complete!
Uploading Enabled Reposistories Report
Loaded plugins: product-id


[root@mae-defoe ~]# ps aux | grep gofer
root     10774  2.7  3.1 1042996 32168 ?       Ssl  20:27   0:00 python /usr/bin/goferd --foreground
root     10801  0.0  0.0 112660   972 pts/0    R+   20:27   0:00 grep --color=auto gofer


VERIFIED With sat6.3.0 snap13.0

Comment 10 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