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

crictl exec and dockershim only work with synchronous execution #283

Closed
vrothberg opened this issue Apr 3, 2018 · 9 comments
Closed

crictl exec and dockershim only work with synchronous execution #283

vrothberg opened this issue Apr 3, 2018 · 9 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@vrothberg
Copy link
Contributor

crictl exec only works with dockershim.sock as an endpoint when the --sync flag is passed to execute the command synchronously. Otherwise, we receive the following error:

execing command in container failed: error sending request: Post http://127.0.0.1:10250/cri/exec/bhY76ttV: malformed HTTP response "\x15\x03\x01\x00\x02\x02\x16"

  • kubelet version: Kubernetes v1.9.6
  • crictl version: 1.0.0-alpha.0
  • Docker version: 17.09.1-ce

Notice: we experience no issues with CRI-O.

@feiskyer
Copy link
Member

feiskyer commented Apr 3, 2018

@vrothberg Just tested with kubelet v1.9.6 and crictl 1.0.0-alpha.0 (downloaded from their releases page), both exec -s and exec -i -t work ok. Could you explain how do you set your environments?

@feiskyer
Copy link
Member

feiskyer commented Apr 3, 2018

By the way, I'm using docker v1.13.1

@Random-Liu
Copy link
Contributor

Random-Liu commented Apr 4, 2018

@vrothberg This is a known issue in dockershim. We are discussing about a solution at kubernetes/kubernetes#36666 (comment).

We are going to address this in Kubernetes 1.11.

@Random-Liu Random-Liu added the kind/bug Categorizes issue or PR as related to a bug. label Apr 4, 2018
@feiskyer
Copy link
Member

feiskyer commented Apr 4, 2018

@Random-Liu @vrothberg Are you referring running kubelet without --experimental-dockershim? Then it won't work.

crictl only talks to http://127.0.0.1:10250 now and kubelet's dockershim serves at https with authz.

@vrothberg
Copy link
Contributor Author

Thanks a lot, @feiskyer @Random-Liu, for the info. As it seems to be an issue in dockershim, feel free to close this issue.

@vrothberg
Copy link
Contributor Author

@Random-Liu We're also facing issues with interactive execution. For instance, crictl exec -i -t ID /bin/sh does not work and seemingly "hangs".

Is there any chance, the fixes get backported to K8s 1.10?

@feiskyer
Copy link
Member

Fixed in kubernetes/kubernetes#64006, which should be included in v1.11.

@Random-Liu Do you have any plan of porting this to v1.10?

@Random-Liu
Copy link
Contributor

Random-Liu commented Jun 26, 2018

I don't think we can port it to 1.10. The fix is huge, and it is a new feature.

@vrothberg
Copy link
Contributor Author

Closing as this issue has been fixed in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants