Bug 1702461

Summary: "Content Views" page results in 2 requests to "/content_views"
Product: Red Hat Satellite Reporter: Sean O'Keeffe <sokeeffe>
Component: Content ViewsAssignee: Ian Ballou <iballou>
Status: CLOSED WONTFIX QA Contact: Lai <ltran>
Severity: medium Docs Contact:
Priority: high    
Version: 6.5.0CC: iballou
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-07 19:33:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sean O'Keeffe 2019-04-23 20:06:11 UTC
Description of problem:

In 6.5 Beta, when going from the "All Hosts" to the "Content Views" page it is slow, taking close to 9 seconds to load 2 entries. There are also two calls made to the same endpoint, which you can see from http and production.log

66.187.232.65 - - [23/Apr/2019:15:52:02 -0400] "GET /content_views HTTP/1.1" 200 4299 "https://sat6-napartnersrhpdsdem-khu8aqcz.srv.ravcloud.com/hosts" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"
66.187.232.65 - - [23/Apr/2019:15:52:03 -0400] "GET /content_views HTTP/1.1" 200 4302 "https://sat6-napartnersrhpdsdem-khu8aqcz.srv.ravcloud.com/hosts" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"


2019-04-23T15:52:02 [I|app|] Started GET "/content_views" for 66.187.232.65 at 2019-04-23 15:52:02 -0400
2019-04-23T15:52:02 [I|app|d3fd7803] Processing by Bastion::BastionController#index as HTML
2019-04-23T15:52:02 [I|app|d3fd7803]   Parameters: {"bastion_page"=>"content_views"}
2019-04-23T15:52:02 [I|app|d3fd7803] Current user set to admin (admin)
2019-04-23T15:52:02 [I|app|d3fd7803]   Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/bastion-6.1.16/app/views/bastion/layouts/application.html.erb
2019-04-23T15:52:02 [I|app|d3fd7803]   Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/bastion-6.1.16/app/views/bastion/layouts/assets.html.erb
2019-04-23T15:52:03 [I|app|d3fd7803]   Rendering layouts/base.html.erb
2019-04-23T15:52:03 [I|app|d3fd7803]   Rendered layouts/base.html.erb (29.2ms)
2019-04-23T15:52:03 [I|app|d3fd7803]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/bastion-6.1.16/app/views/bastion/layouts/assets.html.erb (67.3ms)
2019-04-23T15:52:03 [I|app|d3fd7803]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/bastion-6.1.16/app/views/bastion/layouts/application.html.erb (68.3ms)
2019-04-23T15:52:03 [I|app|d3fd7803] Completed 200 OK in 80ms (Views: 64.7ms | ActiveRecord: 6.4ms)
2019-04-23T15:52:03 [I|app|] Started GET "/content_views" for 66.187.232.65 at 2019-04-23 15:52:03 -0400
2019-04-23T15:52:03 [I|app|b675e33b] Processing by Bastion::BastionController#index as HTML
2019-04-23T15:52:03 [I|app|b675e33b]   Parameters: {"bastion_page"=>"content_views"}
2019-04-23T15:52:03 [I|app|b675e33b] Current user set to admin (admin)
2019-04-23T15:52:03 [I|app|b675e33b]   Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/bastion-6.1.16/app/views/bastion/layouts/application.html.erb
2019-04-23T15:52:03 [I|app|b675e33b]   Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/bastion-6.1.16/app/views/bastion/layouts/assets.html.erb
2019-04-23T15:52:03 [I|app|b675e33b]   Rendering layouts/base.html.erb
2019-04-23T15:52:03 [I|app|b675e33b]   Rendered layouts/base.html.erb (25.8ms)
2019-04-23T15:52:03 [I|app|b675e33b]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/bastion-6.1.16/app/views/bastion/layouts/assets.html.erb (58.6ms)
2019-04-23T15:52:03 [I|app|b675e33b]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/bastion-6.1.16/app/views/bastion/layouts/application.html.erb (59.3ms)
2019-04-23T15:52:03 [I|app|b675e33b] Completed 200 OK in 71ms (Views: 56.7ms | ActiveRecord: 5.3ms)


NOTE:
This doesn't happen when refreshing the Content View page, it seems you must be on the "All Hosts" page beforehand.

Comment 3 Brad Buckingham 2019-05-01 17:27:07 UTC
I am still seeing this behavior on a later build with tfm-rubygem-katello-3.10.0.46-1.el7sat.noarch.


I do not see the same behavior on 6.4.3; therefore, marking as a Regression.

Comment 5 Ian Ballou 2019-06-27 14:15:09 UTC
Created redmine issue https://projects.theforeman.org/issues/27175 from this bug

Comment 6 Ian Ballou 2019-07-02 19:39:58 UTC
The issue here likely relates to Turbolinks in core Foreman since it has been seen before: https://projects.theforeman.org/issues/11884.  There are a number of pages that have two GET requests rather than one when Turbolinks needs to do a full page refresh.  This depends on differences in the JavaScript between the two pages that are being navigated between.

Other pages where I've seen the duplicate GETs:
All Hosts <-> Create Host
All Hosts <-> About
Create Host <-> Content Hosts
Create Host <-> OSTree Branches

The duplicate GET happens more often to/from core Foreman pages, perhaps it relates to jQuery as well.

The duplicate GET request doesn't appear to be causing significant performance issues.  In a performance test on a Satellite 6.5 instance with 83 Content Views, there was on average a 0.5 second decrease in speed when a duplicate GET request occurred.  If there was a significant performance decrease when accessing Content Views in the 6.5 Beta, it's probably unrelated to the duplicate GET requests.

Comment 7 Bryan Kearney 2019-11-05 20:46:11 UTC
Upstream bug assigned to iballou@redhat.com

Comment 8 Ian Ballou 2019-11-07 19:33:52 UTC
We are closing this as WONTFIX because Turbolinks classic (which causes this behavior) is soon going to be dropped from Satellite.