zfs: revamp and test compatible Kernel versions#352399
zfs: revamp and test compatible Kernel versions#352399adamcstephens merged 2 commits intoNixOS:masterfrom
Conversation
|
@ofborg build zfs_2_1 zfs_unstable |
bc6f676 to
0752228
Compare
0752228 to
c53c08f
Compare
c53c08f to
a529187
Compare
|
Rebased, resolved conflicts, reformatted, re-ran tests. I also removed amarshall@bc6f676 from this for now, as I’m not really sure it’s necessary anymore (and easy enough add back or PR later). |
a529187 to
06544b4
Compare
|
@adamcstephens Thoughts here? Would really like this to be able to reduce how much one has to proactively think about Kernel versions when doing ZFS package updates. |
|
I’ll take a look at the few pending PRs this weekend. Sorry for the delay. |
There was a problem hiding this comment.
Could we make this a boolean instead? something like ignoreKernelCompatibility
There was a problem hiding this comment.
We could, but I suppose it’s useful to be able to mark as broken when it fails to build at all on newer Kernel versions, even on zfs_unstable. At least, this is what the previous kernelCompatible meant for zfs_unstable.
There was a problem hiding this comment.
Any additional thoughts? Also rebased, resolved conflicts, and re-ran tests.
There was a problem hiding this comment.
Where should we document overriding this, to allow building outside the limits?
There was a problem hiding this comment.
My initial thought is that it’s just for zfs_unstable (as we’ve implicitly had this in the past, but now with this the “…MaxSupported…` is verified against the code, so isn’t sufficient). But I’m also fine with adding it to the wiki, along with the other unsupported-or-not-recommended-but-doable stuff.
06544b4 to
b1331d3
Compare
|
Rebased and resolved merge conflicts. |
b1331d3 to
fe29639
Compare
90ec1ef to
b018d6b
Compare
|
FYI, upstream is now hard failing on incompatible versions during configure. |
|
I think the only thing that changes is that now this needs to set |
b018d6b to
c16503f
Compare
|
Updated for upstream changes with the flag. Since upstream now explicitly prevents building by default with unsupported Kernel versions and we also don’t support doing so, this is opt-in only and not even zfs_unstable will have it (after all, the flag has been needed to build against unsupported Kernels for several months and we haven’t had it and no one has complained afaik). |
|
Re-running CI due to a odd failure fixed in #416448 |
fwiw i've many times had to force nixos to build zfs on unsupported kernel to support new hardware or apply patches and i imagine i will do again. +1 for making this easier- maybe even worth adding documentation how to do this |
adamcstephens
left a comment
There was a problem hiding this comment.
I think we should merge this, but the conflict will need to be resolved first.
Switch to specifying the Kernel compatibility in the same form as in the ZFS source’s `META` file. This then allows checking it against what’s in `META` to remove the need to manually check, and so reduce the cognitive load and change of mistakes when performing updates. As the “max” version is indeed a compatible version, we need to increment that for the comparison when using `versionOlder`. One side-effect here is that it makes it not possible to override the specified compatibility. We will “fix” this soon.
This will allow building ZFS against an unsupported Kernel version. While possible, it is not supported by upstream or Nixpkgs. As such, we don’t enable it by default, even for zfs_unstable. Enabling should be a deliberate choice by the user to opt into potential data corruption bugs.
c16503f to
3d589fc
Compare
|
Resolved conflicts. |
|
@amarshall This PR has dropped support for ZFS on Linux 6.15, which had been previously working. OpenZFS officially supports 6.15: https://endoflife.date/openzfs I think the value of |
What makes you think that?
No, it should be 6.15. The attr is now the actual max supported version (≤) not the next biggest (<). |
|
The latest kernel is now 6.16, perhaps that's the issue? On master: |
You are right. After updating nixpkgs, the system fails to build.
Sorry about my confusion. Somehow I was unable to find out this method. |
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.