List role assignments filters performance

Bug #1359231 reported by Samuel de Medeiros Queiroz
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Invalid
Wishlist
Samuel de Medeiros Queiroz

Bug Description

When listing role assignments, we have the option to filter them by actor, target and role.
As Henry Nash pointed out at [1] , the current implementation uses the standard filtering the V3.wrap_collection. Given the large number of individual assignments, this is pretty inefficient.

The controller should pass the filters into the driver call, so that the list size is kept a minimum.
For example, if the user wants to filter role assignments by project X, the driver would query the DB only selecting the role assignments where target_id = X.id, instead of querying everything and returning the result to be filtered by the controller.

[1] https://github.com/openstack/keystone/blob/498a0032db89997244d3dc7e65ce9b37eac84283/keystone/assignment/controllers.py#L860-L864

Tags: performance
Revision history for this message
David Stanek (dstanek) wrote :

I agree that this should be fixed for the assignment SQL backend.

description: updated
Changed in keystone:
status: New → Confirmed
importance: Undecided → Wishlist
description: updated
Changed in keystone:
assignee: nobody → Samuel de Medeiros Queiroz (samuel-z)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
status: Confirmed → In Progress
Dolph Mathews (dolph)
tags: added: performance
Changed in keystone:
assignee: Samuel de Medeiros Queiroz (samuel-z) → Rodrigo Duarte (rodrigodsousa)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (feature/hierarchical-multitenancy)

Fix proposed to branch: feature/hierarchical-multitenancy
Review: https://review.openstack.org/118449

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (feature/hierarchical-multitenancy)

Change abandoned by Samuel de Medeiros Queiroz (<email address hidden>) on branch: feature/hierarchical-multitenancy
Review: https://review.openstack.org/118449
Reason: I did a mistake. This patch must be on the master branch
https://review.openstack.org/#/c/116682/

Changed in keystone:
assignee: Rodrigo Duarte (rodrigodsousa) → Samuel de Medeiros Queiroz (samuel-z)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Samuel de Medeiros Queiroz (<email address hidden>) on branch: feature/hierarchical-multitenancy
Review: https://review.openstack.org/118449

Changed in keystone:
assignee: Samuel de Medeiros Queiroz (samuel-z) → Rodrigo Duarte (rodrigodsousa)
Changed in keystone:
assignee: Rodrigo Duarte (rodrigodsousa) → Samuel de Medeiros Queiroz (samuel-z)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by Samuel de Medeiros Queiroz (<email address hidden>) on branch: master
Review: https://review.openstack.org/116682
Reason: This change will come after the split of assignments backend.
So I'm rebasing this work there.

Revision history for this message
Samuel de Medeiros Queiroz (samueldmq) wrote :

Invalidated in favor of the created blueprint to fix this [1].

[1] https://blueprints.launchpad.net/keystone/+spec/list-role-assignments-performance

Changed in keystone:
status: In Progress → Invalid
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.