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

feat: update scheduling queue with options #81263

Conversation

draveness
Copy link
Contributor

@draveness draveness commented Aug 11, 2019

/kind feature
/sig scheduling
/assign @bsalamat @NickrenREN

What this PR does / why we need it:

Use priorityQueueOptions to refactor the priority queue which could make it easier to do configuration.

Add pod max backoff duration to the scheduler API would cause an API review, we could do this in a follow-up PR if the implementation here makes sense.

Which issue(s) this PR fixes:

ref: #81214

Does this PR introduce a user-facing change?:

Add "podInitialBackoffDurationSeconds" and "podMaxBackoffDurationSeconds" to the scheduler config API

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


@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label Aug 11, 2019
@k8s-ci-robot k8s-ci-robot added 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. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 11, 2019
@draveness
Copy link
Contributor Author

draveness commented Aug 11, 2019 via email

@alculquicondor
Copy link
Member

/lgtm

Just be more accurate with the PR description: feat: add options to scheduling queue reads better.

Also please add a Release note, as this offers a new configuration option.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 12, 2019
@draveness
Copy link
Contributor Author

draveness commented Aug 12, 2019 via email

Copy link
Contributor

@NickrenREN NickrenREN left a comment

Choose a reason for hiding this comment

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

not sure if i miss sth

@draveness
Copy link
Contributor Author

draveness commented Aug 13, 2019 via email

@NickrenREN
Copy link
Contributor

Why do we need a follow-up PR ? why not add that in this PR since they are one fix?

@alculquicondor
Copy link
Member

As @draveness mentioned, that change requires an API review. Possibly a KEP. It shouldn't take too long though.

@draveness
Copy link
Contributor Author

/assign @Huang-Wei

@draveness
Copy link
Contributor Author

Friendly ping @Huang-Wei for review, thanks!

@NickrenREN
Copy link
Contributor

As @draveness mentioned, that change requires an API review. Possibly a KEP. It shouldn't take too long though.

I still prefer combining them together just like what @everpeace does in his PR. Otherwise, i do not know if this PR is meaningful.

@draveness
Copy link
Contributor Author

draveness commented Aug 21, 2019 via email

@everpeace
Copy link
Contributor

everpeace commented Aug 21, 2019

Use the option pattern could remove initializers like NewPriorityQueueWithXXX.

I agree this.


As I mentioned in #81263 (comment), initial backoff duration is a one of key parameters for tuning starvation in the scheduler. So I would be glad if you supported the initial backoff duration in the PR. If you don't mind, I can send a PR to your branch to support this.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 21, 2019
@draveness
Copy link
Contributor Author

Kindly ping @liggitt for approval

@draveness draveness force-pushed the feature/update-scheduling-queue-with-options branch from 00603d4 to 0a831cf Compare October 4, 2019 09:59
@draveness
Copy link
Contributor Author

/retest

@draveness
Copy link
Contributor Author

draveness commented Oct 4, 2019 via email

@liggitt
Copy link
Member

liggitt commented Oct 8, 2019

/approve
API changes lgtm

will leave final lgtm to scheduler reviewers after rebase is done

@liggitt liggitt moved this from Changes requested to API review completed, 1.17 in API Reviews Oct 8, 2019
@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 8, 2019
// PodInitialBackoffSeconds is the initial backoff for unschedulable pods.
// If specified, it must be greater than 0. If this value is null, the default value (1s)
// will be used.
PodInitialBackoffSeconds *int64 `json:"podInitialBackoffSeconds"`
Copy link
Member

Choose a reason for hiding this comment

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

@liggitt Internal version shouldn't have "json:..." tag, right?

(not sure it's mandatory or optional, but I notice most internal types.go don't have the tag)

Copy link
Member

Choose a reason for hiding this comment

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

ah, true. good catch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, this was removed

@draveness draveness force-pushed the feature/update-scheduling-queue-with-options branch from 0a831cf to 4c38d90 Compare October 9, 2019 04:03
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 9, 2019
@draveness draveness force-pushed the feature/update-scheduling-queue-with-options branch from 4c38d90 to f67b516 Compare October 9, 2019 04:04
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 9, 2019
@draveness
Copy link
Contributor Author

Hi @ahg-g @Huang-Wei, all the comments have been addressed and the API review has completed, please take another look.

@ahg-g
Copy link
Member

ahg-g commented Oct 9, 2019

thanks, please squash.

@draveness draveness force-pushed the feature/update-scheduling-queue-with-options branch from f67b516 to 9646afb Compare October 9, 2019 11:48
@draveness
Copy link
Contributor Author

thanks, please squash.

done PTAL

@ahg-g
Copy link
Member

ahg-g commented Oct 9, 2019

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, draveness, liggitt

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

@draveness
Copy link
Contributor Author

/approve

It still needs an LGTM, :)

@ahg-g
Copy link
Member

ahg-g commented Oct 9, 2019

/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, 2019
@k8s-ci-robot k8s-ci-robot merged commit b8b7c37 into kubernetes:master Oct 9, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.17 milestone Oct 9, 2019
@draveness draveness deleted the feature/update-scheduling-queue-with-options branch October 10, 2019 02:07
ohsewon pushed a commit to ohsewon/kubernetes that referenced this pull request Oct 16, 2019
…eduling-queue-with-options

feat: update scheduling queue with options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review Categorizes an issue or PR as actively needing an API review. 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/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/apps Categorizes an issue or PR as relevant to SIG Apps. 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
Status: API review completed, 1.17
Development

Successfully merging this pull request may close these issues.

None yet

10 participants