yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #82680
[Bug 1878979] Re: Quota code does not respect [api]/instance_list_per_project_cells
Reviewed: https://review.opendev.org/728575
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ab16946885e68ccdef7222a71cc0ad6f92b10de7
Submitter: Zuul
Branch: master
commit ab16946885e68ccdef7222a71cc0ad6f92b10de7
Author: Mohammed Naser <mnaser@xxxxxxxxxxxx>
Date: Fri May 15 16:49:12 2020 -0400
Make quotas respect instance_list_per_project_cells
This option was introduced in order to limit queries to cells which only
belong to the project we're interacting with. However, The nova quota
code was not respecting it and therefore it was always trying to get the
cells assigned to a project even with that option disabled.
This patch makes the quota code respect that option and adds testing to
ensure that enabling the option does make sure it doesn't search all
cells but only the ones for this project.
Closes-Bug: #1878979
Change-Id: I2e0d48e799e70d550f912ad8a424c86df3ade3a2
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1878979
Title:
Quota code does not respect [api]/instance_list_per_project_cells
Status in OpenStack Compute (nova):
Fix Released
Status in OpenStack Compute (nova) stein series:
New
Status in OpenStack Compute (nova) train series:
New
Status in OpenStack Compute (nova) ussuri series:
New
Bug description:
The function which counts resources using the legacy method involves
getting a list of all cell mappings assigned to a specific project:
https://github.com/openstack/nova/blob/575a91ff5be79ac35aef4b61d84c78c693693304/nova/quota.py#L1170-L1209
This code can be very heavy on a database which contains a lot of
instances (but not a lot of mappings), potentially scanning millions
of rows to gather 1-2 cell mappings. In a single cell environment, it
is just extra CPU usage with exactly the same outcome.
The [api]/instance_list_per_project_cells was introduced to workaround
this:
https://github.com/openstack/nova/blob/575a91ff5be79ac35aef4b61d84c78c693693304/nova/compute/instance_list.py#L146-L153
However, the quota code does not implement it which means quota count
take a big toll on the database server. We should ideally mirror the
same behaviour in the quota code.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1878979/+subscriptions
References