-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
fix mirror pod nfs test failure due to differing NFS versions #119765
fix mirror pod nfs test failure due to differing NFS versions #119765
Conversation
Please note that we're already in Test Freeze for the Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Fri Aug 4 16:28:53 UTC 2023. |
/test |
@tzneal: The
The following commands are available to trigger optional jobs:
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test pull-kubernetes-node-e2e-containerd-serial-ec2 |
Can you explain the reason? |
/triage accepted |
kubernetes/test/images/volume/nfs/run_nfs.sh Lines 31 to 42 in 2c6c456
The fix overall LGTM. |
why the path is different, I assume you can server both protocols and use the same paths |
From https://linux.die.net/man/5/exports,
In testing this psuedo-root filesystem is called '/' so the mount path differs between v3 and v3. There may be another way to build an exports file that works for both? But the NFS test image sets fsid=0 for the mounts. I don't think this is correct in the presence of multiple mounts anyway, but its been that way for 8 years. |
/retest |
/sig storage |
test/e2e_node/mirror_pod_test.go
Outdated
// In NFSv3 this root filesystem is mounted as '/'. This function is an attempt to try to gloss over those differences | ||
// and make this test reliable for both versions. | ||
func mountPath() string { | ||
cmd := exec.Command("lsmod") |
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.
Even if nfsv4 module is loaded it doesn't mean that it's used. We may want to look at mtab/run mount, etc instead of making assumptions like this.
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 don't think it will display in mtab (unless there is some other NFS filesystem that is already mounted). My logic was that the current code makes assumes NFSv3, this assumption may still be wrong in some cases but is less wrong in that the tests pass :)
This is odd. We have tests that always uses kubernetes/test/e2e/storage/drivers/in_tree.go Lines 130 to 136 in d977e7e
Look for Alternative solution would be to always use a NFS PV + PVC in the test, then you can use |
/exports *(rw,fsid=0,insecure,no_root_squash) can be mounted as `/exports` using NFSv3 and `/` using NFSv4 Mount as '/', since clients that support both can try both.
8bdb482
to
717c149
Compare
Interesting, I'll change that here. I know clients can try both, maybe just defaulting to the NFSv4 path is the most straightforward fix. |
/test pull-kubernetes-node-e2e-containerd-serial-ec2 |
Do people run |
Yes, @upodroid, @dims and I have been working on getting tests to run on a variety of images including both Ubuntu and AL2. IMO, there shouldn't be anything in |
Historically we tested everything against COS but it isn't the correct baseline for defining NodeConformance. NodeConformance tests should run with zero modifications on Ubuntu and Centos(bit complicated today but represented by AL2 for now, would have been Centos 7 before all the madness). COS runs only on GCP and it is specifically designed for running containers and Google has made some design choices to support that objective. There is a good reason GKE also provides an alternate node OS that is based on a "mainstream" OS. |
/retest |
Looks like the root mount path of '/' works everywhere and is also used in other tests: kubernetes/test/e2e/storage/drivers/in_tree.go Lines 130 to 136 in d977e7e
|
I think that's the right approach, at least from what I know about NFS. /lgtm |
LGTM label has been added. Git tree hash: b921cb91c125ae7f5ed5f16de9d723fc236494ad
|
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.
/lgtm
/approve
since we have approval from sig storage, this lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SergeyKanzhelev, tzneal The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind failing-test
What this PR does / why we need it:
/exports *(rw,fsid=0,insecure,no_root_squash)
can be mounted as
/exports
using NFSv3 and/
using NFSv4Use the '/' form of the mount which is common across other NFS tests.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: