Bug 1341664

Summary: page doesn't exist after session timeout on provider timeline page
Product: Red Hat CloudForms Management Engine Reporter: Dafna Ron <dron>
Component: UI - OPSAssignee: Yaacov Zamir <yzamir>
Status: CLOSED CURRENTRELEASE QA Contact: Gilad Shefer <gshefer>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.6.0CC: cpelland, dron, epacific, fsimonce, hkataria, jhardy, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.7.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: container
Fixed In Version: 5.7.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1370202 (view as bug list) Environment:
Last Closed: 2017-01-11 20:06:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Container Management Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1370202    

Description Dafna Ron 2016-06-01 12:54:29 UTC
Description of problem:

I was looking at the provider timeline and after the session expired and I tried to log in I got a "page not found" error. 

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


How reproducible:

unknown

Steps to Reproduce:
1. Navigate to compute -> container -> providers
2. select a provider -> monitoring -> timeline 
3. select event group: Alarm/Status Change/Error
4. select Level: Detail
5. after timeout -> log in again 

Actual results:

get a page doesn't exit

Expected results:

we should be able to log in again 

Additional info: logs and screen shot

Comment 1 Dafna Ron 2016-06-01 14:53:05 UTC
This is reproducible 100% 
Happened to me again.

Comment 2 Federico Simoncelli 2016-08-23 09:39:54 UTC
Dafna if this is still reproducible can you work with Yaacov (on your system) to find and fix the issue? Thanks.

Comment 3 Yaacov Zamir 2016-08-23 12:12:53 UTC
I can't reproduce on master, tried also on CFME 5.6.1 with Pavel but we could not reproduce.

Dafna, I think we can close it, and re-open if we see it again ?

Comment 4 Dafna Ron 2016-08-23 12:21:24 UTC
please do.

Comment 5 Yaacov Zamir 2016-08-23 12:25:02 UTC
Just reproduced on my machine.

What happen:
1. we have an http request to the page:
GET  ems_container/5?display=timeline

2. we have an ajax request to:
POST ems_container/tl_chooser/5?tl_fl_grp1=Alarm/Status change/Errors

3. we have session timeout

4. after re-login we go to:
GET  ems_container/tl_chooser/5?tl_fl_grp1=Alarm/Status change/Errors
that does not exist.

This is not 100% reproducible it's very time sensitive bug, you need to timeout exactly at the right time.

Comment 8 CFME Bot 2016-09-01 14:00:49 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/0022001db5be7b6212a4ff927698e6c21078f56e

commit 0022001db5be7b6212a4ff927698e6c21078f56e
Author:     Yaacov Zamir <yzamir>
AuthorDate: Tue Aug 23 17:48:11 2016 +0300
Commit:     Yaacov Zamir <yzamir>
CommitDate: Thu Sep 1 16:20:20 2016 +0300

    Check the request method before using requet url as startup page
    
    On rare events when an ajax request trigers the session timout, and loads the
    login page, the startup page will be a page not found error.
    This PR prevent the page not found error in this cases. In the cases of an
    ajax POST request that trigers the timeout, we will replay with an unautherized replay.
    
    Bugzilla
    https://bugzilla.redhat.com/show_bug.cgi?id=1341664

 app/controllers/application_controller.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 9 Yaacov Zamir 2016-09-01 14:02:53 UTC
Merged upstream:
https://github.com/ManageIQ/manageiq/pull/10702