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 metrics connection #1887

Merged
merged 1 commit into from
Jul 9, 2020
Merged

Conversation

Poor12
Copy link
Contributor

@Poor12 Poor12 commented Jul 3, 2020

What type of PR is this?

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

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind test
/kind failing-test
/kind feature

/kind bug

What this PR does / why we need it:
Kubelet uses the chunked method to return Response when processing logs/exec requests, but does not use this method when requesting /stats. Edged uses the ordinary connection in the same way.

Special notes for your reviewer:
/cc @kadisi


@kubeedge-bot kubeedge-bot requested a review from kadisi July 3, 2020 05:42
@kubeedge-bot kubeedge-bot added kind/bug Categorizes issue or PR as related to a bug. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 3, 2020
@@ -153,18 +153,11 @@ func (s *StreamServer) getMetrics(r *restful.Request, w *restful.Response) {
return
}

w.Header().Set("Transfer-Encoding", "chunked")
w.WriteHeader(http.StatusOK)
Copy link
Member

Choose a reason for hiding this comment

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

need statusok?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes,kubelet actually call the writeAsJson function,which passes the status_ok parameter

@kadisi
Copy link
Member

kadisi commented Jul 9, 2020

/lgtm

thanks @Poor12

cc @fisherxu @kevin-wangzefeng

@kubeedge-bot kubeedge-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 9, 2020
@fisherxu
Copy link
Member

fisherxu commented Jul 9, 2020

/approve

@kubeedge-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fisherxu

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

@kubeedge-bot kubeedge-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 9, 2020
@kubeedge-bot kubeedge-bot merged commit 027177a into kubeedge:master Jul 9, 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. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. 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

4 participants