Repository navigation
feat(neutron): add reservation-aware quota monitoring and project identity - #164
Open
Jeremy Lee (legit-ninja) wants to merge 5 commits into
Open
Jeremy Lee (legit-ninja) wants to merge 5 commits into
Jeremy Lee (legit-ninja) wants to merge 5 commits into
Conversation
Export stored limits and rebuilt usage for seven Octavia resources, with project metadata fallback, defaults configuration, bounded SQL reads and separate quota health. Preserve inventory and other service registration. Requires the public openstackdb quota APIs; keep the canonical dependency until those APIs are accepted upstream. Validate through an external Go workspace in the meantime. Signed-off-by: David Hulick <dave.hulick@gmail.com>
Extend the existing full-exporter fixture with distinct resource counts, nullable and explicit limits, deleted resources and an idle project. Assert every quota family and preserve existing service assertions. Integration-tag vet passes; native MariaDB execution is pending because Docker is unavailable in the preparation environment. Signed-off-by: David Hulick <dave.hulick@gmail.com>
Signed-off-by: David Hulick <dave.hulick@gmail.com>
Signed-off-by: David Hulick <dave.hulick@gmail.com>
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.
Note
Stacked on #161 (Octavia quotas, shared quota configuration). This branch contains #161's three commits; the Neutron changes are the last two commits. Merge #161 first.
Summary
Make the existing Neutron quota metrics report real reservations and configurable defaults, add project identity labels, and add quota collection health.
Changes
openstack_neutron_quota_*families (floatingip,network,port,rbac_policy,router,security_group,security_group_rule,subnet,subnetpool) keeptype="limit|used|reserved".reservedwas always0; it now sums active reservations fromreservations/resourcedeltaswithexpiration >= UTC_TIMESTAMP()on the database clock, as Neutron'sDbQuotaNoLockDriverdoes.tenant_idanddomain_idlabels alongsidetenantandtype.neutronsection in--quota.defaults-file. Zero is valid and negative values normalize to-1. Without the section, Neutron 2025.2 defaults are assumed with a logged warning.openstack_neutron_quota_up(collection health, separate fromopenstack_neutron_up) andopenstack_neutron_quota_skipped_records(records that failed validation on a successful scrape).--neutron.quota-query-timeout/NEUTRON_QUOTA_QUERY_TIMEOUT(default5s) shared deadline. Project metadata refresh is bounded by the remaining deadline through a newproject.Resolver.AllProjectsContext; other collectors keep their existing refresh behavior.Behavior
quota_skipped_records.quota_up=0with no quota samples. Invalid Neutron configuration does not stop the exporter or other metrics.Breaking metric changes
Adding
tenant_idanddomain_idchanges series identity for all nine quota families. Selectors ontype="used"still work, but exact label matches, joins, aggregations and recording rules need review.reservedvalues are no longer always zero.Dependencies
GetReservationsForResourcesand orderedGetQuotasfrom [vexxhost/openstackdb#13](Add Neutron quota reservations query and order GetQuotas openstackdb#13), plus feat(octavia): add project quota monitoring #161's dependency [vexxhost/openstackdb#11](Add Octavia quota limit and usage queries openstackdb#11).go.modneeds bumping to a release that includes them.Tests
Built and tested (
go build,go vet,go test -race ./...) against openstackdb with #11 and #13 applied. MariaDB end-to-end tests have not yet been run against the rebased dependency.