bsdci / libioc

A Python library to manage jails with ioc{age,ell}
https://bsd.ci/libioc
Other
38 stars 11 forks source link

ZFS root dataset is not mounted #755

Open gronke opened 4 years ago

gronke commented 4 years ago

When a ZFS dataset is created with an ancestor without mountpoint, libioc detects the dataset as not mounted, although it technically is.

zfs = libzfs.ZFS()
zfs.get_pool("zroot").create_dataset("zroot/test")
d = zfs.get_dataset("zroot/test")
d.mountpoint is None // True
d.properties["mountpoint"].value = "/tmp/test"
d.properties["mounted"].value == "yes" // False
d2 = zfs.get_dataset("zroot/test")
d2.properties["mounted"].value == "yes" // True
yonk42 commented 4 years ago

For me, this bug seems to depend on the version of py-libzfs used. As @urosgruber mentioned in #753, the version 20181220 in the FreeBSD pkg repos still works (for me).

I tried to identify the commit introducing the regression for me via git bisect. Many commits did not build correctly for me and I did not have time to fix this (something was wrong with ./configure I think), but I still narrowed it down to 5 commits. Here is my bisect log (I started with the last commit on 20-12-2018), maybe it can be of help: https://gist.github.com/yonk42/2cb2538cd7d607756f5707e6ab76dbce