Bug 1297432

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: Chris Pelland <cpelland>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED ERRATA QA Contact: Pete Savage <psavage>
Severity: urgent Docs Contact:
Priority: high    
Version: 5.4.0CC: cpelland, dajohnso, hkataria, jhardy, jkrocil, jocarter, jprause, mfeifer, mpovolny, obarenbo, psavage, snansi
Target Milestone: GAKeywords: ZStream
Target Release: 5.5.3Flags: cfme-bot: needinfo?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.5.3.2 Doc Type: Bug Fix
Doc Text:
In the previous version of CloudForms Management Engine, switching user groups from the user interface could result in disabling the virtual machine console buttons. This bug was a result of clearing the session hash variable as a part of switching user groups, which invalidated the browser version and operating system information stored in the session variable. This bug was fixed by saving and restoring critical session variable keys when switching users. Console buttons work as expected in the new version of CloudForms Management Engine.
Story Points: ---
Clone Of: 1297074 Environment:
Last Closed: 2016-04-13 18:40:58 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: 1292471, 1297074, 1297434, 1302773    
Bug Blocks:    

Comment 3 CFME Bot 2016-01-11 22:36:02 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 4 CFME Bot 2016-01-11 23:51:03 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 5 CFME Bot 2016-01-11 23:51:15 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 6 CFME Bot 2016-01-12 19:29:48 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 7 CFME Bot 2016-01-12 19:30:15 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 9 Pete Savage 2016-01-18 21:04:18 UTC
Need these steps to be a little clearer.

Am I using one session to be logged in as UserA, then switching their group in another browser session logged in as admin?

Or is the user expected to change their own group?

Comment 10 Harpreet Kataria 2016-01-28 14:01:08 UTC
Pete,

This fixes the issue where user is logged in as one user and then changing their group from top right in UI was clearing out the browser info from session making VM console buttons unavailable for the user after changing groups in same browser session.

Hope this info helps. Let me know if you have further questions.

~Harpreet

Comment 12 Harpreet Kataria 2016-01-30 20:51:37 UTC
Pete, 

Can you provide an appliance IP where i can recreate this issue.

Thanks,
~Harpreet

Comment 15 CFME Bot 2016-02-01 21:36:44 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 18 CFME Bot 2016-02-02 20:50:00 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 19 CFME Bot 2016-02-02 20:50:13 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 20 CFME Bot 2016-02-10 19:01:06 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 21 CFME Bot 2016-02-10 19:01:31 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 23 CFME Bot 2016-02-15 15:36:44 UTC
Detected commit referencing this ticket while ticket status is MODIFIED.

Comment 25 Pete Savage 2016-04-04 10:50:30 UTC
Verified in 5.5.3.2

Comment 27 errata-xmlrpc 2016-04-13 18:40:58 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:0616