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

Add multiple init pods to scheduler perf test cases #89272

Merged
merged 2 commits into from Mar 25, 2020

Conversation

alculquicondor
Copy link
Member

@alculquicondor alculquicondor commented Mar 19, 2020

What type of PR is this?

/kind feature

What this PR does / why we need it:

Allowing different types of init pods we can represent more realistic test cases for benchmarks and profiling.

I'm adding a test case where there are several init pods with affinity or antiaffinity, and we measure basic pods.

I'm also surfacing suppressed errors and replacing klog.Fatalf with b.Fatalf. The previous approach wasn't playing well with the test tool.

Sample run: https://gist.github.com/alculquicondor/5d98a2f6534a8fd6dca8564c3d75b196

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/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 19, 2020
@alculquicondor
Copy link
Member Author

/assign @ingvagabund

@k8s-ci-robot k8s-ci-robot added area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 19, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor

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 Mar 19, 2020
@RA489
Copy link

RA489 commented Mar 20, 2020

/test pull-kubernetes-e2e-gce

@alculquicondor
Copy link
Member Author

/priority important-longterm

@k8s-ci-robot k8s-ci-robot added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 20, 2020
Copy link
Contributor

@ingvagabund ingvagabund left a comment

Choose a reason for hiding this comment

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

Few nits though looks good in overall. Can you also split the PR into two commits? First one where the functions return error and the second one that adds multiple init pods. So it's easier to follow the changes in the future.

for {
scheduled, err := getScheduledPods(podInformer)
if err != nil {
klog.Fatalf("%v", err)
return nil
Copy link
Contributor

Choose a reason for hiding this comment

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

return err

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops. Fixed.


testCases := make([]testCase, 0)
for _, s := range simpleTests {
testCase := s.Template
for _, p := range s.Params {
testCase.Nodes.Num = p.NumNodes
testCase.InitPods.Num = p.NumInitPods
testCase.InitPods = append([]podCase(nil), testCase.InitPods...)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this change necessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

Otherwise the slice is shared and a second iteration modifies both test cases.

@alculquicondor
Copy link
Member Author

Can you also split the PR into two commits?

That would require to rewrite a lot of the PR. I don't think the "return error" changes are significant. Is that fine with you?

@alculquicondor
Copy link
Member Author

/retest

@alculquicondor
Copy link
Member Author

/priority important-longterm

@ingvagabund
Copy link
Contributor

That would require to rewrite a lot of the PR. I don't think the "return error" changes are significant. Is that fine with you?

  1. checkout master
  2. copy paste scheduler_perf_test.go from your PR
  3. undo changes adding multiple init pods (should not be much)
  4. commits changes
  5. copy paste all the files from your PR

It's not a must though it will help to make the git history more friendly. Please, reconsider.

The test tool doesn't work properly with klog.Fatal

Signed-off-by: Aldo Culquicondor <acondor@google.com>
Add test case with several init pods with affinity or antiaffinity.

Signed-off-by: Aldo Culquicondor <acondor@google.com>
@alculquicondor
Copy link
Member Author

Done. Thanks for reminding me to be mindful of traceability.

@alculquicondor
Copy link
Member Author

/retest

@alculquicondor
Copy link
Member Author

ping @ingvagabund

@ingvagabund
Copy link
Contributor

Sorry, I got distracted, to many tabs open.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 24, 2020
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit 7e7c4d1 into kubernetes:master Mar 25, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Mar 25, 2020
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note-none Denotes a PR that doesn't merit a release note. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants