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

nodeports: scheduler queueing hints #119176

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

carlory
Copy link
Member

@carlory carlory commented Jul 8, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Part of #118893

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@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/M Denotes a PR that changes 30-99 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. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 8, 2023
@k8s-ci-robot
Copy link
Contributor

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-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 Jul 8, 2023
@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 Jul 8, 2023
@carlory
Copy link
Member Author

carlory commented Jul 8, 2023

/assign @sanposhiho

@carlory
Copy link
Member Author

carlory commented Jul 10, 2023

@sanposhiho It's ready for review.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 20, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 21, 2023
@carlory
Copy link
Member Author

carlory commented Sep 21, 2023

/test pull-kubernetes-e2e-gce

@carlory
Copy link
Member Author

carlory commented Sep 25, 2023

Can you take a look at it?

/cc @sanposhiho

@carlory carlory force-pushed the fix-118893-2 branch 3 times, most recently from f4d60aa to 7f1f07e Compare September 25, 2023 10:02
@carlory
Copy link
Member Author

carlory commented Sep 25, 2023

/retest

Copy link
Member

@sanposhiho sanposhiho left a comment

Choose a reason for hiding this comment

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

/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 1, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: d5b987cf6c70d0e1d763130060171d279b87524b

@sanposhiho
Copy link
Member

@kubernetes/sig-scheduling-approvers I /lgtmed it but I'm assigned to the approver on this PR as well.
Please anyone else give a review for /approve.

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.

/approve
/hold
to update comment

pkg/scheduler/framework/plugins/nodeports/node_ports.go Outdated Show resolved Hide resolved
// TODO: Ideally, it's supposed to register only NodeCreated, because NodeUpdated event never means to have any free ports for the Pod.
// But, we may miss NodeCreated event due to preCheck.
// See: https://github.com/kubernetes/kubernetes/issues/109437
// And, we can remove NodeUpdated event once https://github.com/kubernetes/kubernetes/issues/110175 is solved.
Copy link
Member

Choose a reason for hiding this comment

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

Is there already an ongoing PR for scheduling hints for node affinity?

With that implementation, maybe we can skip nodeaffinity precheck if the SchedulingHint feature gate is enabled. And we can remove Update here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there already an ongoing PR for scheduling hints for node affinity?
@alculquicondor Yes, please review #119155

With that implementation, maybe we can skip nodeaffinity precheck if the SchedulingHint feature gate is enabled. And we can remove Update here.

@sanposhiho what do you think ?

Copy link
Member

@sanposhiho sanposhiho Oct 8, 2023

Choose a reason for hiding this comment

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

maybe we can skip nodeaffinity precheck if the SchedulingHint feature gate is enabled. And we can remove Update here.

The existing preCheck checks more than just NodeAffinity.

func preCheckForNode(nodeInfo *framework.NodeInfo) queue.PreEnqueueCheck {

For example, unready Node is created → the Pod was failed by nodeport, but nodeport plugin doesn't get informed of this NodeCreated event because preCheck filters out such events for Node which is tainted. → Node is now ready and untainted and this event should be delivered to plugins (unless other things in preCheck still reject it), but as NodeUpdate.
This kind of scenarios could still happen. So, I'd suggest we keep it until we completely eliminate a whole preCheck.

Copy link
Member

Choose a reason for hiding this comment

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

Right, so once we have the implementation for every plugin that is related to the existing prechecks, we can disable them based on the feature gate.

WDYT?

Regardless, we can proceed with this PR
/approve

Copy link
Member

Choose a reason for hiding this comment

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

/hold cancel

Copy link
Member

Choose a reason for hiding this comment

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

Right, so once we have the implementation for every plugin that is related to the existing prechecks, we can disable them based on the feature gate.

Yes.

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Oct 5, 2023
Co-authored-by: Kensei Nakada <handbomusic@gmail.com>

Co-authored-by: Aldo Culquicondor <1299064+alculquicondor@users.noreply.github.com>
@carlory
Copy link
Member Author

carlory commented Oct 8, 2023

/test pull-kubernetes-e2e-kind

@carlory
Copy link
Member Author

carlory commented Oct 9, 2023

/cc @alculquicondor @sanposhiho

Copy link
Member

@sanposhiho sanposhiho left a comment

Choose a reason for hiding this comment

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

/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 9, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 872b2e065b0b7b407c100b46312d13a2013e4e6b

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 10, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, carlory

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 merged commit 46c3078 into kubernetes:master Oct 10, 2023
12 of 14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.29 milestone Oct 10, 2023
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/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. 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/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants