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.
Description of problem: Running sync plan fails with error
curl -u admin:password -k -X PUT https://satellite.example.com.com/katello/api/v2/organizations/3/sync_plans/4/sync -H 'content-type: application/json'
{"displayMessage":"uninitialized constant Actions::Foreman::Exception\nDid you mean? Exception","errors":["uninitialized constant Actions::Foreman::Exception\nDid you mean? Exception"]}
production log
~~~
2020-07-08T10:43:46 [I|app|bd1ae89a] Started PUT "/katello/api/v2/organizations/3/sync_plans/4/sync" for 10.74.131.67 at 2020-07-08 10:43:46 +0530
2020-07-08T10:43:46 [I|app|bd1ae89a] Processing by Katello::Api::V2::SyncPlansController#sync as */*
2020-07-08T10:43:46 [I|app|bd1ae89a] Parameters: {"api_version"=>"v2", "organization_id"=>"3", "id"=>"4", "sync_plan"=>{}}
2020-07-08T10:43:46 [D|app|bd1ae89a] Authenticated user admin against INTERNAL authentication source
2020-07-08T10:43:46 [D|app|bd1ae89a] Current user set to foreman_admin (admin)
2020-07-08T10:43:46 [I|app|bd1ae89a] Authorized user admin(Admin User)
2020-07-08T10:43:46 [I|app|bd1ae89a] Current user set to admin (admin)
2020-07-08T10:43:46 [D|app|bd1ae89a] Current location set to none
2020-07-08T10:43:46 [D|app|bd1ae89a] Current organization set to FR
2020-07-08T10:43:46 [D|app|bd1ae89a] Current location set to none
2020-07-08T10:43:46 [D|app|bd1ae89a] Current organization set to FR
2020-07-08T10:43:46 [D|dyn|bd1ae89a] ExecutionPlan 97212660-758b-45cf-a2af-cfce67010eb6 pending >> planning
2020-07-08T10:43:46 [I|bac|bd1ae89a] Task {label: Actions::Katello::SyncPlan::Run, id: 47d926bd-3ecf-4738-8ce0-79b4dc00e7c5, execution_plan_id: 97212660-758b-45cf-a2af-cfce67010eb6} state changed: planning
2020-07-08T10:43:46 [I|app|] Current user set to admin (admin)
2020-07-08T10:43:46 [D|app|] Current organization set to FR
2020-07-08T10:43:46 [D|app|] Current location set to none
2020-07-08T10:43:46 [D|dyn|] Step 97212660-758b-45cf-a2af-cfce67010eb6: 1 pending >> running in phase Plan Actions::Katello::SyncPlan::Run
2020-07-08T10:43:46 [D|app|] Current user set to foreman_admin (admin)
2020-07-08T10:43:47 [D|dyn|] Step 97212660-758b-45cf-a2af-cfce67010eb6: 2 pending >> running in phase Plan Actions::BulkAction
2020-07-08T10:43:47 [E|bac|] uninitialized constant Actions::Foreman::Exception
Did you mean? Exception (NameError)
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.11.1/app/lib/actions/bulk_action.rb:61:in `check_targets!'
~~~
Version-Release number of selected component (if applicable): Satellite 6.6
Actual results: Running sync plan fails with error
Expected results: It should success
Additional info: There are some root repository without the reference of the actual repository. Running below command list corrupted root repository
cat << FIX | foreman-rake console
sync_plan = Katello::SyncPlan.find(4)
syncable_roots = ::Katello::RootRepository.where(:product_id => sync_plan.products.syncable).has_url; nil
syncable_roots.each do |root_repo|
puts "Corrupt Root Repository => #{root_repo.name}" if root_repo.library_instance.nil?
end; nil
FIX
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 (Important: Satellite 6.7.4 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/RHSA-2020:4127