Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1422690 - viewing REX job in web UI is very slow as non-admin user
viewing REX job in web UI is very slow as non-admin user
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Remote Execution (Show other bugs)
6.2.7
Unspecified Unspecified
high Severity high (vote)
: 6.2.10
: Unused
Assigned To: Ivan Necas
Peter Ondrejka
: Performance, PrioBumpField
Depends On:
Blocks: sat6-fe-walmart
  Show dependency treegraph
 
Reported: 2017-02-15 17:14 EST by Chris Duryee
Modified: 2017-06-20 13:22 EDT (History)
7 users (show)

See Also:
Fixed In Version: rubygem-foreman_remote_execution-0.3.0.16-1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1446711 (view as bug list)
Environment:
Last Closed: 2017-06-20 13:22:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to skip authorizer cache in some cases (493 bytes, patch)
2017-02-15 17:16 EST, Chris Duryee
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 18851 None None None 2017-03-09 03:24 EST
Red Hat Product Errata RHBA-2017:1553 normal SHIPPED_LIVE Satellite 6.2.10 Async Bug Release 2017-06-20 17:19:07 EDT

  None (edit)
Description Chris Duryee 2017-02-15 17:14:49 EST
Description of problem:

If you have a non-admin user with rights to view REX jobs, it can be very slow to view the task output. For example:

  Rendered /opt/.../app/views/job_invocations/_tab_overview.html.erb (23.2ms)
  Rendered /opt/.../app/views/job_invocations/_host_name_td.html.erb (3065.9ms)
  Rendered /opt/.../app/views/job_invocations/_host_status_td.html.erb (0.5ms)
  Rendered /opt/.../app/views/job_invocations/_host_actions_td.html.erb (3587.1ms)
  Rendered /opt/.../app/views/job_invocations/_host_name_td.html.erb (2876.5ms)
  Rendered /opt/.../app/views/job_invocations/_host_status_td.html.erb (0.5ms)
  Rendered /opt/.../app/views/job_invocations/_host_actions_td.html.erb (2717.4ms)
  Rendered /opt/.../app/views/job_invocations/_host_name_td.html.erb (3664.2ms)
  Rendered /opt/.../app/views/job_invocations/_host_status_td.html.erb (0.4ms)
  Rendered /opt/.../app/views/job_invocations/_host_actions_td.html.erb (2913.4ms)
  Rendered /opt/.../app/views/job_invocations/_host_name_td.html.erb (2749.4ms)
  Rendered /opt/.../app/views/job_invocations/_host_status_td.html.erb (0.5ms)
  Rendered /opt/.../app/views/job_invocations/_host_actions_td.html.erb (3694.2ms)
  Rendered /opt/.../app/views/job_invocations/_host_name_td.html.erb (2884.7ms)
  Rendered /opt/.../app/views/job_invocations/_host_status_td.html.erb (0.5ms)
  Rendered /opt/.../app/views/job_invocations/_host_actions_td.html.erb (2732.3ms)
  Rendered /opt/.../app/views/job_invocations/_host_name_td.html.erb (3653.0ms)
  Rendered /opt/.../app/views/job_invocations/_host_status_td.html.erb (0.5ms)
  Rendered /opt/.../app/views/job_invocations/_host_actions_td.html.erb (2917.3ms)
  Rendered /opt/.../app/views/job_invocations/_tab_hosts.html.erb (37465.4ms)
  Rendered /opt/.../app/views/job_invocations/show.html.erb within layouts/application (37502.5ms)
  Rendered layouts/_application_content.html.erb (0.2ms)
  Rendered home/_submenu.html.erb (1.4ms)
  Rendered home/_user_dropdown.html.erb (2.5ms)
Read fragment views/tabs_and_title_records-21 (0.1ms)
  Rendered home/_topbar.html.erb (6.4ms) 
  Rendered layouts/base.html.erb (7.2ms) 
Completed 200 OK in 37539ms (Views: 37366.9ms | ActiveRecord: 148.5ms)


If you are logged in as admin, this takes less than one second:

Completed 200 OK in 67ms (Views: 47.9ms | ActiveRecord: 6.9ms)


Version-Release number of selected component (if applicable): 6.2.7

Steps to Reproduce:
1. register a large number of hosts to the satellite (perhaps 40K or more)
2. view rex job. The job doesn't have to be on a large number of hosts, the example above was for 7 hosts.

Actual results: page seems to take 3-5 seconds per host


Expected results: page should be about the same speed as for admin user


Additional info: attached patch seems to help significatly
Comment 1 Chris Duryee 2017-02-15 17:16 EST
Created attachment 1250733 [details]
patch to skip authorizer cache in some cases
Comment 2 Chris Duryee 2017-02-15 17:17:48 EST
3 seconds per host can quickly make things unusable, marking as high severity
Comment 4 pm-sat@redhat.com 2017-02-17 14:13:13 EST
Upstream bug assigned to cduryee@redhat.com
Comment 5 pm-sat@redhat.com 2017-02-17 14:13:16 EST
Upstream bug assigned to cduryee@redhat.com
Comment 7 pm-sat@redhat.com 2017-02-21 10:14:27 EST
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18554 has been resolved.
Comment 10 Chris Duryee 2017-03-06 19:16:13 EST
The upstream patch was reverted. I marked the attached BZ patch as obsolete, and reset back to untriaged since it no longer has a fix in-hand.
Comment 11 Ivan Necas 2017-03-09 03:24:08 EST
Created redmine issue http://projects.theforeman.org/issues/18851 from this bug
Comment 12 pm-sat@redhat.com 2017-03-09 04:13:36 EST
Upstream bug assigned to inecas@redhat.com
Comment 13 pm-sat@redhat.com 2017-03-09 04:13:40 EST
Upstream bug assigned to inecas@redhat.com
Comment 14 pm-sat@redhat.com 2017-03-09 16:13:38 EST
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18851 has been resolved.
Comment 16 Peter Ondrejka 2017-05-30 10:42:59 EDT
Verified with 10k hosts on satellite-6.2.10-2.0.el7sat.noarch, no significant delay experienced
Comment 18 errata-xmlrpc 2017-06-20 13:22:17 EDT
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, 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/RHBA-2017:1553

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