-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
Packages are still built against zfsStable when boot.zfs.enableUnstable #109031
Comments
I've noticed this as well and there is no solution unless nixpkgs adopts USE flags (cf. #56227) or the new module system for packages (cf. https://cfp.nixcon.org/nixcon2020/talk/K89WJY) is finalized. The same issue applies to {
nix.package = pkgs.nixFlakes;
} This will also not be respected if a package explicitly has {
nixpkgs.overlays = [ (final: prev: {
zfs = final.zfsUnstable;
}) ];
} This will of course start rebuilding everything that depends on |
But I agree that this is a big problem, especially for ZFS where you might accidentally corrupt your pool by acting with outdated user-space tool on an upgraded pool. |
Ideally ZFS tooling would to the same thing as modules using systemd and rely on the fact that the ZFS userspace utility is located at |
Oh boy, GRUB depends on |
We cannot/should not make the module add a full overlay, correct? |
I implemented this bit. It uses the executable at runtime. |
I don't think it's that critical. I imagine most programs that have ZFS in their buildinputs only use features that have been stable in ZFS for ages and I'd expect ZFS itself to have sanity checks for at least the current two stable releases. The worst thing that could happen would probably be the program itself not working correctly: GRUB not beeing able to read a pool because of incompatible features for example. Not ideal of course but I don't think data loss is a possibility here. I think the overlay would be a good solution. This way we can be sure the change propagates through to everything that uses it in a pure and well-defined manner. Would it be feasible to make hydra build every ZFS dependent package with zfsUnstable too? That way we could prevent local builds. |
I'd really like to get this tightened up so there is no question what ZFS versions are being used by different tools on my system. The overlay sounds like a good solution. I'm trying to help track down a pretty severe bug with OpenZFS 2.0 (openzfs/zfs#10697) as I am running with |
I marked this as stale due to inactivity. → More info |
Had a quick look at how much an overlay would cost us in rebuilds and it doesn't look like much. The only major dependent in my system closure is libvirt which takes a few minutes to build at worst. All packages that depend on zfs
I think that makes it a straightforward and easy solution without many downsides. |
I marked this as stale due to inactivity. → More info |
Describe the bug
A clear and concise description of what the bug is.
When you set
boot.zfs.enableUnstable
, the zfsUnstable module and userspace packages get installed. Packages that compile against ZFS like Docker and libvirt are still built against zfsStable however.I am not sure if this would cause issues but it certainly sounds like something that could.
Expected behavior
A clear and concise description of what you expected to happen.
All ZFS-dependant packages should be built with
zfs = zfsUnstable;
when it is enabled.Additional context
Add any other context about the problem here.
Came up while investigating #109001
Notify maintainers
@Mic92 @globin @wizeman @hmenke @jcumming @fpletz
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Maintainer information:
The text was updated successfully, but these errors were encountered: