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

ZPool properties are not parsable #25

Closed
prometherion opened this issue Dec 18, 2019 · 4 comments · Fixed by #26
Closed

ZPool properties are not parsable #25

prometherion opened this issue Dec 18, 2019 · 4 comments · Fixed by #26

Comments

@prometherion
Copy link
Contributor

I noticed a difference between values provided by zfs.Dataset properties and zfs.Pool ones: basically, on ZPool instances, quantity resources like space allocated or space size are expressed as human-readable value, as opposed to what's happening with Dataset where I can get bytes values with ease.

I tried to dig deeper on the C implementation but hadn't luck: do you plan to fill this gap of properties presentation?

JFI ZPool allows to retrieve parsable values:

# zpool list -p
NAME     SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
mypool  1006632960  419840  1006213120        -         -      0      0   1.00    ONLINE  -
@fkasumovic
Copy link
Contributor

It's a mistake in the call to libzfs C function C.zpool_get_prop , last argument 'boolean_t literal' should be B_TRUE.
Will be fixed, thank you for reporting this.

prometherion added a commit to prometherion/go-libzfs that referenced this issue Dec 18, 2019
@prometherion
Copy link
Contributor Author

thanks @fkasumovic, just opened PR #26

fkasumovic pushed a commit that referenced this issue Dec 19, 2019
Fixes #25, This was broken since libzfs 0.8, by the `literal` argument in the call to zpool_get_propetry function.
@prometherion
Copy link
Contributor Author

@fkasumovic is this hotfix going to be released for a new version?
Can you give an ETA?

@fkasumovic
Copy link
Contributor

@fkasumovic is this hotfix going to be released for a new version?
Can you give an ETA?

https://github.com/bicomsystems/go-libzfs/releases/tag/v0.3.0

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 a pull request may close this issue.

2 participants