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

distinguish logical processing timeout and response body write timeout #79609

Conversation

answer1991
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

Distinguish logical processing timeout and response body write timeout. Which will fix error information in metric apiserver_request_total.

Which issue(s) this PR fixes:

Fixes #79608

Special notes for your reviewer:

Nothing yet.

Does this PR introduce a user-facing change?:

Metric apiserver_request_total will add a label-value {code=-1} which means apiserver has tried to write response but meet timeout, which may caused by under-layer system issue like socket issue, network iops issue, etc.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 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 Jul 1, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @answer1991. 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. area/apiserver sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 1, 2019
@k8s-ci-robot k8s-ci-robot requested review from dims and sttts July 1, 2019 16:12
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: answer1991
To complete the pull request process, please assign smarterclayton
You can assign the PR to them by writing /assign @smarterclayton in a comment when ready.

The full list of commands accepted by this bot can be found 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

@answer1991 answer1991 force-pushed the feature/distinguish-logic-process-and-body-write-timeout branch from b652783 to 86eb7ee Compare July 1, 2019 16:18
@yliaog
Copy link
Contributor

yliaog commented Jul 1, 2019

/cc @logicalhan

@yliaog
Copy link
Contributor

yliaog commented Jul 1, 2019

/cc @cheftako @jpbetz

@zhangxiaoyu-zidif
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 Jul 1, 2019
@answer1991
Copy link
Contributor Author

/retest

@answer1991 answer1991 force-pushed the feature/distinguish-logic-process-and-body-write-timeout branch from 86eb7ee to 23ef502 Compare July 2, 2019 03:14
@yue9944882
Copy link
Member

/assign @logicalhan

// So, actually it's not a completed 504 response to the client, the client received EOF.
// We need to distinguish this with logic processing timeout
// TODO(answer1991): if -1 code is ok here
metrics.Record(req, requestInfo, metrics.APIServerComponent, "", -1, 0, 0)
Copy link
Member

Choose a reason for hiding this comment

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

I agree that none of the official HTTP response codes are appropriate here. In fact even nginx's 499, client closed the connection does not fit. However I do think we should probably try to use something more like a response code, rather that -1. This seems like a 5xx series error. What about something like a 594?

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 do not think this code is a response code, actually server had already write a response code to the client which maybe is 200 or any other official HTTP response code. So I set -1 here is just for metrics usage. Setting an unassigned HTTP response code(like 594) will cause conflict error if the code become standard official code in the feature.

@dims
Copy link
Member

dims commented Jul 8, 2019

/uncc

@k8s-ci-robot k8s-ci-robot removed the request for review from dims July 8, 2019 15:45
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 6, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 5, 2019
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/apiserver 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. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

distinguish logical processing timeout and response body write timeout from 504 response
9 participants