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 --request-timeout to kube-apiserver to make global request timeout configurable #51415

Merged
merged 1 commit into from
Aug 29, 2017
Merged

Conversation

jpbetz
Copy link
Contributor

@jpbetz jpbetz commented Aug 26, 2017

What this PR does / why we need it:

Make the currently hard coded 60 global request timeout in apiserver configurable via a --request-timeout command line flag.

This has impacted k8s users on slower internet connections, making clusters resources inaccessible once the data volume for requests exceeds what can be transmitted in 60 seconds (the current hard coded limit). By making the limit configurable, users are able to extend the limit to a duration appropriate to their connection speed.

Which issue this PR fixes

Fixes #51355

Special notes for your reviewer:

We plan to backport this to 1.6 and 1.7. To ease the backport work, we've kept this change to a minimum. After this PR we will submit an additional PR to rename --min-request-timeout to something that more clearly describes it's purpose, such as --long-running-request-timeout-min.

Release note:

Add --request-timeout to kube-apiserver to make global request timeout configurable.

@k8s-ci-robot k8s-ci-robot added 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. labels Aug 26, 2017
@k8s-ci-robot
Copy link
Contributor

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

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. I understand the commands that are listed here.

@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 Aug 26, 2017
@k8s-github-robot k8s-github-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Aug 26, 2017
@jpbetz
Copy link
Contributor Author

jpbetz commented Aug 26, 2017

/assign mml

// If specified, requests will be allocated a random timeout between this value, and twice this value.
// Note that it is up to the request handlers to ignore or honor this timeout. In seconds.
// If specified, all requests except those which match the LongRunningFunc predicate will timeout
// after this duration. In seconds.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need In seconds for type time.Duration?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! No, we don't. I'll remove.

@mml
Copy link
Contributor

mml commented Aug 28, 2017

/lgtm

Thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 28, 2017
@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 28, 2017
@@ -132,6 +136,11 @@ func (s *ServerRunOptions) AddUniversalFlags(fs *pflag.FlagSet) {
"The maximum number of mutating requests in flight at a given time. When the server exceeds this, "+
"it rejects requests. Zero for no limit.")

fs.DurationVar(&s.RequestTimeout, "request-timeout", s.RequestTimeout, ""+
Copy link
Contributor

Choose a reason for hiding this comment

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

validate it as non-negative.

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. I've added the validation check.

@deads2k
Copy link
Contributor

deads2k commented Aug 28, 2017

I'm fine with it. @sttts any reservations?

@jpbetz
Copy link
Contributor Author

jpbetz commented Aug 28, 2017

/retest

@k8s-ci-robot
Copy link
Contributor

@jpbetz: you can't request testing unless you are a kubernetes member.

In response to this:

/retest

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.

@mml
Copy link
Contributor

mml commented Aug 28, 2017

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 28, 2017
@mml
Copy link
Contributor

mml commented Aug 28, 2017

/lgtm

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

jpbetz commented Aug 29, 2017

/retest

3 similar comments
@jpbetz
Copy link
Contributor Author

jpbetz commented Aug 29, 2017

/retest

@jpbetz
Copy link
Contributor Author

jpbetz commented Aug 29, 2017

/retest

@jpbetz
Copy link
Contributor Author

jpbetz commented Aug 29, 2017

/retest

@wojtek-t
Copy link
Member

/approve

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jpbetz, mml, wojtek-t

Associated issue: 51355

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 29, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 50932, 49610, 51312, 51415, 50705)

@k8s-github-robot k8s-github-robot merged commit 0b0b2a2 into kubernetes:master Aug 29, 2017
@mml mml added this to the v1.6 milestone Aug 29, 2017
k8s-github-robot pushed a commit that referenced this pull request Sep 1, 2017
Automatic merge from submit-queue (batch tested with PRs 51480, 49616, 50123, 50846, 50404)

Add KUBE_APISERVER_REQUEST_TIMEOUT_SEC env var.

Cluster startup support for the flag added by #51415.  I won't merge until that PR merges.

Bug: #51355

cc @jpbetz
k8s-github-robot pushed a commit that referenced this pull request Sep 12, 2017
…-upstream-release-1.6

Automatic merge from submit-queue

Automated cherry pick of #51415 upstream release 1.6

Cherrypick of #51415



**What this PR does / why we need it**:

Backporting to support Kubernetes users with slower internet connections that need the ability to increase this timeout.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```
@k8s-cherrypick-bot
Copy link

Commit found in the "release-1.6" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked.

@jpbetz
Copy link
Contributor Author

jpbetz commented Sep 13, 2017

Created PR #52385 to merge this into 1.7.

@wojtek-t wojtek-t added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Sep 13, 2017
k8s-github-robot pushed a commit that referenced this pull request Sep 13, 2017
…-upstream-release-1.7

Automatic merge from submit-queue

Automated cherry pick of #51415 upstream release 1.7

Cherrypick of #51415

Manually resolved merge conflicts for this one.

**What this PR does / why we need it**:

Backporting to support Kubernetes users with slower internet connections that need the ability to increase this timeout.
@k8s-cherrypick-bot
Copy link

Commit found in the "release-1.7" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked.

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. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

apiserver should export global timeout as a flag
10 participants