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 1981017

Summary: [pulp3] foreman-rake katello:approve_corrupted_migration_content command failed with rake aborted!
Product: Red Hat Satellite Reporter: Devendra Singh <desingh>
Component: RepositoriesAssignee: James Jeffers <jjeffers>
Status: CLOSED ERRATA QA Contact: Devendra Singh <desingh>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: ahumbe, ggainey, jjeffers, jsherril, pcreech, pmendezh
Target Milestone: 6.9.6Keywords: AutomationBlocker, PrioBumpQA, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.18.1.38-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-09-21 14:37:26 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 Devendra Singh 2021-07-10 15:33:07 UTC
Description of problem: foreman-rake katello:approve_corrupted_migration_content command failed with rake aborted!


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

How reproducible:
2/2 with specific customer database

Steps to Reproduce:
1. Restore the 6.9 satellite using the backup data
2. Run the pulp migration.
3. Pulp migration failed with 255 status.
4- Run the command to approve the corrupted contents but it failed with "rake aborted!" error.

 foreman-rake katello:approve_corrupted_migration_content
 {:services=>
   {:candlepin=>{:status=>"ok", :duration_ms=>"63"},  
    :candlepin_auth=>{:status=>"ok", :duration_ms=>"49"},
    :foreman_tasks=>{:status=>"ok", :duration_ms=>"3"},
    :katello_events=>
     {:status=>"FAIL", :message=>"Not running", :duration_ms=>"2"},
    :candlepin_events=>
     {:status=>"ok", :message=>"0 Processed, 0 Failed", :duration_ms=>"0"},
    :pulp3=>{:status=>"ok", :duration_ms=>"67"},
    :pulp=>{:status=>"ok", :duration_ms=>"57"},
    :pulp_auth=>{:status=>"ok", :duration_ms=>"30"}},  
  :status=>"FAIL"}
 rake aborted!
 Not all the services have been started. Check the status report above and try again.
 /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.32/lib/katello/tasks/reimport.rake:10: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:approve_corrupted_migration_content => katello:check_ping
 (See full trace by running task with --trace)


Actual results:
foreman-rake katello:approve_corrupted_migration_content command failed with rake aborted!

Expected results:
Command should be completed successfully.

Additional info:
I raised this bug because I am not sure of the actual behavior whether the services should be running after 255 status or need to restart the services after getting the 255 status and then run the "foreman-rake katello:approve_corrupted_migration" command.

Comment 5 James Jeffers 2021-07-28 19:25:00 UTC
Created redmine issue https://projects.theforeman.org/issues/33173 from this bug

Comment 7 Devendra Singh 2021-09-17 14:51:38 UTC
Verified on 6.9.6 Snap2

Verification points:

1- Restored the satellite using the 6.9 backup data.
2- Ran the upgrade from 6.9.5 to 6.9.6 snap2 and it was completed successfully.
3- Ran the pulp migration and it failed due to corrupted contents.
4- Ran the content approval command and didn't see any traceback.

# foreman-rake katello:approve_corrupted_migration_content
Any missing or corrupt content will be ignored on migration to Pulp 3.  This can be undone with 'foreman-rake katello:unapprove_corrupted_migration_content'

Comment 12 errata-xmlrpc 2021-09-21 14:37:26 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 6.9.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-2021:3628