-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updates for zfsonlinux 0.7.5 #779
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good in general. I assume this is backwards compatible?
collector/zfs_linux.go
Outdated
return fmt.Errorf("could not parse expected integer value for %q", key) | ||
// kstat data type (column 2) should be KSTAT_DATA_UINT64 (4), otherwise ignore | ||
// TODO: when other KSTAT_DATA_* types arrive, much of this will need to be restructured | ||
if parts[1] == "4" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should define const for this to make it a bit more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea! I'll include a comment for the cross-reference to zfsonlinux code, too.
Regarding backwards compatibility:
Tested against ZFS v0.6.5.6 (as delivered in Ubuntu 16.04) and ZFS v0.7.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, have no zfs to test but I'll take your word on this :). LGTM
…ult from ZFS bugs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* updates for zfsonlinux 0.7.5 * add constants for KSTAT_DATA_* types * added e2e test for negative values represented by uint64 that can result from ZFS bugs
Adds metrics available in zfsonlinux version 0.7.5.
Changes failure handling when zfs stats files do not exist to maintain backwards compatibility with older zfsonlinux releases.