Description of problem: Job invocations on satellite as non-admin is extremely slow approx ~8 min and also takes excessive RAM. Affected Url Endpoint: /job_invocations/[id] Foreman Bug: https://projects.theforeman.org/issues/28723 Version-Release number of selected component (if applicable): satellite-6.6.1 Not Reproducible on local setup Steps to reproduce: Create a user, assign viewer role and visit https://satellite.example.com/job_invocations/<id> Observation: 1. As per log _host_actions_td.html.erb partial take a long time to load 2. After comment of <%= render 'host_actions_td', options %> in _host_actions_td page loads normal 3. Hammer works normally for job invocation Here are production logs Production logs: JobInvocationsController#show takes approx 8 min to complete 2020-01-21T08:41:39 [I|app|d489d82d] Processing by JobInvocationsController#show as HTML 2020-01-21T08:49:54 [I|app|d489d82d] Completed 200 OK in 494394ms (Views: 491473.6ms | ActiveRecord: 2848.3ms) 2020-01-21T08:49:54 [I|app|e71a6bdd] Processing by JobInvocationsController#show as HTML 2020-01-21T08:59:01 [I|app|e71a6bdd] Completed 200 OK in 547684ms (Views: 544908.5ms | ActiveRecord: 2747.8ms) JobInvocationsController#show logs 2020-01-21T08:49:54 [I|app|e71a6bdd] Started GET "/job_invocations/138" for 10.104.12.65 at 2020-01-21 08:49:54 +0100 2020-01-21T08:49:54 [I|app|e71a6bdd] Processing by JobInvocationsController#show as HTML 2020-01-21T08:49:54 [I|app|e71a6bdd] Parameters: {"id"=>"138"} 2020-01-21T08:49:54 [I|app|e71a6bdd] Current user set to test-viewer (regular) 2020-01-21T08:49:54 [I|app|e71a6bdd] Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/show.html.erb within layouts/application 2020-01-21T08:49:54 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_card_results.html.erb (0.4ms) 2020-01-21T08:49:54 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_card_schedule.html.erb (0.8ms) 2020-01-21T08:49:54 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_card_target_hosts.html.erb (1.6ms) 2020-01-21T08:57:13 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_host_status_td.html.erb (0.3ms) 2020-01-21T08:57:40 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_host_actions_td.html.erb (26836.3ms) 2020-01-21T08:57:40 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_host_name_td.html.erb (6.2ms) <Record truncated ....> 2020-01-21T08:58:34 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_host_actions_td.html.erb (26712.1ms) 2020-01-21T08:58:34 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_host_name_td.html.erb (0.6ms) 2020-01-21T08:58:34 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_host_status_td.html.erb (0.3ms) 2020-01-21T08:59:01 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_host_actions_td.html.erb (26910.0ms) 2020-01-21T08:59:01 [I|app|e71a6bdd] Rendered common/_pagination.html.erb (5.4ms) 2020-01-21T08:59:01 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_tab_hosts.html.erb (547109.3ms) 2020-01-21T08:59:01 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_tab_overview.html.erb (547140.9ms) 2020-01-21T08:59:01 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_user_input.html.erb (6.6ms) 2020-01-21T08:59:01 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_user_input.html.erb (8.2ms) <Record Truncate ...> 2020-01-21T08:59:01 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_user_input.html.erb (15.1ms) 2020-01-21T08:59:01 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/_tab_preview_templates.html.erb (447.2ms) 2020-01-21T08:59:01 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.8.0.4/app/views/job_invocations/show.html.erb within layouts/application (547612.1ms) 2020-01-21T08:59:01 [I|app|e71a6bdd] Rendered layouts/_application_content.html.erb (0.7ms) 2020-01-21T08:59:01 [I|app|e71a6bdd] Rendering layouts/base.html.erb 2020-01-21T08:59:01 [I|app|e71a6bdd] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_theme_satellite-4.0.1.7/app/views/foreman_theme_satellite/_theme_client_side_branding.js.erb (0.5ms) 2020-01-21T08:59:01 [I|app|e71a6bdd] Rendered layouts/base.html.erb (33.6ms) 2020-01-21T08:59:01 [I|app|e71a6bdd] Completed 200 OK in 547684ms (Views: 544908.5ms | ActiveRecord: 2747.8ms)
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/28723 has been resolved.
Fix is in Satellite 6.9 SNAP 1 with tfm-rubygem-foreman_remote_execution-4.1.0-1.el7sat.noarch
Verified in Satellite 6.9 snap 2, did not experience a significant slowdown in the aforementioned scenario.
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 (Moderate: Satellite 6.9 Release), 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-2021:1313