-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
nixos/nfs: Allow Kerberized NFS #73989
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to update nixos/tests/all-tests.nix
to build the nfs/
directory, instead of nfs.nix
.
nixos/tests/nfs/kerberos.nix
Outdated
client.fail("echo bla >> /data/foo") | ||
|
||
client.succeed("echo root_pw | kinit root", "echo bla >> /data/foo") | ||
server.succeed("test -e /data/foo") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use wait_for_file
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
server.succeed("mkdir -p /data/alice") | ||
server.succeed("chown alice:users /data/alice") | ||
|
||
# set up kerberos database |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the comments here that tell what happens on a higher level could all be subtest
s, so this information even appears in the log.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry i already stated this in another comment in the same PR and didn't remember.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
"systemctl restart kadmind.service kdc.service", | ||
) | ||
for unit in ["kadmind", "kdc"]: | ||
server.wait_for_unit(f"{unit}.service") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @tfc - regarding the Perl -> Python test port
cc @edolstra as maintainer of the previous nfs test