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:
request.Host
or request.URL.Host
(if the former is empty) (See here)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)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))"/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