Limit API lacks abstraction for enforcement models

Bug #1768572 reported by Lance Bragstad
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
wangxiyuan

Bug Description

The unified limits API introduced in Queens implemented a single enforcement model called "flat". Since "flat" was the initial enforcement model implementation, it was tightly coupled with the rest of the logic for the limit API [0].

In the future, we plan to make enforcement models configurable so that deployments can choose how they want limit enforcement to behave across projects. This will be easier to do if we decouple the enforcement model from the actual limit CRUD. The limit API will become simpler because its won't have to worry about different characteristics of various enforcement models. Instead, that logic can be encapsulated into a single object, making it the sole responsibility of that object.

[0] https://github.com/openstack/keystone/blob/ec338a3374000bcecf01acd9b4bce64f71d94a11/keystone/limit/core.py#L59-L63

Tags: limits
Changed in keystone:
importance: Undecided → Medium
status: New → Triaged
tags: added: limits
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to keystone (master)

Reviewed: https://review.openstack.org/562715
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=fd4b7371338d9a7d5487254ada3303eef7796d62
Submitter: Zuul
Branch: master

commit fd4b7371338d9a7d5487254ada3303eef7796d62
Author: Lance Bragstad <email address hidden>
Date: Thu Apr 19 15:22:50 2018 +0000

    Implement enforcement model logic in Manager

    This commit adds the necessary bits to return the enforcement model
    used by a deployment in the limit Manager. A subsequent patch will
    expose this functionality via the API.

    This commit also starts introdcuing the concept of enforcement
    models and puts the flat model into its own module. This will make
    more sense and be easier to maintain as we implement more models.

    Change-Id: I32227eb0023e6b6ce699909fabb60a63a07f0969
    Related-Bug: 1765193
    Related-Bug: 1768572

Revision history for this message
Lance Bragstad (lbragstad) wrote :
Changed in keystone:
assignee: nobody → wangxiyuan (wangxiyuan)
status: Triaged → Fix Committed
Colleen Murphy (krinkle)
Changed in keystone:
status: Fix Committed → Fix Released
Changed in keystone:
milestone: none → rocky-3
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.