Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2013641

Summary: Installer fails to update packages "tfm-rubygem-katello, python3-pulp-2to3-migration"
Product: Red Hat Satellite Reporter: Gaurav Talreja <gtalreja>
Component: Satellite MaintainAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Gaurav Talreja <gtalreja>
Severity: high Docs Contact:
Priority: high    
Version: 6.10.0CC: ahumbe, apatel, aupadhye, egolov, ehelms, jsherril, kgaikwad, mmccune, myarboro, zhunting
Target Milestone: 6.10.1Keywords: PrioBumpGSS, Triaged, Upgrades
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-0.8.21 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-18 14:26:51 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 Gaurav Talreja 2021-10-13 12:50:40 UTC
Description of problem:
A pre-upgrade check added by BZ 1977361, asks to update packages "tfm-rubygem-katello, python3-pulp-2to3-migration", when updates are available through the latest z-stream repos from dogfood/cdn, before proceeding upgrade.

Version-Release number of selected component (if applicable):
Satellite 6.9.6 or any older

How reproducible:
Always

Steps to Reproduce:
1. Run pulp migration.
2. Configure/enable the latest z-stream repos from dogfood/CDN, like for 6.9.7.
3. Run pre-upgrade checks, it detects updates from the latest z-stream repos and asks to update them.
4. # foreman-maintain packages update --assumeyes tfm-rubygem-katello python3-pulp-2to3-migration

Actual results:
The installer fails to update those packages.

Expected results:
The installer should update those packages.

Additional info:
https://privatebin-it-iso.int.open.paas.redhat.com/?ff5b26799602d717#2wU1hAx6oebQoBtquJpPn8qNzs1jhXEY1S6j7ii8Dagf

Comment 1 Evgeni Golov 2021-10-14 13:13:55 UTC
Gaurav, you paste says the installer failed with the following error:
2021-10-13 08:29:41 [ERROR ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[<sat>]: Could not evaluate: Proxy <sat> cannot be retrieved: unknown error (response 500)
2021-10-13 08:29:41 [ERROR ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[<sat>]: Failed to call refresh: Proxy <sat> cannot be retrieved: unknown error (response 500)
2021-10-13 08:29:41 [ERROR ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[<sat>]: Proxy <sat> cannot be retrieved: unknown error (response 500)

This doesn't seem related to katello/migration RPM being out of date?

Anyways, could you provide either sosreport or SSH to that machine, as the output, as is, is useless for debugging :(

Comment 2 Mike McCune 2021-10-14 13:59:56 UTC
Will customers need to actually take this step to manually upgrade tfm-rubygem-katello  or is this just internal while the packages aren't on the CDN?

Comment 3 Evgeni Golov 2021-10-14 14:18:32 UTC
The code introduced via BZ#1977361 (and later cleaned up via BZ#2008432) intends to check "is the system on the *latest* available z-stream", so everyone will need to execute "foreman-maintain upgrade run --target-version 6.9.z" (or whatever the correct invocation is), before they can go to 6.10.0 (or 6.10.z) if they are on 6.9.z with z != latest.

Comment 4 mark yarborough 2021-10-14 14:44:01 UTC
mmccune will advocate closure (not valid) and/or convert this to a docs bug...

Comment 6 Justin Sherrill 2021-10-18 12:30:23 UTC
It looks like those packages were not updated properly (by simply doing a 'foreman-maintain packages update'), which likely left the system in a dirty state.  The proper way to update to any satellite z-stream is to run the 'foreman-maintain upgrade run --target-version 6.9.z' command.  

We might should update the text on the output when those are out of date.  When they are out of date, the text is: 

An update is available for one of these packages:  "#{@packages.join(',')}. Please update before proceeding

but if they are updated, its: 

Confirm that you are running the latest minor release of Satellite 6.9

So i could see how the first message could lead the user down this path.  Not sure if its a release blocker though.

Comment 7 Justin Sherrill 2021-10-27 17:17:22 UTC
Connecting redmine issue https://projects.theforeman.org/issues/33795 from this bug

Comment 8 Brad Buckingham 2021-11-04 12:38:57 UTC
Moving to POST as PR has been merged.

Comment 9 Gaurav Talreja 2021-11-12 12:07:30 UTC
Verified.

Tested on Satellite 6.9.5 or any older
Version: rubygem-foreman_maintain-0.8.21-1.el7sat.noarch (From Satellite 6.10.1 Snap 1.0)

Steps:
1. satellite-maintain upgrade check --target-version=6.10

Observation:
Here we are advocating and forcing customers to upgrade to the latest zstream over updating tfm-rubygem-katello and python3-pulp-2to3-migration packages in pre-upgrade check to keep the latest of pulp2to3 migration fixes, few observations, 

- If updates are available for this packages it simply fails and asks to update to the latest 6.9.z release.
- If already on the latest zstream then simply asks to confirm with Yes/Quit if running the latest minor release of Satellite 6.9.
- If updates of these packages are from configured 6.10 repos then it simply skips those updates and passes.

Comment 12 errata-xmlrpc 2021-11-18 14:26:51 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 Maintenance 6.10.1 Async Bug Fix Update), 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:4736