-
Notifications
You must be signed in to change notification settings - Fork 40k
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
e2e_node: add a test to verify kubelet fails to create pod if userns isn't supported #127484
base: master
Are you sure you want to change the base?
Conversation
/hold requires kubernetes/test-infra#33511 to actually run |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: haircommander The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
0b0b4cd
to
259f70a
Compare
…isn't supported and the pod requests a user namespace Signed-off-by: Peter Hunt <pehunt@redhat.com>
259f70a
to
bbcea1c
Compare
/test pull-kubernetes-node-crio-cgrpv2-userns-e2e-serial |
/triage accepted |
/hold Let's confirm that the test you added works before merge. |
@haircommander: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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-sigs/prow repository. I understand the commands that are listed here. |
/hold cancel new test passed https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/127484/pull-kubernetes-node-crio-cgrpv2-userns-e2e-serial/1836871735580823552 some other test that's now in this suite failed, but that shouldn't block IMO |
admissionapi "k8s.io/pod-security-admission/api" | ||
) | ||
|
||
var _ = SIGDescribe("UserNamespaces", "[LinuxOnly]", nodefeature.UserNamespacesSupport, framework.WithSerial(), func() { |
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.
is this test really serial?
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.
Yes, when ever a feature gate is toggled for kubelet, the test has to be serial. Changing kubelet configs triggers a restart of kubelet.
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.
Til, thanks, this explains why some test here are tagged as serial when they are not ..., authors may forget to remove the serial decorator when it is ga .... @pohly does it make sense to automate this behavior for the e2e_node so authors don't need to worry about this behavior?
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 see how. nodefeature.UserNamespacesSupport
just says "this test depends on this feature", it doesn't say "this test needs to toogle that feature", so nodefeature.UserNamespacesSupport
should not implicitly add the serial tag.
authors may forget to remove the serial decorator when it is ga
Doesn't it say below that the entire test needs to be removed once the feature is GA?
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.
yeah this test is only serial because it changes the kubelet's feature gates, not specifically toggles user namespaces. Once user namespaces are GA'd (and specifically when the feature gate is dropped), we have to remove this test because we can't test with user namespaces disabled anymore
|
||
// Pod should stay in pending | ||
// Events would be a better way to tell this, as we could actually read the event, | ||
// but history proves events aren't reliable enough to base a test on. |
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.
v1.Events? those must no be used on tests, are best effort , there is no guarantee there are going to be delivered
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.
exactly
Is this an existing test failure? |
TBH I don't think that test was being tested before I converted userns job to serial+userns job |
Are you working on fixing those? |
The failing test is about LocalStorageCapacityIsolationQuota. I opened #128042 to track it. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
... and the pod requests a user namespace
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.: