nixos/nfs: Allow Kerberized NFS#73989
Conversation
rnhmjoj
left a comment
There was a problem hiding this comment.
You have to update nixos/tests/all-tests.nix to build the nfs/ directory, instead of nfs.nix.
nixos/tests/nfs/kerberos.nix
Outdated
There was a problem hiding this comment.
Maybe use wait_for_file here
There was a problem hiding this comment.
test -e is what the plain NFS test uses, I assume because NFS should be synchronous here (i.e. by the time the file is visible on the client, it has been created on the server).
db4977f to
52f6a9e
Compare
dd33065 to
913a10b
Compare
|
As noted in the issue, there are two remaining problems:
|
|
I appear to have CI errors, but the message in details is not very clear to me: |
913a10b to
62856e8
Compare
nixos/tests/nfs/kerberos.nix
Outdated
There was a problem hiding this comment.
the comments here that tell what happens on a higher level could all be subtests, so this information even appears in the log.
There was a problem hiding this comment.
Oh sorry i already stated this in another comment in the same PR and didn't remember.
There was a problem hiding this comment.
I've changed most of the other ones. Here, this is really set-up code that is not related to the functionality under test. Is subtest intended for this use as well?
I had no idea this could get this complicated. Thanks for all the work you've done, keep it up! |
I can't try right now because I don't have nearly ram to run an evaluation but you could try to rebase your branch with current master. Maybe at the point you did a checkout master itself was broken. ofBorg runs something like this |
|
I figured out the build failure - I copied the test structure from the kerberos tests, which I wrote last year. It turns out they were never enabled in |
e7b8e45 to
7a6ec9e
Compare
|
All of the tests here are OK now. Remaining question are:
|
If it's only needed for kerberos I would say to install it behind a guard like |
|
@rnhmjoj - no, its needed for id-mapping in general. This is not turned on by default for It is also needed for CIFS, at least with kerberos, see #34638. I'm not familiar enough with it to know if this can also be necessary without kerberos - the man page doesn't mention it so it seems likely. We can test for the presence of a NFS/CIFS filesystem before installing it, which seems sensible. |
8f8e04d to
6ea57ed
Compare
nixos/tests/nfs/kerberos.nix
Outdated
There was a problem hiding this comment.
nitpick: same lines of code / easier to read:
| server.wait_for_unit(f"{unit}.service") | |
| server.wait_for_unit("kadmind.service") | |
| server.wait_for_unit("kdc.service") |
There was a problem hiding this comment.
Nits picked. Anything left blocking merging?
Necessary for nfs server with kerberos auth
This is necessary for id mapping to work with NFS + Kerberos, and also touches NixOS#68106 and 634638.
6ea57ed to
d17c834
Compare
A patch is necessary upstream to support multiple configs via symlinks in /etc/request-key.d Once that is done, we can add support for CIFS as well
d17c834 to
e0b9b5f
Compare
|
@GrahamcOfBorg test nfs |
|
@GrahamcOfBorg test nfs.simple nfs.kerberos |
|
@GrahamcOfBorg test nfs3.simple nfs4.simple nfs4.kerberos |
Motivation for this change
Currently, NFS mounts secured with Kerberos do not work (see #72722).
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"./result/bin/)nix path-info -Sbefore and after)Notify maintainers
cc @tfc - regarding the Perl -> Python test port
cc @edolstra as maintainer of the previous nfs test