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 1980849 - Unable to run Ansible playbook from insights plan on satellite 6.9.x (Backtrace for 'Action failed' error (ActiveRecord::StatementInvalid))
Summary: Unable to run Ansible playbook from insights plan on satellite 6.9.x (Backtra...
Keywords:
Status: CLOSED DUPLICATE of bug 1974958
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: RH Cloud - Insights
Version: 6.9.0
Hardware: x86_64
OS: All
unspecified
high
Target Milestone: Unspecified
Assignee: Shimon Shtein
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-09 16:15 UTC by Amar Huchchanavar
Modified: 2024-10-01 18:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-09 16:59:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Amar Huchchanavar 2021-07-09 16:15:08 UTC
Description of problem:
Unable to execute 'Insights' playbooks created on Satellite 6.9.2+, it fails with an error "
Failed to create job. Ensure your systems are registered in Foreman"

Logs:
Customer 1:
2021-07-09T10:21:56 [I|bac|c7415bc8] Task {label: Actions::RemoteExecution::RunHostsJob, id: bcf6f5ed-7b7a-4ac8-bcdd-478cc5f8b6e9, exec
ution_plan_id: dcdf6655-626e-4e39-9582-ec8fcef69438} state changed: planning 
2021-07-09T10:21:56 [I|app|471ab612] Started GET "/notification_recipients" for 192.168.88.26 at 2021-07-09 10:21:56 -0400
2021-07-09T10:21:56 [I|app|471ab612] Processing by NotificationRecipientsController#index as JSON
2021-07-09T10:21:56 [I|app|471ab612] Completed 200 OK in 5ms (Views: 0.1ms | ActiveRecord: 1.3ms | Allocations: 2287)
2021-07-09T10:21:56 [E|bac|] PG::UndefinedTable: ERROR:  missing FROM-clause entry for table "machine1"
 | LINE 1: ...D "hosts"."location_id" = $3 AND (( hosts.name IN(machine1...
 |                                                              ^
 |  (ActiveRecord::StatementInvalid)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:675:in `async_exec_params'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:675:in `block (2 levels) in exec_no_cache'


Customer 2:
2021-07-09T10:33:51 [I|bac|b5352cde] Task {label: Actions::RemoteExecution::RunHostsJob, id: d1a79492-f9e4-4020-95dc-6fdc7f33a60c, execution_plan_id: 2b64f573-2202-483e-8a77-f62c09cf809f} state changed: planning
2021-07-09T10:33:52 [E|bac|] PG::UndefinedTable: ERROR:  missing FROM-clause entry for table "abctest"
 | LINE 1: ...D "hosts"."location_id" = $3 AND (( hosts.name IN(abctest.in...
 |                                                              ^

Customer 3:

2021-06-28T10:01:09 [I|bac|f1fcbca8] Task {label: Actions::RemoteExecution::RunHostsJob, id: bab0c39a-23b7-40cd-b299-4f8f19691910, exec
ution_plan_id: 23320b52-7db2-4e53-96d0-a29228960b0d} state changed: planning 
2021-06-28T10:01:09 [D|tax|] Current organization set to CHD
2021-06-28T10:01:09 [D|tax|] Current location set to none
2021-06-28T10:01:09 [D|dyn|]          Step 23320b52-7db2-4e53-96d0-a29228960b0d: 1   pending >>   running in phase     Plan Actions::Re
moteExecution::RunHostsJob
2021-06-28T10:01:09 [D|app|] Verify peer 1
2021-06-28T10:01:09 [D|app|] Using SSL auth for portal communication
2021-06-28T10:01:09 [D|app|] Telemetry ssl options => ca_file:/opt/theforeman/tfm/root/usr/share/gems/gems/redhat_access-2.2.19/ca/rh_c
ert-api_chain.pem , peer verify 1
2021-06-28T10:01:09 [D|app|] Insights proxy url = proxys://proxy_example.com:8080
2021-06-28T10:01:09 [D|app|] RestClient.get "https://cert-api.access.redhat.com/r/insights/v3/maintenance/54248/playbook", "Accept"=>"*
/*", "Accept-Encoding"=>"gzip, deflate", "User-Agent"=>"rest-client/2.0.2 (linux-gnu x86_64) ruby/2.5.9p229"
 | 
2021-06-28T10:01:09 [D|app|] # => 200 OK | text/vnd.yaml 2508 bytes
 | 
2021-06-28T10:01:09 [E|bac|] PG::UndefinedColumn: ERROR:  column "dev" does not exist
 | LINE 1: ...osts"."organization_id" = $2 AND (( hosts.name IN(dev-example.co...
 |                                                              ^
 |  (ActiveRecord::StatementInvalid)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:675:in `async_exec_params'


Version-Release number of selected component (if applicable):
satellite-6.9.2-1.el7sat.noarch                           
satellite-cli-6.9.2-1.el7sat.noarc

How reproducible:
Appears to be an issue with 6.9.2. 

Steps to Reproduce:
1. Try to run Insights playbook against any system from Satellite 6.9.2
[ Satellite UI -> Insights -> select any system -> Actions -> create a new plan/Playbook -> save -> Run Playbook. ]

Actual results:
"Failed to create job. Ensure your systems are registered in Foreman"

Expected results:
Successful playbook execution


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