Bug 1793875 - Job Invocations page is extremely slow for non-admin users
Summary: Job Invocations page is extremely slow for non-admin users
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.6.0
Hardware: All
OS: All
unspecified
medium
Target Milestone: 6.9.0
Assignee: Leos Stejskal
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-22 07:27 UTC by Ranjan Kumar
Modified: 2023-09-07 21:33 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1943262 1943264 (view as bug list)
Environment:
Last Closed: 2021-04-21 13:12:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 28723 0 High Closed REX: /views/job_invocations consumes massive RAM and extremely slow for non-admin users 2021-01-14 16:14:52 UTC
Red Hat Knowledge Base (Solution) 4776601 0 None None None 2020-01-30 11:00:51 UTC

Description Ranjan Kumar 2020-01-22 07:27:06 UTC
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)

Comment 4 Bryan Kearney 2020-06-17 16:02:58 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/28723 has been resolved.

Comment 5 Brad Buckingham 2020-11-13 19:57:42 UTC
Fix is in Satellite 6.9 SNAP 1 with tfm-rubygem-foreman_remote_execution-4.1.0-1.el7sat.noarch

Comment 6 Peter Ondrejka 2020-11-20 13:45:31 UTC
Verified in Satellite 6.9 snap 2, did not experience a significant slowdown in the aforementioned scenario.

Comment 9 errata-xmlrpc 2021-04-21 13:12:25 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 (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


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