Repository navigation
fix(cinder): deduplicate volume inventory metrics - #1
Open
davidhulick wants to merge 1 commit into
Open
davidhulick wants to merge 1 commit into
davidhulick wants to merge 1 commit into
Conversation
Group attachment rows by volume ID for inventory and status counts. Retain distinct nonempty server IDs in sorted order while preserving GiB capacity and existing labels. Cover duplicate and reordered attachments with pedantic gathering and repeated HTTP exposition alongside Heat metrics. Signed-off-by: David Hulick <dave.hulick@gmail.com>
Author
Contribution relationshipStandalone change — targets This PR fixes duplicate Cinder volume inventory metrics independently of the quota-monitoring contributions. It uses the existing released Related work:
This fix can be reviewed and submitted upstream independently. |
This was referenced Nov 20, 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.
Summary
Fix duplicate Cinder volume inventory metrics caused by attachment joins returning multiple rows for the same logical volume.
The collector now:
No database queries, dependencies, or unrelated collectors are changed. The fix works with the existing public
openstackdb v0.2.1.Related upstream work
This change is related to [VEXXHOST PR #110](vexxhost#110), which also addresses potential duplicate Cinder volume metrics.
This PR specifically addresses duplication at the collector level. Even with SQL-side attachment filtering, legitimate multi-attach volumes can produce multiple rows for one logical volume, so collector-side deduplication remains useful.
The approaches may be complementary. We are explicitly acknowledging the overlap and welcome coordination on the preferred upstream solution.
Database query changes are intentionally outside this PR's scope and belong in
openstackdb.Compatibility
For multi-attached volumes, the existing
server_idlabel now contains a sorted, comma-separated list of distinct server IDs instead of producing separate samples for each attachment.For example,
server_id="A,B"replaces separate samples labeledserver_id="A"andserver_id="B".Consumers matching individual server IDs must account for this behavior change.
Other metric names, types, label keys, and capacity units remain unchanged.