Bug 1627787

Summary: upgrade step 'remove_legacy_mongo' continues when "Running installer" failed
Product: Red Hat Satellite Reporter: Sean O'Keeffe <sokeeffe>
Component: InstallerAssignee: Chris Roberts <chrobert>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.4CC: bbuckingham, chrobert, ehelms, inecas, mbacovsk, pcreech, sghai, sokeeffe
Target Milestone: 6.4.0Keywords: Triaged, Upgrades
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: https://projects.theforeman.org/issues/24966
Fixed In Version: katello-installer-base- Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 18:58:33 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:
Description Flags
cli output
upgrade installer output none

Description Sean O'Keeffe 2018-09-11 13:13:16 UTC
Created attachment 1482367 [details]
cli output

Description of problem:

Running "foreman-maintain upgrade run --target-version 6.4 -y" 

If "Upgrade Step: Running installer..." step fails it continues with "Upgrade Step: remove_legacy_mongo..." which resulted in breaking mongo and running "satellite-installer --upgrade" failing.

When a step fails we should exit straight away 

Version-Release number of selected component (if applicable):
6.3.3 -> 6.4.beta upgrade.

Comment 2 Ivan Necas 2018-09-12 07:12:52 UTC
This step actually are not defined in the foreman-maintain, but rather in the installer hooks, most of them are defined in a way, that they are not run unless installer succeeds, but this change https://github.com/Katello/katello-installer/commit/b70dde1807e6b96c92d5f893d67e1172fd8a9722 (done as part of bz 1583233) actually made it run always.

Putting needinfo on Eric, as the original author of this changes.

I've updated the subject, as it was misleading, since this issue is not connected to foreman-maintain behaviour.

Comment 3 Eric Helms 2018-09-12 12:30:34 UTC

Can you help clarify what installation step actually failed? The full installer log may help with that.

Comment 4 Sean O'Keeffe 2018-09-12 13:01:22 UTC
Sure, We had setup SSO using --foreman-ipa-authentication=true without IPA (we are using different krb5 infra) 

Looks to be due to https://github.com/theforeman/puppet-foreman/commit/b0f88ed52539ca74cf58017d97bbb8327b083e1f#diff-0ac866172efd29d0ddc2aa75ae6f182dR74

But I don't think the reason for the failure is of much relevance for the scope of this BZ.

Comment 6 Eric Helms 2018-09-18 13:40:19 UTC
Could we get the installer log for the failure?

Comment 7 Patrick Creech 2018-09-21 13:00:55 UTC
PR not merged yet

Comment 9 pm-sat@redhat.com 2018-09-25 20:08:16 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24966 has been resolved.

Comment 11 Nikhil Kathole 2018-10-03 11:37:28 UTC

Version tested:
Satellite 6.4 snap 25

Upgrade step 'remove_legacy_mongo' not run if installer failed. (see attachment)

Comment 12 Nikhil Kathole 2018-10-03 11:39:24 UTC
Created attachment 1489938 [details]
upgrade installer output

Comment 13 Bryan Kearney 2018-10-16 18:58:33 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.