Bug 1297074

Summary: CF 3.2: Switching user groups invalidates browser/version/os information, which might be disabling the console buttons on the VM.
Product: Red Hat CloudForms Management Engine Reporter: Josh Carter <jocarter>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED ERRATA QA Contact: Jiri Stefanisin <jistefan>
Severity: urgent Docs Contact:
Priority: high    
Version: 5.4.0CC: cpelland, hkataria, jhardy, jistefan, jprause, mfeifer, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: ZStream
Target Release: 5.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.6.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1297432 1297434 (view as bug list) Environment:
Last Closed: 2016-06-29 15:26:43 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:
Bug Depends On:    
Bug Blocks: 1297432, 1297434    

Description Josh Carter 2016-01-08 23:06:11 UTC
Description of problem:

This is a repeatable error.

If I log in as a userA and look at the Configure->About tab, I will see legitimate values for Browser, Browser Version, Browser OS.
If I switch userA to a different group and then look at Configure->About tab, Browser, Browser Version, Browser OS values will be "Unknown".

I believe this impacts VM Console buttons because the buttons seem to be active or grayed-out depending on the browser info.

So it prevents the user from using the console unless he logs out and logs in again.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 CFME Bot 2016-01-11 22:35:58 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/93308442cfc4c70a1b8806a45ac20296512b04fb

commit 93308442cfc4c70a1b8806a45ac20296512b04fb
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon Jan 11 09:08:27 2016 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Mon Jan 11 13:03:33 2016 -0500

    Need to restore certain keys back into session hash
    
    session.clear call clears out user's browser information that's being saved in session when user logs in, need to save & restore certain keys in session hash for later use.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1297074
    https://bugzilla.redhat.com/show_bug.cgi?id=1297432
    https://bugzilla.redhat.com/show_bug.cgi?id=1297434

 app/controllers/dashboard_controller.rb       | 12 ++++--------
 spec/controllers/dashboard_controller_spec.rb | 25 +++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 8 deletions(-)

Comment 5 CFME Bot 2016-01-11 23:50:59 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=7b5fed5d476f44941cd93f6a483fcf5209074e67

commit 7b5fed5d476f44941cd93f6a483fcf5209074e67
Merge: e0890cc fbd0a8b
Author:     Dan Clarizio <dclarizi>
AuthorDate: Mon Jan 11 18:40:08 2016 -0500
Commit:     Dan Clarizio <dclarizi>
CommitDate: Mon Jan 11 18:40:08 2016 -0500

    Merge branch '55z_pr_6125' into '5.5.z'
    
    Need to restore certain keys back into session hash
    
    session.clear call clears out user's browser information that's being saved in session when user logs in, need to save & restore certain keys in session hash for later use.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1297074
    https://bugzilla.redhat.com/show_bug.cgi?id=1297432
    https://bugzilla.redhat.com/show_bug.cgi?id=1297434
    (cherry picked from commit 9330844)
    
    @dclarizi this is clean 5.5.z cherry-pick for https://github.com/ManageIQ/manageiq/pull/6125
    
    See merge request !702

 app/controllers/dashboard_controller.rb       | 12 ++++--------
 spec/controllers/dashboard_controller_spec.rb | 25 +++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 8 deletions(-)

Comment 6 CFME Bot 2016-01-11 23:51:11 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=fbd0a8bd3dc94e134cb44e5c30174b5cb22defde

commit fbd0a8bd3dc94e134cb44e5c30174b5cb22defde
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon Jan 11 09:08:27 2016 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Mon Jan 11 17:18:15 2016 -0500

    Need to restore certain keys back into session hash
    
    session.clear call clears out user's browser information that's being saved in session when user logs in, need to save & restore certain keys in session hash for later use.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1297074
    https://bugzilla.redhat.com/show_bug.cgi?id=1297432
    https://bugzilla.redhat.com/show_bug.cgi?id=1297434
    (cherry picked from commit 9330844)

 app/controllers/dashboard_controller.rb       | 12 ++++--------
 spec/controllers/dashboard_controller_spec.rb | 25 +++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 8 deletions(-)

Comment 7 CFME Bot 2016-01-12 19:29:44 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=1f6f5ea6243adf62f6104357e84b586be487707c

commit 1f6f5ea6243adf62f6104357e84b586be487707c
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon Jan 11 17:24:58 2016 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Tue Jan 12 11:25:42 2016 -0500

    Need to restore certain keys back into session hash
    
    session.clear call clears out user's browser information that's being saved in session when user logs in, need to save & restore certain keys in session hash for later use.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1297074
    https://bugzilla.redhat.com/show_bug.cgi?id=1297432
    https://bugzilla.redhat.com/show_bug.cgi?id=1297434
    (cherry picked from commit 9330844)

 vmdb/app/controllers/dashboard_controller.rb       | 12 ++++-------
 vmdb/spec/controllers/dashboard_controller_spec.rb | 25 ++++++++++++++++++++++
 2 files changed, 29 insertions(+), 8 deletions(-)

Comment 8 CFME Bot 2016-01-12 19:30:11 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=a2700819614e7e239624522b2fdea4451147b9fc

commit a2700819614e7e239624522b2fdea4451147b9fc
Merge: 711d46a 1f6f5ea
Author:     Dan Clarizio <dclarizi>
AuthorDate: Tue Jan 12 14:04:31 2016 -0500
Commit:     Dan Clarizio <dclarizi>
CommitDate: Tue Jan 12 14:04:31 2016 -0500

    Merge branch '54z_pr_6125' into '5.4.z'
    
    Need to restore certain keys back into session hash
    
    session.clear call clears out user's browser information that's being saved in session when user logs in, need to save & restore certain keys in session hash for later use.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1297074
    https://bugzilla.redhat.com/show_bug.cgi?id=1297432
    https://bugzilla.redhat.com/show_bug.cgi?id=1297434
    (cherry picked from commit 9330844)
    
    @dclarizi please review, this is clean 5.4.z cherry-pick for https://github.com/ManageIQ/manageiq/pull/6125
    
    See merge request !703

 vmdb/app/controllers/dashboard_controller.rb       | 12 ++++-------
 vmdb/spec/controllers/dashboard_controller_spec.rb | 25 ++++++++++++++++++++++
 2 files changed, 29 insertions(+), 8 deletions(-)

Comment 10 CFME Bot 2016-02-01 17:41:33 UTC
Detected commit referencing this ticket while ticket status is MODIFIED.

Comment 11 CFME Bot 2016-02-01 21:36:49 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/7844fd4473ec2c9c256b602c3c40ae1ba66c16d1

commit 7844fd4473ec2c9c256b602c3c40ae1ba66c16d1
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon Feb 1 10:03:01 2016 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Mon Feb 1 10:07:38 2016 -0500

    Changed session.merge! to session.update
    
    session.merge! was not setting keys in Session object in the rails app.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1297432
    https://bugzilla.redhat.com/show_bug.cgi?id=1297074
    https://bugzilla.redhat.com/show_bug.cgi?id=1297434

 app/controllers/dashboard_controller.rb       | 2 +-
 spec/controllers/dashboard_controller_spec.rb | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

Comment 12 CFME Bot 2016-02-02 20:50:05 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=d1fb8f1ecc724f76dcd4c362c757d6e9259654f1

commit d1fb8f1ecc724f76dcd4c362c757d6e9259654f1
Merge: 1520fa7 8e26fab
Author:     Dan Clarizio <dclarizi>
AuthorDate: Tue Feb 2 15:29:04 2016 -0500
Commit:     Dan Clarizio <dclarizi>
CommitDate: Tue Feb 2 15:29:04 2016 -0500

    Merge branch '54z_pr_6459' into '5.4.z'
    
    Changed session.merge! to session.update
    
    session.merge! was not setting keys in Session object in the rails app.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1297432
    https://bugzilla.redhat.com/show_bug.cgi?id=1297074
    https://bugzilla.redhat.com/show_bug.cgi?id=1297434
    (cherry picked from commit 7844fd4)
    
    @dclarizi please review, this is clean 5.4.z cherry-pick for https://github.com/ManageIQ/manageiq/pull/6459
    
    See merge request !764

 vmdb/app/controllers/dashboard_controller.rb       | 2 +-
 vmdb/spec/controllers/dashboard_controller_spec.rb | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

Comment 13 CFME Bot 2016-02-02 20:50:18 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=8e26fab55baa7467b8d9aa3c4a726fa50c476587

commit 8e26fab55baa7467b8d9aa3c4a726fa50c476587
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon Feb 1 16:58:38 2016 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Mon Feb 1 16:58:38 2016 -0500

    Changed session.merge! to session.update
    
    session.merge! was not setting keys in Session object in the rails app.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1297432
    https://bugzilla.redhat.com/show_bug.cgi?id=1297074
    https://bugzilla.redhat.com/show_bug.cgi?id=1297434
    (cherry picked from commit 7844fd4)

 vmdb/app/controllers/dashboard_controller.rb       | 2 +-
 vmdb/spec/controllers/dashboard_controller_spec.rb | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

Comment 14 CFME Bot 2016-02-10 19:01:13 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=81a5df0705cee400f67d8de5ec5547ab17d892d9

commit 81a5df0705cee400f67d8de5ec5547ab17d892d9
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon Feb 1 10:03:01 2016 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Tue Feb 9 13:55:35 2016 -0500

    Changed session.merge! to session.update
    
    session.merge! was not setting keys in Session object in the rails app.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1297432
    https://bugzilla.redhat.com/show_bug.cgi?id=1297074
    https://bugzilla.redhat.com/show_bug.cgi?id=1297434
    (cherry picked from commit 7844fd4)

 app/controllers/dashboard_controller.rb       | 2 +-
 spec/controllers/dashboard_controller_spec.rb | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

Comment 15 CFME Bot 2016-02-10 19:01:37 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=dfaa7f72b3cbc37f76a048da0f2ad8949c0503e3

commit dfaa7f72b3cbc37f76a048da0f2ad8949c0503e3
Merge: 65bd384 81a5df0
Author:     Dan Clarizio <dclarizi>
AuthorDate: Wed Feb 10 13:49:38 2016 -0500
Commit:     Dan Clarizio <dclarizi>
CommitDate: Wed Feb 10 13:49:38 2016 -0500

    Merge branch '55z_pr_6459' into '5.5.z'
    
    Changed session.merge! to session.update
    
    session.merge! was not setting keys in Session object in the rails app.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1297432
    https://bugzilla.redhat.com/show_bug.cgi?id=1297074
    https://bugzilla.redhat.com/show_bug.cgi?id=1297434
    (cherry picked from commit 7844fd4)
    
    @dclarizi please review, this is clean 5.5.z cherry-pick for https://github.com/ManageIQ/manageiq/pull/6459
    
    See merge request !763

 app/controllers/dashboard_controller.rb       | 2 +-
 spec/controllers/dashboard_controller_spec.rb | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

Comment 17 CFME Bot 2016-02-15 15:36:59 UTC
Detected commit referencing this ticket while ticket status is MODIFIED.

Comment 20 Harpreet Kataria 2016-05-09 18:29:42 UTC
Jiri,

I cannot recreate this issue at all on latest upstream as well as on latest 5.5.z codebase. After i switch user's group, i am successfully able to browse around in the UI without any issues. Can you please test with next build and provide an access to your appliance if you continue to encounter the issue. Can you also provide information about which browser you are using and any specific steps you are performing that makes you logout of the system.

Thanks,
~Harpreet

Comment 21 Jiri Stefanisin 2016-05-17 07:29:26 UTC
Hello Harpreet,

I am still not able to replicate this without user getting disconnected after changing his role. Last version I tried this is 5.6.0.6-beta2.5.20160511140943_ff75fb2 from May 11.

Steps to reproduce:
1)Open up Firefox (46.0.1) or Chrome (50.0.2661.102 (64-bit))
2)Log in as Administrator
3)Create new testusr with group EvmGroup-user
4)Create new Group testGrp on EvmRole-user role
5)Open private window of browser and log in as testusr
6)In admin browser, change testusr's group to EvmGroup-security
7)In testusr browser click on any link >> User gets disconnected with https://10.8.59.193/?timeout=true
-This is behaviour with changing group + role
8)In admin browser, change testusr's group to EvmGroup-user >> testusr's role is now EvmRole-user
9)In testuser browser, log in again and check group and role
10)In admin browser, change testuser's group to testGrp from step 4 >> User gets disconnected with https://10.8.59.193/?timeout=true
-This is behaviour with changing group

Hope this helps.
Regards, Jiri

Comment 22 Harpreet Kataria 2016-05-17 13:36:13 UTC
Jiri,

You cannot use multiple tabs in the same browser to access the CFME UI, looks like that is the issue. Can you try to do everything in the same tab. Currently we do not support multiple tabs in CFME UI. Alternatively you can use two different browsers, for example login as admin in Firefox and login as testuser in Chrome.

Let me know if it works fine using a single tab in browser or 2 different browsers..

Thanks,
~Harpreet

Comment 23 Jiri Stefanisin 2016-05-23 11:44:52 UTC
Hello Harpreet,

I've been trying this in:
 Firefox 46.0.1 (admin logged in normal browser, testusr logged in private one)
 Chrome 50.0.2661.102 (64-bit) (admin logged in normal browser, testusr logged in private one)
 and their combinations with same result.


The behavior described before can be observed on my test environment 10.8.199.154

Regards, Jiri

Comment 24 Harpreet Kataria 2016-05-23 13:11:09 UTC
Jiri,

Can you please provide testusr user's password, i am not able to login into your appliance as testusr

Thanks,
~Harpreet

Comment 25 Jiri Stefanisin 2016-05-27 09:53:20 UTC
Hello,

I've prepared testusr (pw: test) on new appliance 10.8.199.113. Please let me know if You were successful with test.

Regards, Jiri

Comment 26 Harpreet Kataria 2016-05-27 13:51:09 UTC
Jiri,

I was able to recreate the issue now, but this doesn't seem to be related to the original bug reported/fixed in this BZ. Bug in this ticket was fixed to retain session information of user when user's group is switched to another group using group switcher on the top right corner of screen. 

Please open a new bug ticket to report the issue above. 
The bug you are reporting is that user's session information is not retained if user's group has been changed by an admin from another session while user is logged in into product. Hope this helps.

Thanks,
~Harpreet.

Comment 28 Harpreet Kataria 2016-05-31 13:19:03 UTC
sending this BZ to POST as original issue reported in this BZ has been fixed and a new BZ has been opened to report the problem discussed in above comments.

~Harpreet

Comment 29 Jiri Stefanisin 2016-06-07 07:49:03 UTC
Verified on 5.5.4.2.20160517154712_629f93b. For 5.6 was created https://bugzilla.redhat.com/show_bug.cgi?id=1340705.

Comment 31 errata-xmlrpc 2016-06-29 15:26:43 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, 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-2016:1348