Repository navigation
feat(manila): add quota metrics and logical share inventory - #163
Open
Jeremy Lee (legit-ninja) wants to merge 6 commits into
Open
Jeremy Lee (legit-ninja) wants to merge 6 commits into
Jeremy Lee (legit-ninja) wants to merge 6 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>
Export project and share-type quota accounting with configured defaults, precedence, bounded database reads and separate collection health. Select one inventory row per logical share and expose Manila capacities in bytes. Preserve signed accounting and the unlimited limit sentinel. Include startup, timeout, accounting, inventory and metric contract tests. Requires compatible public openstackdb Manila and Octavia APIs; retain the canonical module dependency pending public dependency reconciliation. Signed-off-by: David Hulick <dave.hulick@gmail.com>
Seed all Manila quota resources with explicit active-row markers. Check project and share-type values, exact labels, signed reservations and the 64 GiB per-share limit in bytes. Verify logical inventory uniqueness, zero-instance and retained shares, and absence of the old capacity family. Preserve existing Octavia and other-service assertions. Integration-tag vet passes; native execution requires an available Docker provider. Signed-off-by: David Hulick <dave.hulick@gmail.com>
Use the generated project and share-type queries, accumulating nullable usage and reservations in signed int64 totals. Keep project accounting separate and preserve limit precedence and collection health. Omit NULL-name type scopes without rejecting the scrape; valid empty names and independent project totals remain visible. Document this API limitation and cover raw accounting, large totals and current inventory selection. Recognize the current Manila query in the timeout fixture. Signed-off-by: David Hulick <dave.hulick@gmail.com>
This was referenced Dec 3, 2026
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 Manila changes are the last three commits. Merge #161 first.
Summary
Add Manila project and share-type quota monitoring, and report share inventory once per logical share instead of once per share instance. Manila capacity metrics move to bytes.
Metrics
openstack_sharev2_quota_{shares,bytes,snapshots,snapshot_bytes,share_networks,share_replicas,replica_bytes,share_groups,share_group_snapshots,backups,backup_bytes,per_share_bytes}, withtenant,tenant_id,domain_idandtypelabels.typeislimit,in_useorreserved;quota_per_share_byteshaslimitonly.openstack_sharev2_share_type_quota_{shares,bytes,snapshots,snapshot_bytes,share_replicas,replica_bytes}, addingshare_type(UUID) andshare_type_namelabels.openstack_sharev2_quota_up: quota collection health, separate fromopenstack_sharev2_up.Behavior
defaultclass, then project overrides, then share-type overrides. Share-type limits inherit the project limit when no type override exists. User overrides are used to discover projects but never replace project limits.quota_up=0. Invalid project or share-type limits omit the affected scope and setquota_up=0while keeping valid scopes.ShareGetInventory: one row per logical share, including shares without instances and retained soft-deleted shares. Status, share type and availability zone come from the same representative instance.Configuration
--quota.defaults-filegains an optionalmanilasection with all twelve Manila[quota]settings (in GiB). Without it, Manila 2025.2 defaults are assumed with a warning.--manila.quota-query-timeout/MANILA_QUOTA_QUERY_TIMEOUT(default5s): shared deadline for the six quota reads.Breaking metric changes
openstack_sharev2_share_gbis renamed toopenstack_sharev2_share_byteswith the same labels and no alias. All Manila capacity values are GiB × 2^30; only an unlimited (-1) limit stays unscaled. The inventorysizelabel stays in GiB. Status and count metric names and labels are unchanged, but a replicated or migrating share now produces one series instead of one per instance.Dependencies
ShareGetInventoryand the six raw quota queries from [vexxhost/openstackdb#12](Add Manila quota reads and logical-share inventory openstackdb#12), 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 #12 applied. MariaDB end-to-end tests have not yet been run against the rebased dependency.