3 ms·
Perhaps. Thing is, https://github.com/moby/moby/blob/670bc0a46c4ca03b75f1e72f73b8302bce90275a/daemon/graphdriver/zfs/zfs.go https://github.com/moby/moby/blob/6
by pgeorgi 3y ago
Perhaps.
Thing is, https://github.com/moby/moby/blob/670bc0a46c4ca03b75f1e72f73b8302bce90275a/daemon/graphdriver/zfs/zfs.go https://github.com/moby/moby/blob/670bc0a46c4ca03b75f1e72f73... is using https://github.com/mistifyio/go-zfs https://github.com/mistifyio/go-zfs which features code like `out, err := zfsOutput("get", "-H", key, d.Name)` (Source: https://github.com/mistifyio/go-zfs/blob/master/zfs.go#L315 https://github.com/mistifyio/go-zfs/blob/master/zfs.go#L315) to get a single zfs property.
Somebody chose to use a library as abstraction that looks good but is implemented as a MVP (nothing wrong with that). "In the future, we hope to work directly with libzfs" should have raised an alarm somewhere, though.
- justinclift 3y agoInteresting. I'd been meaning to check if there are go libraries for working with ZFS. Looks like the answer to that is "yes, but be careful as some are kind of dodgy". :/ --- Oh, that library bills itself as "Simple wrappers for ZFS command line tools", rather than as a ZFS interface. Wonder why the Moby project picked that one then? Maybe a case of "it was the best choice at the time".
- pgeorgi 3y agoThere's https://github.com/openzfs/zfs/tree/master/contrib/pyzfs https://github.com/openzfs/zfs/tree/master/contrib/pyzfs, which is as official as it gets.
- justinclift 3y agoSounds like that would be the better choice. :)