Bug 1978775

Summary: Capsule upgrade fails if goferd is disabled
Product: Red Hat Satellite Reporter: Taft Sanders <tasander>
Component: Satellite MaintainAssignee: Amit Upadhye <aupadhye>
Status: CLOSED ERRATA QA Contact: Vladimír Sedmík <vsedmik>
Severity: high Docs Contact:
Priority: high    
Version: 6.9.0CC: ahumbe, apatel, aruzicka, aupadhye, gtalreja, inecas, kgaikwad, osousa
Target Milestone: 6.10.0Keywords: PrioBumpGSS, Triaged, Upgrades
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-0.8.9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 13:48:05 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 Taft Sanders 2021-07-02 17:15:59 UTC
Description of problem:
Capsule upgrade fails if goferd service is stopped

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

How reproducible:
Every time

Steps to Reproduce:
1. Turn off goferd
2. Upgrade capsule from 6.9.2 to 6.9.3
3.

Actual results:
--------------------------------------------------------------------------------
Check whether all services are running:                               [FAIL]
Following services are not running: goferd
--------------------------------------------------------------------------------
Continue with step [Restart applicable services]? (assuming yes)
Restart applicable services:                                                    

Stopping the following service(s):                                    [FAIL]
No services found matching your parameters
--------------------------------------------------------------------------------
Rerunning the check after fix procedure
Check whether all services are running:                               [FAIL]
Following services are not running: goferd
--------------------------------------------------------------------------------


Expected results:
- goferd on capsule requirement needs to be evaluated as it is being deprecated on all Satellite hosts

- if goferd is required
-- goferd service should be included in the restart of capsule services

- if goferd is not required
-- goferd service should not be checked in the installer/upgrade process

Additional info:
if goferd is not required, steps 1 and 2 need to be removed from the Capsule update documentation:
https://access.redhat.com/documentation/en-us/red_hat_satellite/6.9/html-single/upgrading_and_updating_red_hat_satellite/index#updating_capsule_server_to_next_minor_version

Comment 1 Adam Ruzicka 2021-07-07 11:19:15 UTC
The output looks like something coming out of foreman maintain. Capsule (as a specific deployment of smart-proxy with plugins) cannot really do anything about this.

Comment 2 Amit Upadhye 2021-07-26 14:38:43 UTC
Hello,

As per the release notes the katello-agent will be deprecated in 7.0: 
https://bugzilla.redhat.com/show_bug.cgi?id=1798154
https://access.redhat.com/documentation/en-us/red_hat_satellite/6.9/html-single/release_notes
https://bugzilla.redhat.com/show_bug.cgi?id=1867774#c1

Accordingly gofer is expected to stay on 6.9 capsule?
The current implementation of the goferd feature[1] checks if package is installed. I will add the extra condition to check if its enabled and then only consider it for service actions. On 7.0 package wont be available, so wont need any specific handling.

[1] https://github.com/theforeman/foreman_maintain/blob/master/definitions/features/gofer.rb#L6

Regards,
Amit Upadhye.

Comment 3 Bryan Kearney 2021-07-27 12:02:32 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/33145 has been resolved.

Comment 4 Vladimír Sedmík 2021-08-26 11:55:37 UTC
Reproduced on Capsule 6.9.5 snap 3 with rubygem-foreman_maintain-0.7.12-1.el7sat.noarch and goferd disabled

Verified on Capsule 6.9.5 snap 3 with rubygem-foreman_maintain-0.8.10-1.el7sat.noarch from 6.10.0 snap 14:
1) upgrade check without gofer installed passed OK
2) upgrade check with gofer installed and disabled passed OK
3) upgrade check with gofer installed and running passed OK
4) upgrade run to 6.9.z with gofer installed and disabled passed OK

Running Checks before upgrading to Capsule 6.9.z
================================================================================
Check to verify no empty CA cert requests exist:                      [OK]
--------------------------------------------------------------------------------
Check whether all services are running:                               [OK]
--------------------------------------------------------------------------------
Check whether all services are running using the ping call:           [OK]
--------------------------------------------------------------------------------

Comment 5 Vladimír Sedmík 2021-08-26 12:01:20 UTC
Adding `requires_doc_text?` for doc review as mentioned in Additional info of Comment#0.

Comment 8 errata-xmlrpc 2021-11-16 13:48:05 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 (Satellite 6.10 Satellite Maintenance Release), 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-2021:4697