Skip to content
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

fix(inputs.zfs): Unbreak datasets stats gathering in case listsnaps is enabled on a zfs pool #12307

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

lytboris
Copy link
Contributor

@lytboris lytboris commented Nov 30, 2022

Introduce explicit dataset type filter for zfs list command. We are interested in filesystems and volumes only.

fixes: #12314

@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Nov 30, 2022
@srebhan
Copy link
Contributor

srebhan commented Nov 30, 2022

@lytboris can you please sign the CLA otherwise we cannot review and merge your code.

@srebhan srebhan added plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins waiting for response waiting for response from contributor labels Nov 30, 2022
@lytboris
Copy link
Contributor Author

!signed-cla

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Nov 30, 2022
… a zfs pool

Introduce explicit dataset type filter for `zfs list` command.
We are interested in filesystems and volumes only.
@powersj
Copy link
Contributor

powersj commented Nov 30, 2022

@lytboris thanks for this PR and signing the CLA.

Can I also ask that you file an issue and explain why you are making this change and how it does not break backwards compatibility? thanks!

@powersj powersj added the waiting for response waiting for response from contributor label Nov 30, 2022
@lytboris
Copy link
Contributor Author

lytboris commented Dec 1, 2022

Here's the issue: #12314
I hope it will help to understand what's going on here.

For backward compatibility concern: this PR is semi-fix and semi-feature: it will still work properly on ZFS pools with listsnaps == off as in this mode only datasets and volumes are shown in zfs list output.
And with this patch being merged, it also will start working on systems with ZFS pools having listsnaps == on since only supported (end expected by the plugin) items will be shown in zfs list with filtering using -t option.

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Dec 1, 2022
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the bug detailing the scenario and the fix!

@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Dec 1, 2022
Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for your contribution @lytboris!

@srebhan srebhan changed the title fix: unbreak datasets stats gathering in case listsnaps is enabled on a zfs pool fix(inputs.zfs): Unbreak datasets stats gathering in case listsnaps is enabled on a zfs pool Dec 5, 2022
@srebhan srebhan merged commit 41c9af5 into influxdata:master Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zfs module on FreeBSD breaks if listsnaps property is set to yes on a zfs pool
3 participants