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 2026188

Summary: Satellite 6.10 upgrade fails with Katello::Errors::Pulp3Error: Validation failed: resources missing
Product: Red Hat Satellite Reporter: dgupte
Component: RepositoriesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact: Cole Higgins <chiggins>
Severity: high Docs Contact:
Priority: high    
Version: 6.10.0CC: ahumbe, hakon.gislason, janarula, jjeffers, jsherril, karnsing, saydas
Target Milestone: 6.11.0Keywords: Triaged, Upgrades
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2027814 (view as bug list) Environment:
Last Closed: 2021-12-08 20:05:01 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 dgupte 2021-11-24 02:05:05 UTC
Description of problem:
>>>
Upgrade to 6.10 fails with "Katello::Errors::Pulp3Error: Validation failed: resources missing" errors on "satellite-maintain content prepare" execution.

=====================
Prepare content for Pulp 3:
Checking for valid Katello configuraton.
Starting task.

2021-11-23 08:14:17 +0000: Content migration starting. These steps may take a while to complete. Refer to `foreman-maintain content migration-stats` for an estimate.
2021-11-23 08:14:27 +0000: Content migration starting. These steps may take a while to complete. Refer to `foreman-maintain content migration-stats` for an estimate.
..
..
2021-11-23 08:17:17 +0000: Content migration starting. These steps may take a while to complete. Refer to `foreman-maintain content migration-stats` for an estimate.
2021-11-23 08:17:27 +0000: Content migration starting. These steps may take a while to complete. Refer to `foreman-maintain content migration-stats` for an estimate.Migration failed, You will want to investigate: https://satellite6.example.com/foreman_tasks/tasks/cde6274a-38ec-4adf-9ee2-9eba814714b0
rake aborted!
ForemanTasks::TaskError: Task cde6274a-38ec-4adf-9ee2-9eba814714b0: Katello::Errors::Pulp3Error: Validation failed: resources missing {'repositories': ['9039817e-7178-4654-af63-10086ffa83b3', '466279f4-d9fe-4250-b201-d35afe75c412', '6eda3c7b-e689-45c9-954a-b5eb0ff3e4b2', '561dc2e0-bc20-43ed-a5aa-0a8b80121cb4', 'dfe4d41e-af04-4c31-b061-195acd6dc6bf', '259bb346-ca50-431d-b723-abf198f452a5'], 'repositories_missing_importers': ['9039817e-7178-4654-af63-10086ffa83b3', '466279f4-d9fe-4250-b201-d35afe75c412', '6eda3c7b-e689-45c9-954a-b5eb0ff3e4b2', '561dc2e0-bc20-43ed-a5aa-0a8b80121cb4', 'dfe4d41e-af04-4c31-b061-195acd6dc6bf', '259bb346-ca50-431d-b723-abf198f452a5'], 'repositories_missing_distributors': ['9039817e-7178-4654-af63-10086ffa83b3', '466279f4-d9fe-4250-b201-d35afe75c412', '6eda3c7b-e689-45c9-954a-b5eb0ff3e4b2', '561dc2e0-bc20-43ed-a5aa-0a8b80121cb4', 'dfe4d41e-af04-4c31-b061-195acd6dc6bf', '259bb346-ca50-431d-b723-abf198f452a5']}
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.46/lib/katello/tasks/pulp3_migration.rake:43:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
Tasks: TOP => katello:pulp3_migration
(See full trace by running task with --trace)
                                                                      [FAIL]
Failed executing preserve_output=true foreman-rake katello:pulp3_migration, exit status 1
--------------------------------------------------------------------------------
Scenario [Prepare content for Pulp 3] failed.

The following steps ended up in failing state:

  [content-prepare]

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

Version-Release number of selected component (if applicable):
6.10


Actual results:
Upgrade fails on "Katello::Errors::Pulp3Error: Validation failed" step.

Expected results:
Upgrade should be seamless.

Comment 5 dgupte 2021-11-30 02:59:52 UTC
*** Bug 2026185 has been marked as a duplicate of this bug. ***

Comment 6 Justin Sherrill 2021-11-30 03:09:39 UTC
can you try running:

foreman-rake katello:correct_repositories  COMMIT=true

and re-trying the content prepare step?


That rake task is intended to repair repositories that are in katello but not in pulp.

Comment 12 Justin Sherrill 2021-12-08 20:05:01 UTC
After some discussion we've decided to close this as NOTABUG.  

This error (Katello::Errors::Pulp3Error: Validation failed: resources missing ) is indicating that there is data missing in pulp, which can be corrected with foreman-rake katello:correct_repositories  COMMIT=true

We run this as part of every upgrade, and a user can run it at any time.  Running this automatically i think has downsides, such as causing the migration/upgrade to take longer even for users that do not have any dirty data. 

A bz has been open to add this to the upgrade guide: https://bugzilla.redhat.com/show_bug.cgi?id=2027293


Let me know if you have any questions!