k3s: use patched util-linuxMinimal#407810
Conversation
Some of the attributes fetched throw, so tryEval them. Recurse into the attribute set to pick up all the tests.
The full version of util-linux has systemd, NLS, and ncurses support. k3s only uses a couple utilities from it at runtime, so use the minimal version.
Until NixOS#405952 is fixed, we can use our own util-linux to avoid breaking k3s in the release. Revert this commit when that happens.
|
@ofborg build k3s nixosTests.k3s.airgap-images nixosTests.k3s.auto-deploy-charts nixosTests.k3s.etcd nixosTests.k3s.multi-node nixosTests.k3s.single-node nixosTests.k3s.auto-deploy nixosTests.k3s.containerd-config nixosTests.k3s.kubelet-config |
|
@NixOS/k3s I don't know nearly enough about k3s but it probably doesn't need systemd, NLS, or ncurses support for the 3-4 commands it runs in util-linux right? 😉 |
Would be also my assumption. |
Mic92
left a comment
There was a problem hiding this comment.
Haven't tested in an actual cluster but changes look good to me.
| k3sUtilLinux = util-linuxMinimal.overrideAttrs (prev: { | ||
| patches = | ||
| prev.patches or [ ] | ||
| ++ lib.singleton (fetchpatch { |
There was a problem hiding this comment.
Nit that can be disregarded but what is the advantage of syntax over just doing:
| ++ lib.singleton (fetchpatch { | |
| ++ [ | |
| (fetchpatch { |
There was a problem hiding this comment.
At least I find this easier to read.
|
@numinit Did you tested this in an actual cluster as well? I don't know all our tests well enough to know if they test this particular bug. |
|
I have not but a couple people in #405952 mentioned that it solved their problem. |
| patches = | ||
| prev.patches or [ ] | ||
| ++ lib.singleton (fetchpatch { | ||
| url = "https://github.com/util-linux/util-linux/pull/3479.patch"; |
There was a problem hiding this comment.
You can use https://github.com/util-linux/util-linux/commit/7dbfe31a83f45d5aef2b508697e9511c569ffbc8.patch instead of the pull request patch as it is already merged.
There was a problem hiding this comment.
Good point. Missed that. We should never point to a pull request in nixpkgs because the hash can get invalidated easily.
There was a problem hiding this comment.
Forgot about this change. Will make a follow up PR.
|
I will try to repro the bug in the tests along with the requested change |
jfly
left a comment
There was a problem hiding this comment.
Can confirm this fixes things for my k3s cluster.
| overrideContainerdAttrs; | ||
|
|
||
| # TODO (#405952): remove this patch. We had to add it to avoid a mass rebuild | ||
| # for the 25.05 release. Once the above PR is merged, switch back to plain util-linuxMinimal. |
There was a problem hiding this comment.
the above PR
Which PR? Is this missing from the comment?
|
Successfully created backport PR for |
|
Bisect says 727809f causes the following eval failures: |
|
Ah, yikes - I've got a fix. That set of tests didn't even eval before, but now it's angry about the recurseForDerivations we added. |
|
Corrected in #412756 (and all the tests pass). I previously had to fix this because the tests were also pulling in all the k3s aliases which were throwing. |
Until #405952 is fixed, we can use our own util-linux to avoid breaking k3s in the release. Revert the last commit in this series when that happens.
CC @NixOS/k3s
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.