← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1878979] Re: Quota code does not respect [api]/instance_list_per_project_cells

 

** Changed in: nova/stein
       Status: Fix Committed => 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:
  Fix Released
Status in OpenStack Compute (nova) train series:
  Fix Committed
Status in OpenStack Compute (nova) ussuri series:
  Fix Committed

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