Skip to content
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] use random node to avoid node0 overloaded #99390

Merged
merged 1 commit into from Feb 26, 2021

Conversation

pacoxu
Copy link
Member

@pacoxu pacoxu commented Feb 24, 2021

What type of PR is this?

/kind flake
/kind cleanup

What this PR does / why we need it:

https://github.com/kubernetes/kubernetes/pull/99261/files#r580645993

I noticed in the BeforeEach(), all these test cases pick the first node to create volumes on. Maybe this is causing an imbalance: all these tests must be scheduled to the first node, so pods are more likely to timeout if the node is overloaded.

Perhaps we can change the test to randomly select a node to use.

@msau42 I open this PR to use random node in e2e test

Which issue(s) this PR fixes:

No
Some flake cases may be related. But this does not fix them directly.
I may help in some case that node0 is overloaded and timeout some cases.

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/flake Categorizes issue or PR as related to a flaky test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 24, 2021
@k8s-ci-robot
Copy link
Contributor

@pacoxu: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 24, 2021
@pacoxu pacoxu changed the title use random node to avoid node0 overloaded [e2e] use random node to avoid node0 overloaded Feb 24, 2021
@k8s-ci-robot k8s-ci-robot added area/test sig/network Categorizes an issue or PR as relevant to SIG Network. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 24, 2021
@pacoxu
Copy link
Member Author

pacoxu commented Feb 24, 2021

/sig network storage testing

@pacoxu pacoxu force-pushed the use-random-node/e2e branch 5 times, most recently from 44fa60f to 7362ad8 Compare February 24, 2021 08:44
@pacoxu
Copy link
Member Author

pacoxu commented Feb 24, 2021

/cc @msau42

if len(ips) == 0 {
framework.Failf("Failed to get NodeIP")
}
hostIP := ips[0]
port := int32(54321)
port := int32(54323)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come the port changed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find https://github.com/kubernetes/kubernetes/blob/master/test/e2e/scheduling/predicates.go#L675 is using 54321 as well. I'm not sure whether they will be running in parallel one day?

So I change it here.

test/e2e/network/hostport.go Outdated Show resolved Hide resolved
@pacoxu
Copy link
Member Author

pacoxu commented Feb 25, 2021

/retest

@pacoxu
Copy link
Member Author

pacoxu commented Feb 26, 2021

/retest
as node test is fixed now.

@msau42
Copy link
Member

msau42 commented Feb 26, 2021

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 26, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: msau42, pacoxu

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 26, 2021
@k8s-ci-robot k8s-ci-robot merged commit 157c4bb into kubernetes:master Feb 26, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Feb 26, 2021
@pacoxu pacoxu deleted the use-random-node/e2e branch June 23, 2021 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/flake Categorizes issue or PR as related to a flaky test. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants