Bug 1526612

Summary: if upgrade errors, a message to re-run upgrade manually is printed
Product: Red Hat Satellite Reporter: Chris Duryee <cduryee>
Component: Satellite MaintainAssignee: Anurag Patel <apatel>
Status: CLOSED ERRATA QA Contact: Jameer Pathan <jpathan>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3.0CC: apatel, aupadhye, bbuckingham, bkearney, cduryee, inecas, kgaikwad, mmccune, nkathole, vijsingh
Target Milestone: 6.7.0Keywords: FieldEngineering, PrioBumpField, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 12:58:36 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: 1495575    
Bug Blocks: 1496794    

Description Chris Duryee 2017-12-15 20:18:53 UTC
Description of problem:

If you run foreman-maintain to upgrade a system and the "satellite-installer --upgrade" portion fails, you will be sent back to a shell prompt with instructions to re-run "satellite-installer --upgrade". If you do this, it may work, but the system is still in maintenance mode.

Instead, if the sat-installer command fails, it should print the usual output but also print output telling the user to re-run foreman-maintain. Otherwise, the user is left in maintenance mode and it looks like the upgrade failed when they try to access Satellite in the browser.

Comment 5 Kavita 2018-09-20 07:47:15 UTC
From comment #3 and #4, marking this BZ as ON_QA to ensure that message doesn't tell to "re-run satellite-installer" in case of failure.

Comment 8 Jameer Pathan 2020-03-12 08:04:01 UTC
Verified

Verified with:
- Satellite 6.7.0 snap 14
- rubygem-foreman_maintain-0.5.2-1.el7sat.noarch

Observation:

- Didn't see foreman-maintain mentioning to re-run "satellite-installer --upgrade" command.

- file /usr/share/foreman-installer/katello/hooks/post/30-upgrade.rb had following error message code.
  else
    Kafo::Helpers.log_and_say :error, 'Upgrade failed during the installation phase. Fix the error and re-run the upgrade.'
  end
-
***********************************************************************
Upgrade Step: Running installer...
Installing             Exec[qpid-config bind queue to exchange and filter [77%] [..........................................................                  ]^C                                      [FAIL]
Failed executing LANG=en_US.utf-8 satellite-installer --upgrade, exit status 130
--------------------------------------------------------------------------------
Scenario [Migration scripts to Satellite 6.7.z] failed.

The following steps ended up in failing state:

  [installer-upgrade]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="installer-upgrade"
***********************************************************************

- Here foreman-maintain just shows which command it failed executing, here it is "satellite-installer --upgrade".
But it does not mean user have to run that command manually.

- Also "Resolve the failed steps and rerun the command." statement means user 
need to resolveissue and re-run the failed foreman-maintain command and not the satellite-installer --upgrade command.

Comment 10 errata-xmlrpc 2020-04-14 12:58:36 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-2020:1442