A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/kubernetes/kubernetes/issues/23809 below:

Kubelet built with go(<= 1.4) won't work with docker built with go(>=1.6) · Issue #23809 · kubernetes/kubernetes · GitHub

After #23506, Kubelet built with go(<= 1.4) won't work with docker built with go(>=1.6).

@andyzheng0831 reported that #23506 broke our Jenkins trusty built #23506 (comment). Thank @eparis for pointing me to moby/moby#20865.

After some digging, I found out why this happened:

  1. After golang/go@6e11f45, the http server in Go 1.6 will validate the HTTP Host header conforming to HTTP 1.1 (See net/http: HTTP/1.1 requests without Host header should be rejected  golang/go#13624)
  2. On the http client side, Go writes the HTTP Host header with request.Host or request.URL.Host(if the former is empty) (See here)
  3. When using the default docker endpoint (unix:///var/run/docker.sock), engine-api will set request.Host="", request.URL.Host="/var/run/docker.sock" (See set request.URL.Host and set request.Host)
  4. When the engine-api is built with Go >= 1.5, everything goes well, because Go will clean up the Host making both request.Host and request.URL.Host to "", the HTTP Host header will be "". (See net/http: does not verify validity of Host header golang/go#11206))
  5. But when the engine-api is built with Go<=1.4, Go won't clean up the Host, so the HTTP Host header will be "/var/run/docker.sock". It will break Go 1.6 http server side validation in 1. because '/'is not a valid character, causing 400 Bad Request: malformed Host header.

Go-dockerclient doesn't have this problem, because it is always using a "fake" url for unix endpoint. (See here and here.

I've filed an issue to docker engine-api docker/engine-api#189. But before they fix that, we could not use Kubelet built with go(<=1.4) together with Docker built with go(>=1.6) unless we revert #23506.

Is this acceptable? @kubernetes/sig-node


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4