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

Improve scheduler CLI description #88371

Merged
merged 1 commit into from Apr 17, 2020

Conversation

dharmab
Copy link
Contributor

@dharmab dharmab commented Feb 20, 2020

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind api-change
/kind bug
/kind cleanup
/kind deprecation
/kind design

/kind documentation

/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:

This PR adds a few explanatory sentences to the kube-scheduler CLI description (which is in turn used to generate the documentation website). To understand why this is needed, let's look at the first few lines of the documentation for other core CLI components from the perspective of a new user or contributor:

The kubelet is the primary “node agent” that runs on each node.

The Kubernetes network proxy runs on each node. This reflects services as defined in the Kubernetes API on each node and can do simple TCP, UDP, and SCTP stream forwarding or round robin TCP, UDP, and SCTP forwarding across a set of backends.

The Kubernetes controller manager is a daemon that embeds the core control loops shipped with Kubernetes.

The Kubernetes API server validates and configures data for the api objects which include pods, services, replicationcontrollers, and others. The API Server services REST operations and provides the frontend to the cluster’s shared state through which all other components interact.

So far, not bad. Some of the descriptions are a little wordy, but in general from reading the first one or two sentences, a new user reading the docs has a basic idea of what each component does.

What about kube-scheduler?

The Kubernetes scheduler is a policy-rich, topology-aware, workload-specific function that significantly impacts availability, performance, and capacity. The scheduler needs to take into account individual and collective resource requirements, quality of service requirements, hardware/software/policy constraints, affinity and anti-affinity specifications, data locality, inter-workload interference, deadlines, and so on. Workload-specific requirements will be exposed through the API as necessary.

This... is very confusing. A new user reading this doesn't learn what the scheduler actually does, just that it seems to do... something important?

I've copied a couple of sentences from https://kubernetes.io/docs/concepts/scheduling/kube-scheduler/#scheduling to clarify the documentation here.

I wonder if the entire paragraph quoted above is really entirely necessary? It reads like the opening paragraph of a requirements specification doc, not the quick help text most people expect from a CLI tool.

Which issue(s) this PR fixes:

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/documentation Categorizes issue or PR as related to documentation. 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. 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 Feb 20, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @dharmab!

It looks like this is your first PR to kubernetes/kubernetes 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kubernetes has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 20, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @dharmab. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 20, 2020
@dharmab
Copy link
Contributor Author

dharmab commented Feb 20, 2020

/assign @bsalamat

@Ye-Tian-Zero
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 21, 2020
@sftim
Copy link
Contributor

sftim commented Feb 24, 2020

/sig docs

@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Feb 24, 2020
@sftim
Copy link
Contributor

sftim commented Feb 24, 2020

/retest

Comment on lines 80 to 85
The scheduler is a policy-rich, topology-aware, workload-specific function that
significantly impacts availability, performance, and capacity. The scheduler
needs to take into account individual and collective resource requirements,
quality of service requirements, hardware/software/policy constraints, affinity
and anti-affinity specifications, data locality, inter-workload interference,
deadlines, and so on. Workload-specific requirements will be exposed through
Copy link
Contributor

Choose a reason for hiding this comment

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

Things I'd want readers to learn, instead of this:

  • you can have more than one scheduler in your cluster (for high availability)
  • you can have more than one scheduler in your cluster (if you deploy multiple, different schedulers, and configure things)
  • kube-scheduler is part of the control plane
  • kube-scheduler works by first filtering out nodes where the Pod can't possibly be placed, and then scoring what's left to find a good (good enough?) fit
  • kube-scheduler considers multiple constraints when scheduling, but I wouldn't list which ones (at least not here)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated this with a more substantial rewrite to incorporate these points while still being short enough to understand.

Copy link
Contributor

@sftim sftim 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 Feb 27, 2020
@dharmab
Copy link
Contributor Author

dharmab commented Mar 29, 2020

@sftim Thanks for the reviews, anything else needed to get this merged?

@dims
Copy link
Member

dims commented Mar 30, 2020

/assign @Huang-Wei @k82cn

/retest

@zacharysarah
Copy link
Contributor

/lgtm

@dims @cblecker 👋 What's the path to merge here?

@cblecker
Copy link
Member

@zacharysarah The author has been asked to squash the two commits in the PR into a single commit by an approver: #88371 (comment)

I assume when this is done, @Huang-Wei will approve the PR as an approver for this part of the code base.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 31, 2020
@dharmab
Copy link
Contributor Author

dharmab commented Mar 31, 2020

Thanks for looking at this @Huang-Wei and @zacharysarah . I've squashed the commits.

Copy link
Contributor

@damemi damemi 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 Mar 31, 2020
@Huang-Wei
Copy link
Member

/approve
/retest

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dharmab, Huang-Wei

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 31, 2020
@Huang-Wei
Copy link
Member

/retest

@Huang-Wei
Copy link
Member

@dharmab could you take a look at the CI failures?

@Huang-Wei
Copy link
Member

/hold
until CI failures get resolved.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 1, 2020
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 15, 2020
@dharmab
Copy link
Contributor Author

dharmab commented Apr 15, 2020

Rebasing to see if that resolves the CI failure

@sftim
Copy link
Contributor

sftim commented Apr 16, 2020

/retest

@Huang-Wei
Copy link
Member

/lgtm
/hold cancel

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Apr 16, 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.

1 similar comment
@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.

@dharmab
Copy link
Contributor Author

dharmab commented Apr 17, 2020

[measurement call PodStartupLatency - PodStartupLatency error: pod startup: too high latency 99th percentile: got 7.323477279s expected: 5s]

This looks like an unrelated failure. Can that test be ignored?

@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.

@Huang-Wei
Copy link
Member

/retest

@k8s-ci-robot k8s-ci-robot merged commit b2689ed into kubernetes:master Apr 17, 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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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/docs Categorizes an issue or PR as relevant to SIG Docs. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet