Bug 1462525

Summary: katello-service attempts to execute services in 'static' state, causing errors
Product: Red Hat Satellite Reporter: Chris Duryee <cduryee>
Component: PackagingAssignee: Eric Helms <ehelms>
Status: CLOSED ERRATA QA Contact: Daniel Lobato Garcia <dlobatog>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.9CC: bbuckingham, dlobatog, jcallaha
Target Milestone: UnspecifiedKeywords: FieldEngineering, PrioBumpField
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-3.4.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:51:07 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:

Description Chris Duryee 2017-06-18 13:16:25 UTC
Description of problem:

If you run katello-remove on a system, it will set the postgres service to 'static' instead of removing it.

However, if you then install a capsule on the same system, katello-service checks to see whether or not to restart a service based on the result of 'systemctl is-enabled X'. This returns 0 for 'static' services, which causes katello-service to attempt to restart postgres, which no longer exists.

Version-Release number of selected component (if applicable): 6.2.9


How reproducible: every time


Steps to Reproduce:
1. install satellite to a system
2. katello-remove
3. install capsule

Actual results: katello-service start will raise an error about postgres


Expected results: no mention of postgres in katello-service start

Comment 2 Chris Duryee 2017-06-18 13:18:54 UTC
workaround:

mv /etc/systemd/system/postgresql.service /root
systemctl daemon-reload

Comment 4 Eric Helms 2017-07-27 19:45:54 UTC
Created redmine issue http://projects.theforeman.org/issues/20431 from this bug

Comment 5 Satellite Program 2017-07-27 22:02:04 UTC
Upstream bug assigned to ehelms

Comment 6 Satellite Program 2017-07-27 22:02:07 UTC
Upstream bug assigned to ehelms

Comment 7 Satellite Program 2017-07-28 16:01:59 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20431 has been resolved.

Comment 8 Satellite Program 2017-08-03 22:02:04 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20431 has been resolved.

Comment 9 Daniel Lobato Garcia 2017-08-23 09:08:06 UTC
Verified.

Version Tested: Satellite-6.3 Snap 11

I performed the following steps to verify this issue:

  - katello-remove
  - satellite-installer (installing just a capsule)
  - katello-service start works fine, the postgresql service doesn't exist anymore

Comment 10 Bryan Kearney 2018-02-21 16:43:51 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/RHSA-2018:0336

Comment 11 Satellite Program 2018-02-21 16:51:07 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/RHSA-2018:0336