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

libvirt: Shrink closure by disabling zfs by default #104490

Closed
wants to merge 1 commit into from

Conversation

dasJ
Copy link
Member

@dasJ dasJ commented Nov 21, 2020

Motivation for this change

I don't think the zfs integration (i.e. direct zvol support) is widely used.

nix path-info -S reports 509285216362482320

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@SuperSandro2000
Copy link
Member

Maybe this should be put into the changelog to not cause any surprises.

@gebner
Copy link
Member

gebner commented Nov 21, 2020

I don't think the zfs integration (i.e. direct zvol support) is widely used.

That's not a reason to disable a feature.

Presumably the extra dependencies (like zfs) only make a difference for the libvirtd daemon. What we should probably have is two packages, libvirt (with minimal dependencies), and libvirtFull (with all dependencies). Most packages should depend on libvirt (because they only use the library to communicate with the daemon). The libvirtd module should then default to the libvirtFull package for the daemon, and this package should be configurable.

If you don't want zfs, you could just set virtualisation.libvirtd.package = pkgs.libvirt.

@lheckemann
Copy link
Member

We use this feature at mayflower, and I also use it for my personal stuff. I'd definitely appreciate it it remained enabled by default (though it wouldn't kill me if it didn't ;) )

That said, this could (and should!) probably be a runtime thing: meson only seems to use the zfs and zpool executables, which should generally be obtained from the booted system and not a "hard-coded" version, so that the tools match the kernel module version. This would simultaneously eliminate the path dependency, reducing the closure size, and make it more reliable by matching zfs's expectations more closely.

@dasJ
Copy link
Member Author

dasJ commented Nov 21, 2020

@lheckemann Is relying on /run a good idea? I doubt this will work on non-NixOS systems

@dasJ dasJ closed this Nov 21, 2020
@dasJ dasJ deleted the feat/shrink-libvirt-zfs branch November 21, 2020 19:42
@lheckemann
Copy link
Member

Indeed it won't. Maybe a nixos-specific patch to try /run/booted-system and fall back to PATH would make sense. I don't currently have the capacity to implement that though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants