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(zfs): Fixed 'Failed to parse value: VariantNotFound' on Linux, zfs-2.0.3 #146

Merged
merged 1 commit into from
Jun 28, 2021

Conversation

Candunc
Copy link
Contributor

@Candunc Candunc commented Jun 27, 2021

On Debian 10, zfs-2.0.3-8~bpo10+1, using ZfsOpen3::read_properties() on a pool throws the following error:

thread 'main' panicked at 'Failed to parse value: VariantNotFound', /home/candunc/.cargo/git/checkouts/libzetta-rs-e848604138a482a1/cf5649a/src/zfs/open3.rs:303:56

This is due to my zfs returning bpool normalization formD -, rather than the all-lowercase formd as defined in zfs::properties::Normalization enum. I have modified the enum to catch these camelCase variants.

@andoriyu andoriyu changed the title Fixed 'Failed to parse value: VariantNotFound' on Linux, zfs-2.0.3 fix(ads): Fixed 'Failed to parse value: VariantNotFound' on Linux, zfs-2.0.3 Jun 28, 2021
@andoriyu andoriyu changed the title fix(ads): Fixed 'Failed to parse value: VariantNotFound' on Linux, zfs-2.0.3 fix(zfs): Fixed 'Failed to parse value: VariantNotFound' on Linux, zfs-2.0.3 Jun 28, 2021
@andoriyu
Copy link
Member

@Candunc thanks!

@andoriyu andoriyu merged commit 799733f into Inner-Heaven:master Jun 28, 2021
@andoriyu
Copy link
Member

@Candunc would you mind pasting raw output from your zfs so i can add a test case for that?

@Candunc
Copy link
Contributor Author

Candunc commented Jul 6, 2021

$ sudo zfs get -Hp all bpool                 
bpool   type    filesystem      -
bpool   creation        1624301035      -
bpool   used    122241024       -
bpool   available       750014464       -
bpool   referenced      98304   -
bpool   compressratio   1.08    -
bpool   mounted no      -
bpool   quota   0       default
bpool   reservation     0       default
bpool   recordsize      131072  default
bpool   mountpoint      /boot   local
bpool   sharenfs        off     default
bpool   checksum        on      default
bpool   compression     lz4     local
bpool   atime   on      default
bpool   devices off     local
bpool   exec    on      default
bpool   setuid  on      default
bpool   readonly        off     default
bpool   zoned   off     default
bpool   snapdir hidden  default
bpool   aclmode discard default
bpool   aclinherit      restricted      default
bpool   createtxg       1       -
bpool   canmount        off     local
bpool   xattr   sa      local
bpool   copies  1       default
bpool   version 5       -
bpool   utf8only        on      -
bpool   normalization   formD   -
bpool   casesensitivity sensitive       -
bpool   vscan   off     default
bpool   nbmand  off     default
bpool   sharesmb        off     default
bpool   refquota        0       default
bpool   refreservation  0       default
bpool   guid    7140270747068785888     -
bpool   primarycache    all     default
bpool   secondarycache  all     default
bpool   usedbysnapshots 0       -
bpool   usedbydataset   98304   -
bpool   usedbychildren  122142720       -
bpool   usedbyrefreservation    0       -
bpool   logbias latency default
bpool   objsetid        54      -
bpool   dedup   off     default
bpool   mlslabel        none    default
bpool   sync    standard        default
bpool   dnodesize       legacy  default
bpool   refcompressratio        1.00    -
bpool   written 98304   -
bpool   logicalused     132082176       -
bpool   logicalreferenced       43008   -
bpool   volmode default default
bpool   filesystem_limit        18446744073709551615    default
bpool   snapshot_limit  18446744073709551615    default
bpool   filesystem_count        18446744073709551615    default
bpool   snapshot_count  18446744073709551615    default
bpool   snapdev hidden  default
bpool   acltype posix   local
bpool   context none    default
bpool   fscontext       none    default
bpool   defcontext      none    default
bpool   rootcontext     none    default
bpool   relatime        on      local
bpool   redundant_metadata      all     default
bpool   overlay on      default
bpool   encryption      off     default
bpool   keylocation     none    default
bpool   keyformat       none    default
bpool   pbkdf2iters     0       default
bpool   special_small_blocks    0       default

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.

2 participants