Repository navigation
feat(cinder): add project and volume-type quota metrics - #4
Open
davidhulick wants to merge 3 commits into
Open
davidhulick wants to merge 3 commits into
davidhulick wants to merge 3 commits into
Conversation
Read persisted project limits, usage, defaults and active volume types independently. Preserve signed accounting and isolate ambiguous resources with sanitized diagnostics. Extend shared configuration and register one quota collector while retaining the limits adapter. Expose Cinder capacities in bytes and add domain identity to quota capacities. Keep inventory attachment-row behavior for the separate deduplication fix. Requires the public openstackdb Cinder and Octavia quota APIs. Keep the canonical library requirement and validate through an external workspace. Short and race tests, vet, build and module verification pass; native database validation is blocked by unavailable Docker. Signed-off-by: David Hulick <dave.hulick@gmail.com>
Extend the existing Cinder fixture with nullable overrides, default-class limits, signed accounting, deleted rows, typed resources and idle and usage-only projects. Check all sixteen quota families, exact labels and gauge values, inventory bytes and retired capacity names. Preserve the existing service fixtures, Octavia quota assertions and Nova task-state check. Integration-tag vet passes; native MariaDB execution is blocked because Docker is unavailable. Signed-off-by: David Hulick <dave.hulick@gmail.com>
davidhulick
force-pushed
the
contrib/cinder-quotas-2b4
branch
from
November 19, 2026 21:00
0dc043f to
8e3d70a
Compare
This was referenced Nov 20, 2026
The staged openstackdb Cinder quota rework removed the QuotaRepository wrapper and renamed several query methods, leaving the exporter unable to compile against the updated API. Update the Cinder quota collector to use the generated Queries API directly and adjust the associated test expectations. Preserve existing quota accounting, default precedence, error handling, and Prometheus metric behavior. Verified against the combined staged Cinder and Octavia openstackdb APIs with successful build, vet, and targeted unit tests. Signed-off-by: David Hulick <dave.hulick@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add Cinder project and volume-type quota monitoring using persisted limits, usage, and reservations.
This includes:
Quota accounting
Quota limits and usage are read independently from Cinder's persisted accounting tables rather than reconstructed from volume inventory.
The implementation preserves:
-1) limits.openstack_cinder_quota_upreports collector health separately from existing Cinder inventory health.Some ambiguous or invalid records may have their dependent metric series omitted without failing the entire collection. Consequently,
quota_up=1does not guarantee that every possible quota series was emitted.Breaking metric changes
Six existing Cinder capacity metrics are renamed and converted from GiB to bytes:
openstack_cinder_limits_volume_max_gb→openstack_cinder_limits_volume_max_bytesopenstack_cinder_limits_volume_used_gb→openstack_cinder_limits_volume_used_bytesopenstack_cinder_limits_backup_max_gb→openstack_cinder_limits_backup_max_bytesopenstack_cinder_limits_backup_used_gb→openstack_cinder_limits_backup_used_bytesopenstack_cinder_volume_type_quota_gigabytes→openstack_cinder_volume_type_quota_bytesopenstack_cinder_volume_gb→openstack_cinder_volume_bytesFive additional capacity families are introduced directly with byte-based names.
The existing quota capacity families also gain the
domain_idlabel. Consumers must update metric names, label selectors, thresholds, and any existing GiB-to-byte conversions.Unlimited limits retain
-1; signed usage, reservations, and inventory values are converted normally.Contribution relationship
Follow-up contribution — stacked on [Octavia quota monitoring (#3)](#3).
This PR reuses the shared quota configuration introduced by the Octavia contribution. It is otherwise an independent Cinder feature and does not depend on the Manila or Neutron exporter contributions.
Required
openstackdbcontributions:The separate [Cinder inventory deduplication fix (exporter #1)](#1) is not part of this staging diff. Both changes must be preserved when integrating Cinder upstream, including updating the inventory regression tests for byte-based capacity values.
This PR currently targets the Octavia branch to keep its review diff limited to Cinder changes. It will be rebased onto upstream
mainafter the shared prerequisite is merged.