Bug 1880637

Summary: [6.8] satellite-installer always runs upgrade steps
Product: Red Hat Satellite Reporter: Mike McCune <mmccune>
Component: InstallationAssignee: Amit Upadhye <aupadhye>
Status: CLOSED ERRATA QA Contact: Devendra Singh <desingh>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: aupadhye, egolov, ehelms
Target Milestone: 6.8.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-0.6.13, foreman-installer-2.1.2.7,foreman-installer-2.1.2.7-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 13:09:06 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 Mike McCune 2020-09-18 20:37:52 UTC
Satellite 6.8 and later has integrated upgrade checks that determines when the 'upgrade steps' should be run. Previous versions had the user needing to pass in the --upgrade flag to kick off the upgrade steps.


With 6.8, they appear to be run every time, which can take considerably longer than a standard run, especially in a customer environment:

# satellite-installer 
Package versions are locked. Continuing with unlock.
Preparing installation Done                                              
Executing: foreman-rake upgrade:run
=============================================
Upgrade Step 1/3: katello:correct_repositories. This may take a long while.
Processing Repository 1/1: repo1 (1)

=============================================
Upgrade Step 2/3: katello:correct_puppet_environments. This may take a long while.
=============================================
Upgrade Step 3/3: katello:clean_backend_objects. This may take a long while.
0 orphaned consumer id(s) found in candlepin.
Candlepin orphaned consumers: []
0 orphaned consumer id(s) found in pulp.
Pulp orphaned consumers: []
foreman-rake upgrade:run finished successfully!
...


# satellite-installer 
Package versions are locked. Continuing with unlock.
Preparing installation Done                                              
Executing: foreman-rake upgrade:run
=============================================
Upgrade Step 1/3: katello:correct_repositories. This may take a long while.
Processing Repository 1/1: repo1 (1)

=============================================
Upgrade Step 2/3: katello:correct_puppet_environments. This may take a long while.
=============================================
Upgrade Step 3/3: katello:clean_backend_objects. This may take a long while.
0 orphaned consumer id(s) found in candlepin.
Candlepin orphaned consumers: []
0 orphaned consumer id(s) found in pulp.
Pulp orphaned consumers: []
foreman-rake upgrade:run finished successfully!
...

Comment 4 Mike McCune 2020-09-21 16:05:20 UTC
Split out the comment #2 into a new bz:

https://bugzilla.redhat.com/show_bug.cgi?id=1881150

Comment 5 Bryan Kearney 2020-09-22 16:03:23 UTC
Upstream bug assigned to aupadhye

Comment 6 Bryan Kearney 2020-09-22 16:03:24 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30898 has been resolved.

Comment 10 Mike McCune 2020-09-30 14:37:36 UTC
I'd recommend running foreman-maintain upgrade as well to verify that it *does* call the upgrade steps:

# foreman-maintain upgrade run -y --target-version=6.8.z --whitelist="repositories-validate,repositories-setup"

ensure that "foreman-rake upgrade:run" is run in the above as f-m is responsible for the upgrade execution.

Comment 12 Devendra Singh 2020-09-30 15:04:26 UTC
Thanks Mike and Amit. 

Verified the forman-maintain upgrade and upgrade steps on 6.8.0 Snap17.

Comment 15 errata-xmlrpc 2020-10-27 13:09:06 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 (Important: Satellite 6.8 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/RHSA-2020:4366