-
Notifications
You must be signed in to change notification settings - Fork 41.1k
e2e testing for PreferSameZone/PreferSameNode #130945
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 testing for PreferSameZone/PreferSameNode #130945
Conversation
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
/test pull-kubernetes-e2e-kind-multizone |
/hold |
see the error message with instructions to fix it
|
e3a206c
to
8d4acf6
Compare
/test pull-kubernetes-e2e-kind-multizone |
8d4acf6
to
035b921
Compare
/test pull-kubernetes-e2e-kind-multizone |
The features are always enabled, so the tests don't need to be conditional.
035b921
to
9201739
Compare
/test pull-kubernetes-e2e-kind-multizone |
@@ -41,7 +40,7 @@ import ( | |||
admissionapi "k8s.io/pod-security-admission/api" | |||
) | |||
|
|||
var _ = common.SIGDescribe(feature.TopologyHints, 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.
Feature
in the e2e framework terminology indicates this test needs to enable something to work, does not run in a normal cluster
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.
this test requires a cluster to have zones so we need to add the Feature
label or it will be picked by any normal test ... we must not rely on skips
} | ||
} | ||
if len(nodeForZone) < 3 { |
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.
wasn't 2 nodes per zone in 3 zones?
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.
There's a separate test for that added later.
I didn't want to remove the existing test because OpenShift CI runs in clusters with only 1 schedulable node per zone
/test pull-kubernetes-e2e-kind-multizone |
1 similar comment
/test pull-kubernetes-e2e-kind-multizone |
08bf379
to
99a8289
Compare
/test pull-kubernetes-e2e-kind-multizone |
99a8289
to
0758cb4
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danwinship 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 |
Remove endpointSlicesHaveSameZoneHints check. We are testing that connections end up at the right endpoints. We don't need to validate _why_ they go to the right endpoints, which is already tested by other tests anyway. (Also, validating the hints becomes more complicated in the same-node case, where there may or may not also be same-zone hints depending on cluster configuration.) Remove DeferCleanup calls; we don't need to delete anything manually because namespaced resources will automatically be deleted when the test case's namespace is deleted. Remove a setting of pod.NodeName that was redundant with e2epod.SetNodeSelection().
(No other changes to the code)
Split the logic of creating the clients and the servers apart from the logic of checking which clients connect to which servers. Add some extra complexity to support additional use cases (like multiple endpoints on the same node).
(Identical to the PreferClose test.)
The existing TrafficDistribution test didn't really distinguish "same zone" from "same node". Add another test that makes sure there are at least 2 nodes in each zone so it can do that. (Keep the original test as well to avoid losing coverage in CI systems with single-schedulable-node-per-zone clusters.)
0758cb4
to
478a6f9
Compare
/retest |
/lgtm Thanks! |
LGTM label has been added. Git tree hash: 545aca66f2d24b467cc1b50156a16bcc57cdcd2f
|
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
What this PR does / why we need it:
e2e tests for PreferSameZone/PreferSameNode
This also extends the existing PreferClose test to test the case where the client and server are in the same zone but not on the same node.
This required a lot of refactoring to avoid just totally duplicating everything multiple times...
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
/kind cleanup
/sig network
/assign @aojea @gauravkghildiyal