Bug 2039289

Summary: Installing Satellite7, satellite-installer runs redundant upgrade steps
Product: Red Hat Satellite Reporter: Pavel Moravec <pmoravec>
Component: InstallationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Omkar Khatavkar <okhatavk>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.11.0CC: egolov, gtalreja, pcreech
Target Milestone: 6.11.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: satellite-installer-7.0.0.4, foreman-installer-3.1.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-05 14:31:52 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 Pavel Moravec 2022-01-11 12:36:49 UTC
Description of problem:
Installing Sat7.0 to RHEL7, the installer redundantly runs several steps from an upgrade. That prolongs installation time.


Version-Release number of selected component (if applicable):
satellite-7.0.0-0.3.beta.el7sat.noarch
satellite-installer-7.0.0.3-1.el7sat.noarch
foreman-installer-3.1.0-1.el7sat.noarch
foreman-installer-katello-3.1.0-1.el7sat.noarch

How reproducible:
100%


Steps to Reproduce:
1. On a fresh new VM, install Sat7.0 and see output of 

satellite-installer --scenario satellite

command.


Actual results:
..
2022-01-11 10:55:09 [NOTICE] [configure] System configuration has finished.
Executing: foreman-rake upgrade:run
=============================================
Upgrade Step 1/7: katello:correct_repositories. This may take a long while.
=============================================
Upgrade Step 2/7: katello:clean_backend_objects. This may take a long while.
0 orphaned consumer id(s) found in candlepin.
Candlepin orphaned consumers: []
=============================================
Upgrade Step 3/7: katello:upgrades:4.0:remove_ostree_puppet_content. =============================================
Upgrade Step 4/7: katello:upgrades:4.1:sync_noarch_content. =============================================
Upgrade Step 5/7: katello:upgrades:4.1:fix_invalid_pools. I, [2022-01-11T10:55:40.143040 #28040]  INFO -- : Corrected 0 invalid pools
I, [2022-01-11T10:55:40.143092 #28040]  INFO -- : Removed 0 orphaned pools
=============================================
Upgrade Step 6/7: katello:upgrades:4.1:reupdate_content_import_export_perms. =============================================
Upgrade Step 7/7: katello:upgrades:4.2:remove_checksum_values.   Success!
  * Satellite is running at https://pmoravec-sat70-rhel7.satotest.gsslab.brq2.redhat.com
..


Expected results:
Whole the "foreman-rake upgrade:run" seems redundant to me, on a fresh new install.

Also, it reminds me https://bugzilla.redhat.com/show_bug.cgi?id=2001674 whcih can be the root cause here..?

(sorry if I am too eager to file known issues that would be downstream-patched either way :) ).


Additional info:

Comment 1 Evgeni Golov 2022-01-11 14:27:44 UTC
You're right, we originally changed that the moment we forked the installer, which we didn't do yet.

A possible patch is https://gitlab.cee.redhat.com/satellite/foreman-installer/-/merge_requests/113/diffs

One thing that came up while triaging this: we could be smarter and let satellite-installer override this (which would require upstream changes, tho)

This can happen either via a hook or answers (to be discussed)

Comment 3 Evgeni Golov 2022-02-11 13:21:30 UTC
Created redmine issue https://projects.theforeman.org/issues/34440 from this bug

Comment 5 Omkar Khatavkar 2022-03-08 15:21:13 UTC
# grep -ir 'foreman.*rake.*upgrade.*run' /var/log/foreman-installer/satellite.log

[root@dhcp-3-185 ~]# rpm -qa | grep installer
foreman-installer-3.1.2-1.el7sat.noarch

Verified on Satellite 7 with Snap 12. The issue is no more reproducible.

Comment 9 errata-xmlrpc 2022-07-05 14:31:52 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 (Moderate: Satellite 6.11 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-2022:5498