Errors after deleting a tenant (Unable to retrieve <resource> list)

Bug #1391185 reported by Denis Kostryukov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
Medium
Paul Karikh
6.0.x
Won't Fix
Medium
MOS Horizon
6.1.x
Won't Fix
Medium
Paul Karikh
7.0.x
Fix Released
Medium
Paul Karikh

Bug Description

After deleting a tenant via Horizon which is selected in the upper drop-down box, we get errors like “unable to retrieve <resource> list” when trying to access projects, networks or other resources.

This is expected, since the corresponding tenant is deleted, but is it possible to automatically switch the tenant to "admin" in this situation?

MOS 5.1
Diagnostic snapshot:
https://drive.google.com/a/mirantis.com/file/d/0B1eJLkMydYieRmRXQ01LbTJMWmM/view?usp=sharing

Revision history for this message
Nastya Urlapova (aurlapova) wrote :

Could you provide iso version and diagnostic snapshot?

Changed in fuel:
status: New → Incomplete
description: updated
description: updated
Revision history for this message
Denis Kostryukov (dkostryukov) wrote :
Changed in fuel:
milestone: none → 6.0
importance: Undecided → Medium
status: Incomplete → Confirmed
assignee: nobody → Fuel Library Team (fuel-library)
milestone: 6.0 → 6.1
Mike Scherbakov (mihgen)
Changed in fuel:
assignee: Fuel Library Team (fuel-library) → MOS Horizon (mos-horizon)
Timur Sufiev (tsufiev-x)
tags: added: horizon
Timur Sufiev (tsufiev-x)
affects: fuel → mos
Changed in mos:
milestone: 6.1 → none
milestone: none → 6.0.1
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Upstream bug 1166585, starting from comment#3

Changed in mos:
milestone: 6.0.1 → 6.1
tags: added: customer-found
Changed in mos:
status: Confirmed → Won't Fix
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Again, this one looks similar to the token revocation issues in Keystone and the authentication/authorization stuff.

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

It seems that we aren't able to fix it in 6.1 before SCF this Thursday, thus moving to 7.0.

Changed in mos:
milestone: 6.0.1 → 7.0
Revision history for this message
Kyrylo Romanenko (kromanenko) wrote :

I have one more way to reproduce this bug without deletion of tenant:

Steps:
1) Login to Horizon as admin
2) Go to Identity -> Project
3) Create new project "NEW" .
4) Add "admin" as roles of "_member_" and "admin" to this project.
5) Remove "admin" role of admin user from NEW project.
6) Try to view Projects and Users pages, you will get "Unable to retrieve <resource> list".

Juno on CentOS 6.5
VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "6.1"
  openstack_version: "2014.2.2-6.1"
  api: "1.0"
  build_number: "354"
  build_id: "2015-04-27_09-17-29"
  nailgun_sha: "2efc207e7156e362c2506b66e63b8bfa745d1153"
  python-fuelclient_sha: "2b311b3b82a1e2df1dc3484a0f37e282273cd988"
  astute_sha: "c1793f982fda7e3fc7b937ccaa613c649be6a144"
  fuel-library_sha: "6bdf783e2bffdce80ecffcca2915e6d32a8ccdd7"
  fuel-ostf_sha: "b38602c841deaa03ddffc95c02f319360462cbe3"
  fuelmain_sha: "01288380950bc89d572cf5902141c9a393ada950"

Timur Sufiev (tsufiev-x)
Changed in mos:
status: In Progress → Confirmed
Revision history for this message
Vlad Okhrimenko (vokhrimenko) wrote :
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/horizon (openstack-ci/fuel-7.0/2015.1.0)

Fix proposed to branch: openstack-ci/fuel-7.0/2015.1.0
Change author: Vlad Okhrimenko <email address hidden>
Review: https://review.fuel-infra.org/10146

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/horizon (openstack-ci/fuel-7.0/2015.1.0)

Reviewed: https://review.fuel-infra.org/10146
Submitter: mos-infra-ci <>
Branch: openstack-ci/fuel-7.0/2015.1.0

Commit: cf55c8509f5e66ec3abeaa2477ef0fb1c12ee562
Author: Vlad Okhrimenko <email address hidden>
Date: Thu Aug 6 12:32:00 2015

Logout user if he has no valid tokens

Before this patch, if user's rights were changed
or revoked - there would be "Unauthorized" errors
on every page since user had no rights to view them
because he had no valid tokens in that case.

Now user will be logged out if he has no valid tokens.
Set `escalate` to True (for unauthorized-error)
to always log user out.

Also, now horizon.exceptions.NotAuthorized is a part of
UNAUTHORIZED tuple in the exceptions.py, because this type
of exception is re-raised after handling services unauthorized errors.
Looks like it was missing. Now the horizon.exceptions.NotAuthorized
is handled like all NotAuthorized exceptions.

And horizon_middleware.py in process_exception now generates
logout_reason for cases if user is not authorized.

Closes-Bug: #1387132
Closes-Bug: #1391185
Closes-Bug: #1463386
Co-Authored-By: Vlad Okhrimenko <email address hidden>

Conflicts:

 openstack_dashboard/dashboards/project/overview/tests.py

Change-Id: I806fd54b5db3938feac446cae16f85a8fb02b273

tags: added: on-verification
Revision history for this message
Anastasia Kuznetsova (akuznetsova) wrote :

Verified on ISO 288
Now user will automatically log out and won't use invalid token

Changed in mos:
status: Fix Committed → Fix Released
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/horizon (openstack-ci/fuel-8.0/liberty)

Fix proposed to branch: openstack-ci/fuel-8.0/liberty
Change author: Vlad Okhrimenko <email address hidden>
Review: https://review.fuel-infra.org/13362

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on openstack/horizon (openstack-ci/fuel-8.0/liberty)

Change abandoned by Paul Karikh <email address hidden> on branch: openstack-ci/fuel-8.0/liberty
Review: https://review.fuel-infra.org/13362

tags: added: wontfix-low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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