Bug 2080348

Summary: Repository sync jobs are failing with the Exception "NoMethodError undefined method `repository_href' for nil:NilClass" post upgrade to satellite version 6.10
Product: Red Hat Satellite Reporter: Brad Buckingham <bbuckingham>
Component: Satellite MaintainAssignee: Amit Upadhye <aupadhye>
Status: CLOSED ERRATA QA Contact: Gaurav Talreja <gtalreja>
Severity: high Docs Contact:
Priority: high    
Version: 6.10.0CC: aeladawy, ahumbe, apatel, aupadhye, dalley, hyu, jkrajice, jomadiso, jsherril, kgaikwad, mkushwah, momran, osousa, pmendezh, pmoravec, rakumar, saydas
Target Milestone: 6.10.6Keywords: Triaged, Upgrades
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-0.8.30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2024553 Environment:
Last Closed: 2022-05-31 16:37:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 Gaurav Talreja 2022-05-18 20:10:21 UTC
Verified.
Tested on Satellite 6.9.9 with rubygem-foreman_maintain-0.8.30-1.el7sat.noarch (From 6.10.6 Snap 2.0)

Steps:
1. Prepare Sat 6.9 and sync some content with the immediate download policy
2. Make content migration to fail by 'corrupt' some data   
    # echo "somedata" > /var/lib/pulp/content/path/to/package.rpm
3. Upgrade to 6.10

Observations:
1. Upgrade to 6.10 fails because content-switchover is supposed to fail here due to corrupt content, but a fix in foreman_maintain prevents the possibility of whitelisting this check, along with content-prepare (check below example) and in the absence of whitelist option user can't proceed for an upgrade with skipping a failed step.
--------------------------------------------------------------------------------
Scenario [Migration scripts to Satellite 6.10] failed.

The following steps ended up in failing state:

  [content-switchover]


2. And for other checks in case of a fail state f-m asks a user the following message,
--------------------------------------------------------------------------------
Scenario [ForemanMaintain::Scenario::FilteredScenario] failed.

The following steps ended up in failing state:

  [validate-yum-config]

Resolve the failed steps and rerun the command.

If the situation persists and, you are unclear what to do next,
contact Red Hat Technical Support.

In case the failures are false positives, use
--whitelist="validate-yum-config"

Comment 5 errata-xmlrpc 2022-05-31 16:37:24 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.6 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-2022:4851

Comment 7 Daniel Alley 2022-10-19 17:29:13 UTC
*** Bug 1995230 has been marked as a duplicate of this bug. ***