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 1854711 - Sync Plan fails with 'uninitialized constant Actions::Foreman::Exception'
Summary: Sync Plan fails with 'uninitialized constant Actions::Foreman::Exception'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Sync Plans
Version: 6.6.0
Hardware: All
OS: All
unspecified
medium
Target Milestone: 6.7.4
Assignee: satellite6-bugs
QA Contact: Stephen Wadeley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-08 05:23 UTC by Ranjan Kumar
Modified: 2023-10-06 21:01 UTC (History)
5 users (show)

Fixed In Version: tfm-rubygem-katello-3.14.0.28-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1874168 (view as bug list)
Environment:
Last Closed: 2020-09-30 13:12:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30343 0 Normal Closed Sync Plan fails with 'uninitialized constant Actions::Foreman::Exception' 2020-10-28 11:03:25 UTC
Red Hat Product Errata RHSA-2020:4127 0 None None None 2020-09-30 13:12:21 UTC

Description Ranjan Kumar 2020-07-08 05:23:48 UTC
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

Comment 2 Bryan Kearney 2020-07-24 20:02:55 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30343 has been resolved.

Comment 12 errata-xmlrpc 2020-09-30 13:12:09 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 (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


Note You need to log in before you can comment on or make changes to this bug.