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

Kublet.log reports error with latest Docker version #42492

Closed
mikebrow opened this issue Mar 3, 2017 · 13 comments · Fixed by #44068
Closed

Kublet.log reports error with latest Docker version #42492

mikebrow opened this issue Mar 3, 2017 · 13 comments · Fixed by #44068
Labels
area/docker help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/node Categorizes an issue or PR as relevant to SIG Node.
Milestone

Comments

@mikebrow
Copy link
Member

mikebrow commented Mar 3, 2017

To reproduce error:
Install latest Docker release..

first terminal:

sudo PATH=$PATH KUBERNETES_PROVIDER=local EXPERIMENTAL_CRI=true CONTAINER_RUNTIME=docker hack/local-up-cluster.sh

second terminal:
cat /tmp/kubelet.log|grep illegal

E0303 10:36:09.811626 1592 container_manager_linux.go:90] Unable to parse docker version "17.03.0-ce": illegal zero-prefixed version component "03" in "17.03.0-ce"

note docker version
Client:
Version: 17.03.0-ce
API version: 1.26
Go version: go1.7.5
Git commit: 60ccb22
Built: Thu Feb 23 11:02:43 2017
OS/Arch: linux/amd64

Server:
Version: 17.03.0-ce
API version: 1.26 (minimum version 1.12)
Go version: go1.7.5
Git commit: 60ccb22
Built: Thu Feb 23 11:02:43 2017
OS/Arch: linux/amd64
Experimental: false

Kubernetes version:
Client Version: version.Info{Major:"1", Minor:"7+", GitVersion:"v1.7.0-alpha.0.746+1d97472361e611-dirty", GitCommit:"1d97472361e61106a1da1ce33da97f243e4d0441", GitTreeState:"dirty", BuildDate:"2017-03-02T22:50:43Z", GoVersion:"go1.8", Compiler:"gc", Platform:"linux/amd64"}

Environment:

So the code is correctly reporting a semantic versioning error based on the rule that none of the segments should have a leading zero. But we don't own Docker's versioning. So... should we call ParseGeneric vs ParseSemantic (in pkg/util/version/version.go) to disable semver testing, or do we PR docker and limit the number of versions we're compatible with based on this test, or do we change this to a warning or info level information in the parse routine? Seems like overkill to error on a leading zero.

@yujuhong yujuhong added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Mar 3, 2017
@yujuhong
Copy link
Contributor

yujuhong commented Mar 3, 2017

kubelet doesn't know how to handle docker's new version scheme yet. Some of the code does rely on semver versions, but they should only check the docker API version, which still follows the original scheme.

@dims
Copy link
Member

dims commented Mar 6, 2017

Details on the docker versioning are here - moby/moby#31075 for the record

@dchen1107 dchen1107 added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. area/docker labels Mar 7, 2017
@dchen1107 dchen1107 added this to the v1.7 milestone Mar 7, 2017
@yongtang
Copy link
Contributor

yongtang commented Mar 8, 2017

I can help with the version fix if no one is working on this issue yet. As docker version (not API version) is used in many places, the complete fix may span to https://github.com/google/cadvisor I think.

@yujuhong
Copy link
Contributor

yujuhong commented Mar 8, 2017

@yongtang that'd be great!

Ignore the code in https://github.com/kubernetes/kubernetes/tree/v1.7.0-alpha.0/pkg/kubelet/dockertools, as that package is going away soon.

@derekwaynecarr
Copy link
Member

we are getting questions about this as well. @yujuhong - if this is something you have cycles to update its appreciated.

@mkumatag
Copy link
Member

I think we should go for modifying ParseSemantic to ParseGeneric to get away from semver check because moby/moby#31075 (comment) says docker never supported semver.

@mikebrow
Copy link
Member Author

mikebrow commented Mar 14, 2017

I fail to see the benefit of failing due to a leading zero rule. Seems like overkill. Suggest making the leading zero rule a warning/informational msg and return nil instead of error on the semver check. That or add a parameter to pass in a laxLeadingZero option to ParseSemantic() .. yada yada

@FrenchBen
Copy link

FrenchBen commented Mar 14, 2017

@mikebrow @yujuhong @yongtang Would love to land a helping hand in the patch ❤️ ; compatibility is always a concern for Docker, and we never want to see a release be a blocker for upgrades, although tracking down/keeping up how the API is being used in the wild is always challenging.

I agree that checking the API version may be a better way of doing this, instead of depending on the previous semver check.

Feel free to ping me in future issues when something like this happens.

* disclosure I work at Docker

@mkumatag
Copy link
Member

I spent some more time and here are my observation, we are logic of comparing current docker version with containerdVersion=1.11.0. After the new version change actually it does not make sense to compare with the older format of docker version, so I agree with @FrenchBen that we need to compare api version rather than versions.

Reference :
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/cm/container_manager_linux.go#L70
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/cm/container_manager_linux.go#L651

@yujuhong
Copy link
Contributor

Feel free to send a PR if you would like to help.

@mkumatag
Copy link
Member

@yujuhong I've submitted code in cadvisor to expose docker API version, can you PTAL at google/cadvisor#1623 and give LGTM ?

@supereagle
Copy link
Contributor

supereagle commented Apr 28, 2017

I think we should go for modifying ParseSemantic to ParseGeneric to get away from semver check

@mkumatag I have submitted the PR #44199 for docker version check in kubelet, but not for docker api version.

k8s-github-robot pushed a commit that referenced this issue May 4, 2017
Automatic merge from submit-queue

Use Docker API Version instead of docker version

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Fixes #42492
**Special notes for your reviewer**:

**Release note**:

`Update cadvisor to latest head to use docker APIversion exposed by cadvisor`
@yujuhong
Copy link
Contributor

yujuhong commented May 4, 2017

Thanks everyone for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docker help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/node Categorizes an issue or PR as relevant to SIG Node.
Projects
None yet
9 participants