Reviewed: https://review.opendev.org/c/openstack/neutron/+/851357 Committed: https://opendev.org/openstack/neutron/commit/bd60f0833bb439192140b7d04e0b01a5d63f0bb5 Submitter: "Zuul (22348)" Branch: master
commit bd60f0833bb439192140b7d04e0b01a5d63f0bb5 Author: Rodolfo Alonso Hernandez <[email protected]> Date: Wed Jul 27 17:55:48 2022 +0200 Implement specific tracked resource count method per quota driver This patch implements a new method specific for each quota driver class. This method, "get_resource_count", returns the current number of resources created in a project of a tracked resource. A tracked resource is an instance of ``neutron.quota.resource.TrackedResource``. This method does not count the current reservations, just the actual resources created. This new method, "get_resource_count", will be added to the abstract class ``neutron_lib.db.quota_api.QuotaDriverAPI``. This patch also fixes ``TestDbQuotaDriverNoLock``, that was using a plugin inheriting from ``DbQuotaDriver`` instead of ``DbQuotaNoLockDriver``. Closes-Bug: #1982962 Change-Id: I2707506468cb60d93a4459ea364f1e79faa83838 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1982962 Title: Quota driver "DbQuotaNoLockDriver" should implement "get_detailed_project_quotas" Status in neutron: Fix Released Bug description: Checking the logs, when the quota details are requested and "DbQuotaNoLockDriver" is loaded, some resources usages are "recalculated". E.g.: Quota usage for security_group_rule was recalculated. Used quota:13. count_used The driver "DbQuotaNoLockDriver" does not use the database table "quotausages"; instead of this, the new method "DbQuotaNoLockDriver.get_detailed_project_quotas" should count directly from the database the resource count. Related Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2102147 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1982962/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

