shade's 'get_project' method lists all tenants from the whole production before filtering out the desired one

Bug #1820616 reported by Yves-Gwenael Bourhis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ospurge
Fix Released
Undecided
Yves-Gwenael Bourhis

Bug Description

shade's 'get_project' method lists all tenants from the whole production before filtering out the desired one

This is overkill on production environments with hundreds of thousands of tenants.

Revision history for this message
Yves-Gwenael Bourhis (yves-gwenael-bourhis) wrote :

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

Changed in ospurge:
status: New → Confirmed
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ospurge (master)

Reviewed: https://review.opendev.org/644165
Committed: https://git.openstack.org/cgit/x/ospurge/commit/?id=79ecb6f53c157b651d13cd97d5dfdb7b8437042b
Submitter: Zuul
Branch: master

commit 79ecb6f53c157b651d13cd97d5dfdb7b8437042b
Author: Yves-Gwenael Bourhis <email address hidden>
Date: Fri Mar 15 18:53:08 2019 +0100

    To get tenant, use openstacksdk instead of shade.

    Shade retrieves the list of all tenants and filters the result.
    This can be a huge issue on platforms with tons of tenants.

    OpenstackSDK's get_project method acts also like shade's get_project method,
    but OpenstackSDK's identity manager just recovers the desired tenant, so we
    use this.

    Also we pass the OpenStackConfig instance to shade or openstacksdk
    because if we don't, they re-instantiate one uselessly.

    Closes-Bug: #1820616

    Change-Id: I737b031fa9f2e4394d58ac204bf28b422cec1c28

Changed in ospurge:
status: In Progress → Fix Released
Changed in ospurge:
assignee: nobody → Yves-Gwenael Bourhis (yves-gwenael-bourhis)
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.