-
Notifications
You must be signed in to change notification settings - Fork 41.8k
Allow exec prober to timeout under Docker #58510
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
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: louyihua Assign the PR to them by writing No associated issue. Update pull-request body to add a reference to an issue, or get approval with 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 |
|
/ok-to-test |
Currently, the timeout setting is only effective for HTTP/TCP prober. This patch add an implementation for the exec prober to timeout.
f859994 to
bed47b0
Compare
|
code mostly looks good |
|
Why not setting the timeout to the context in the docker client? https://github.com/kubernetes/kubernetes/blob/v1.10.0-alpha.1/pkg/kubelet/dockershim/libdocker/kube_docker_client.go#L462 /assign @ncdc |
|
@yujuhong The exec prober does not use this interface, so this PR does not touch it. |
|
I think it does use the |
|
@yujuhong Checked again under OpenShift 3.9. At the top frame of the above stack trace, a gRPC call is invoked and the the control transfers to Neither of above stack traces touchs the |
|
https://github.com/kubernetes/kubernetes/blob/v1.10.0-alpha.1/pkg/kubelet/dockershim/exec.go#L61 func (*NativeExecHandler) ExecInContainer(client libdocker.Interface, ...) { |
|
Another PR that modifies the libdocker.Interface is proposed in #58925. |
|
I'd like @ncdc's input on what's the best place to do the timeout check. |
|
@yujuhong I honestly have a hard time keeping track of what the code path is, given CRI and dockershim and libdocker and whatnot. I'd like to help out, but maybe you could give me an overview of how things work in the kubelet these days? |
@ncdc this part of the code actually hasn't changed much, although being moved around a couple of times and harder to trace now :-) |
|
/unassign @dims |
|
@ncdc any comments to this PR? |
|
My apologies for the delayed response. I think there are 2 possible courses of action here.
From a design purity standpoint, I think option 2 makes more sense, since it allows all current and future callers of Would you agree? @yujuhong I will, however, defer to sig-node to make the final decision. I think either this PR or a re-worked #58925 that matches my option 2 would be acceptable. |
|
@ncdc I agree |
|
Can we close this since it looks like #58925 is the way we want to go? |
|
@ncdc OK, close this |
What this PR does / why we need it:
Currently, the timeout setting is only effective for HTTP/TCP prober.
This patch add an implementation for the exec prober to timeout.
Release note: