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

Use original requests in NodeResourcesBalancedAllocation instead of NonZeroRequested #105845

Merged

Conversation

ahmad-diaa
Copy link
Contributor

@ahmad-diaa ahmad-diaa commented Oct 22, 2021

What type of PR is this?

/kind bug

What this PR does / why we need it:

Fixing a regression bug from #102925 where pods are not evenly distributed.

Which issue(s) this PR fixes:

Fixes #105220

Does this PR introduce a user-facing change?

Fixes a regression in 1.22 in scoring for NodeResourcesBalancedAllocation plugins when nodes have containers with no requests.

/sig scheduling

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 22, 2021
@k8s-ci-robot
Copy link
Contributor

@ahmad-diaa: 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 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. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 22, 2021
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 22, 2021
@ahmad-diaa ahmad-diaa changed the title [WIP] Use original requests in NodeResourcesBalancedAllocation instead of NonZeroRequested Use original requests in NodeResourcesBalancedAllocation instead of NonZeroRequested Oct 22, 2021
@k8s-ci-robot k8s-ci-robot added do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Oct 22, 2021
Copy link
Member

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

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

do we have enough coverage with the existing test cases?

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 26, 2021
@ahmad-diaa
Copy link
Contributor Author

ahmad-diaa commented Oct 26, 2021

do we have enough coverage with the existing test cases?

I think we do, I was thinking about adding a test for the case in #105220 but it seems to be an integration test case that is hard to cover via a unit test. Is this correct?

Copy link
Member

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

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

I think we do, I was thinking about adding a test for the case in #105220 but it seems to be an integration test case that is hard to cover via a unit test. Is this correct?

Yeah, we can leave that as a follow up

pkg/scheduler/util/non_zero.go Outdated Show resolved Hide resolved
// what is provided on the request.
// useRequested overrides the behaviour of the function where requested value is returned as is.
// nonZero overrides the behaviour of the function where requested value is returned as is if nonZero is false.
Copy link
Member

Choose a reason for hiding this comment

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

kind of awkward wording

Better say the opposite way:

If nonZero is true and the resource has no defined request for CPU or memory, it returns a default value.

@alculquicondor
Copy link
Member

/label tide/merge-method-squash
(but you can choose to squash yourself)

/approve

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Oct 29, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmad-diaa, 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 Oct 29, 2021
@alculquicondor
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 29, 2021
@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. labels Oct 29, 2021
@alculquicondor
Copy link
Member

/lgtm

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

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:

  • The PR does have any do-not-merge/* labels
  • The PR does not have the needs-ok-to-test label
  • The PR is mergeable (does not have a needs-rebase label)
  • The PR is approved (has cncf-cla: yes, lgtm, approved labels)
  • The PR is failing tests required for merge

You can:

/retest

@k8s-ci-robot k8s-ci-robot merged commit a2c37bf into kubernetes:master Oct 30, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Oct 30, 2021
@alculquicondor
Copy link
Member

Can you create a cherry-pick for 1.22?

@ahmad-diaa
Copy link
Contributor Author

Can you create a cherry-pick for 1.22?

Sure, will do that later today.

k8s-ci-robot added a commit that referenced this pull request Nov 12, 2021
…105845-upstream-release-1.22

Automated cherry pick of #105845: use original requests in NodeResourcesBalancedAllocation
@liggitt liggitt added the kind/regression Categorizes issue or PR as related to a regression from a prior release. label Apr 27, 2022
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/regression Categorizes issue or PR as related to a regression from a prior release. 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 Denotes a PR that will be considered when it comes time to generate release notes. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pods not being evenly scheduled across worker nodes
5 participants