Bug 1192219

Summary: idle webadmin does not logout automatically if we are in the VMs main tab and there is a selected VM
Product: Red Hat Enterprise Virtualization Manager Reporter: Einav Cohen <ecohen>
Component: ovirt-engine-webadmin-portalAssignee: Alexander Wels <awels>
Status: CLOSED DUPLICATE QA Contact: Jiri Belka <jbelka>
Severity: high Docs Contact:
Priority: high    
Version: 3.5.0CC: alonbl, ecohen, gklein, lsurette, rbalakri, Rhev-m-bugs, yeylon, ykaul, ylavi
Target Milestone: ---   
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ux
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-30 14:38:18 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:
Embargoed:
Attachments:
Description Flags
Browser (Firefox) Network Profiling none

Description Einav Cohen 2015-02-12 21:54:46 UTC
Created attachment 991157 [details]
Browser (Firefox) Network Profiling

Description of problem:
When browsing to the web-admin, selecting the VMs main tab, selecting a VM in the VMs grid and leaving the web-admin idle, the web-admin doesn't log out. 

Version-Release number of selected component (if applicable):
latest master, possibly in 3.5 as well (see bug 1175313)

How reproducible:
100%

Steps to Reproduce:
1. Log into web-admin (you will automatically be navigated to the VMs main tab
2. Select a VM
3. Leave the GUI idle for more than configured engine session time-out * 2

Actual results:
Web admin stays logged in

Expected results:
Web admin automatically logs out after no more than configured engine session time-out * 2. 

Additional info:
I suspect that when a VM is selected, we are *periodically* calling a certain query (i.e. maybe for details for the 'General' sub-tab or similar) with "refresh=true" always, which is bad - need to find this query and make sure that it is invoked with "refresh=false" for background-refresh invocations. 

See attached screen-shot that shows browser network profiling: Note that when a VM is selected, there is a call to "/api" (which is done by the ui-plugins infrastructure) every 1 minute. 
The ui-plugins infrastructure is calling "/api" (as a heartbeat mechanism in order to keep the REST-API session alive) only upon doing one of the following in the GUI:
- invoking an action
- invoking a query with "refresh=true"
i.e. when the GUI is invoking a query with "refresh=false", the ui-plugins infrastructure will not call "/api". 
more details in http://gerrit.ovirt.org/#/c/36622/. 
The periodical "refresh=true" queries (+ the ui-plugins heartbeat mechanism) are keeping the engine session alive, preventing auto-logout even when GUI is idle. 

When a VM is not selected, the behavior is fine: there are no "/api" calls at all, which implies that the GUI is not invoking any queries with "refresh=true", which means that if the GUI is kept idle long enough (up to engine session time out * 2), the engine session will eventually die and the user will be automatically logged out.

Comment 2 Eyal Edri 2015-02-25 08:43:21 UTC
3.5.1 is already full with bugs (over 80), and since none of these bugs were added as urgent for 3.5.1 release in the tracker bug, moving to 3.5.2

Comment 4 Yaniv Lavi 2015-03-30 14:38:18 UTC

*** This bug has been marked as a duplicate of bug 1206338 ***