[SRU] Project selector not working

Bug #1382079 reported by Thiago Paiva Brito
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Lin Hua Cheng
Ubuntu Cloud Archive
Invalid
Undecided
Unassigned
Kilo
Fix Released
Undecided
Liang Chen
horizon (Ubuntu)
Fix Released
Undecided
Unassigned
Vivid
Won't Fix
Undecided
Unassigned
Wily
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * Not able to switch projects by the project dropdown list.

[Test Case]

1 - enable Identity V3 in local_settings.py
2 - Log in on Horizon
3 - make sure that the SESSION_BACKEND is "signed_cookies"
4 - Try to change project on the dropdown

[Regression Potential]

 * None

When you try to select a new project on the project dropdown, the project doesn't change. The commit below has introduced this bug on Horizon's master and has passed the tests verifications.

https://github.com/openstack/horizon/commit/16db58fabad8934b8fbdfc6aee0361cc138b20af

For what I've found so far, the context being received in the decorator seems to be the old context, with the token to the previous project. When you take the decorator out, the context received by the "can_access" function receives the correct context, with the token to the new project.

Steps to reproduce:

1 - Enable Identity V3 (to have a huge token)
2 - Log in on Horizon (lots of permissions loaded on session)
3 - Certify that you SESSION_BACKEND is "signed_cookies"
4 - Try to change project on the dropdown

The project shall remain the same.

Related branches

Revision history for this message
Julie Pichon (jpichon) wrote :

I naively tried to reproduce this by launching an instance then switching project using the dropdown in the top bar, but as far as I can tell it works? I only see the instance in one of the projects as expected, the project overview quotas look correct as well. Are there other steps required to reproduce? Currently running a fresh devstack (Horizon commmit 20b1c189b5).

Revision history for this message
Thiago Paiva Brito (outbrito) wrote :

@jpichon You need to enable Identity V3 in local_settings.py. The main cause of the problem is the size of the session cookie.

description: updated
description: updated
Revision history for this message
Julie Pichon (jpichon) wrote :

Thanks for the tips Thiago! I still can't reproduce it but I now suspect it may be because my catalogue is too small (I don't have many services installed) so I can't get the cookie to grow overly large. I'll test again when I have a chance to set up a new env with more services.

David Lyle (david-lyle)
Changed in horizon:
status: New → Confirmed
importance: Undecided → High
milestone: none → kilo-1
Revision history for this message
David Lyle (david-lyle) wrote :

I can confirm this bug. I think it points to a large issue that needs to be resolved: cookie size limitation.

Regardless of how disciplined we are with what goes into the session cookie, we're going to keep running into this issue. I think the correct answer is requiring a db backing store for session info. Up until Grizzly or Havana, this was a requirement. I think for the convenience of the session cookie, it causes recurrent problems.

Changed in horizon:
assignee: nobody → Thiago Paiva Brito (thiagop)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/132594

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/133050

Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-1 → kilo-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by David Lyle (<email address hidden>) on branch: master
Review: https://review.openstack.org/133050
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-2 → kilo-3
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-3 → kilo-rc1
David Lyle (david-lyle)
Changed in horizon:
milestone: kilo-rc1 → liberty-1
status: In Progress → Confirmed
jun moon (z8715000)
Changed in horizon:
assignee: Thiago Paiva Brito (thiagop) → jun moon (z8715000)
Changed in horizon:
milestone: liberty-1 → liberty-2
Changed in horizon:
milestone: liberty-2 → liberty-3
Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote : Re: Project selector not working

Jun: are you still working on this?

Thierry Carrez (ttx)
Changed in horizon:
milestone: liberty-3 → liberty-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by David Lyle (<email address hidden>) on branch: master
Review: https://review.openstack.org/132594
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote : Re: Project selector not working

Removed assignee, as they don't appear to be active.

Changed in horizon:
assignee: jun moon (z8715000) → nobody
Changed in horizon:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
status: Confirmed → In Progress
David Lyle (david-lyle)
Changed in horizon:
milestone: liberty-rc1 → none
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/220318
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=fa746811e49b867d4995ab97c6709bdcfca1eb0b
Submitter: Jenkins
Branch: master

commit fa746811e49b867d4995ab97c6709bdcfca1eb0b
Author: lin-hua-cheng <email address hidden>
Date: Tue Sep 15 16:19:25 2015 -0700

    Remove session caching of can_access call results

    Partial revert of commit 16db58fabad8934b8fbdfc6aee0361cc138b20af

    Change-Id: I7b80a94117310c92f9eb83541c8d75e2bf638b90
    Closes-Bug: #1450963
    Closes-Bug: #1382079

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/227142

Thierry Carrez (ttx)
Changed in horizon:
milestone: none → liberty-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: liberty-rc1 → 8.0.0
Changed in horizon (Ubuntu Xenial):
status: New → Fix Released
Changed in horizon (Ubuntu Wily):
status: New → Fix Released
Liang Chen (cbjchen)
description: updated
Liang Chen (cbjchen)
description: updated
tags: added: sts
Liang Chen (cbjchen)
Changed in horizon (Ubuntu Vivid):
assignee: nobody → Liang Chen (cbjchen)
status: New → In Progress
Liang Chen (cbjchen)
tags: added: sts-sru
Liang Chen (cbjchen)
Changed in cloud-archive:
assignee: nobody → Liang Chen (cbjchen)
status: New → In Progress
Changed in horizon (Ubuntu Vivid):
status: In Progress → Won't Fix
assignee: Liang Chen (cbjchen) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (stable/kilo)

Change abandoned by Lin Hua Cheng (<email address hidden>) on branch: stable/kilo
Review: https://review.openstack.org/227142
Reason: abandoning due to no more non-critical fixes for kilo

Changed in cloud-archive:
status: In Progress → Invalid
assignee: Liang Chen (cbjchen) → nobody
summary: - Project selector not working
+ [SRU] Project selector not working
Revision history for this message
Ryan Beisner (1chb1n) wrote : Please test proposed package

Hello Thiago, or anyone else affected,

Accepted horizon into kilo-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:kilo-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-kilo-needed to verification-kilo-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-kilo-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-kilo-needed
Revision history for this message
Liang Chen (cbjchen) wrote :

The package in kilo-proposed archive fixed the issue for me.

tags: added: verification-kilo-done
removed: verification-kilo-needed
Revision history for this message
Ryan Beisner (1chb1n) wrote : Update Released

The verification of the Stable Release Update for horizon has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Ryan Beisner (1chb1n) wrote :

This bug was fixed in the package horizon - 1:2015.1.4-0ubuntu2
---------------

 horizon (1:2015.1.4-0ubuntu2) trusty-kilo; urgency=medium
 .
   * d/p/remove-can-access-caching.patch (LP: #1382079): Remove session
     caching of can_access call results which was disabling the project
     selector.

Louis Bouchard (louis)
tags: removed: sts-sru
Revision history for this message
Ryan Beisner (1chb1n) wrote : Please test proposed package

Hello Thiago, or anyone else affected,

Accepted horizon into kilo-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:kilo-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-kilo-needed to verification-kilo-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-kilo-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-kilo-needed
removed: verification-kilo-done
Revision history for this message
Corey Bryant (corey.bryant) wrote : Update Released

The verification of the Stable Release Update for horizon has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Corey Bryant (corey.bryant) wrote :
Download full text (18.2 KiB)

This bug was fixed in the package horizon - 1:2015.1.4-0ubuntu3
---------------

 horizon (1:2015.1.4-0ubuntu3) trusty-kilo; urgency=medium
 .
   * debian/theme/ubuntu/_styles.scss: Ensure btn-primary text color takes
     precedence (LP: #1481216).
 .
 horizon (1:2015.1.4-0ubuntu2) trusty-kilo; urgency=medium
 .
   * d/p/remove-can-access-caching.patch (LP: #1382079): Remove session
     caching of can_access call results which was disabling the project
     selector.
 .
 horizon (1:2015.1.4-0ubuntu1) trusty-kilo; urgency=medium
 .
   * New upstream stable release (LP: #1580334).
 .
 horizon (1:2015.1.3-0ubuntu1) trusty-kilo; urgency=medium
 .
   * New upstream stable release (LP: #1559215, #1352256).
 .
 horizon (1:2015.1.2-0ubuntu1) vivid; urgency=medium
 .
   [ Chuck Short ]
   * Resynchronize with stable/kilo (5b9bdca) (LP: #1481008):
     - [5b9bdca] Use security group id not name in the create instance dialog
     - [74d885f] Fix not opening region selector on first click
     - [b8e1ce8] Neutron Quota Settings Flag Disables Neutron GUI
     - [853f0ec] Fix inability to switch region via Switch Region dropdown
     - [0b3c92d] Updated from global requirements
     - [d6be306] Fix a unit test for create instance
     - [8ed7624] Compatibility fix for pyscss 1.3.4
     - [7c8fc8f] Skip test_routerrule_detail blocking the gate
     - [fea681e] Remove 'shared' from Neutron Firewall table
     - [1d20ea0] Fix static file paths in heat topology view
     - [8da65b6] Don't get descript if attribute doesn't exist.
     - [905e92b] Fix attribute error with old glance backend
     - [c079705] Added correct URL to edit QoS spec
     - [900ca63] Updated from global requirements
     - [3becb61] Port cleanup on failed VM instance launch
     - [b84218d] N1Kv: Fix failing network and port creates
     - [0f9d94e] Add OPENSTACK_NOVA_EXTENSIONS_BLACK
 .
   [ Corey Byrant ]
   * d/rules: Prevent dh_python2 from guessing dependencies.
   * d/openstack-dashboard-ubuntu-theme.postrm: Ensure that purge and
     reload of static assets is only done on purge/remove, resolving
     problems when upgrading to new versions (LP: #1506826).
 .
 horizon (1:2015.1.1-0ubuntu1) vivid; urgency=medium
 .
   * Resynchronize with stable/kilo (bb05237) (LP: #1481008):
     - [d29a68c] Removing Network Profile support in stable/kilo
     - [cfb16ec] Add a conditional judgement to avoid invalid dict index
     - [824df76] Fix mock issues found due to new mock release
     - [82f63a5] Fix Create User form's fields sorting for Django 1.7
     - [f0691cf] changing email from user list deletes user passwd
     - [25c961f] fix delete action always cause error
     - [ec27165] Fix date pickers in metering modal
     - [8ed6a85] Wait until the image is registered in Sahara image test
     - [fcff73c] Skip test_{floatingip,image_register_unregister,create_delete_user} for now
     - [1e84c93] Handle errors during glance image updates correctly
     - [2fc3fcd] corrected the create volume from snapshot
     - [84da479] Escape the description param from heat template
     - [bafdabb] Prevent multiple form submission on table row actions
     - [0642fdd] Fixing data processing operat...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.