FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

zfs: fix dataset name parsing by vigneshakaviki · Pull Request #3768 · prometheus/node_exporter · GitHub

zfs: fix dataset name parsing - #3768

Draft
vigneshakaviki wants to merge 1 commit into
prometheus:masterfrom
vigneshakaviki:fix/zfs-dataset-prefix
Draft

vigneshakaviki wants to merge 1 commit into
prometheus:masterfrom
vigneshakaviki:fix/zfs-dataset-prefix

Conversation

Copy link
Copy Markdown

Summary

  • Parse the ZFS objset dataset value after the kstat type column instead of searching the full line for the value.
  • Preserve repeated spaces inside valid dataset names.
  • Add regression coverage for a root dataset whose name also occurs in dataset_name.

This prevents root pool names such as data from being exported as dataset_name 7 data.

Testing

  • make in Linux Go 1.26 container
  • go test -race ./...
  • GOARCH=amd64 go test ./collector -run '^TestZpoolObjsetParsing' -count=1
  • GOARCH=386 go test -c ./collector
  • govulncheck ./...

Fixes #3761

@SuperQ, please review.

Signed-off-by: vigneshakaviki <kumarvignesh295@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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZFS collector misparses dataset values that occur in the kstat field prefix

1 participant


Back | FazBrowse Home | New Git URL