Origin: oc cluster up fails with leading 0 in docker version

Created on 3 Mar 2017  路  26Comments  路  Source: openshift/origin

oc cluster up fails with latest docker for mac Version 17.03.0-ce-mac1 (15587)

Version

oc v1.5.0-alpha.3+cf7e336
kubernetes v1.5.2+43a9be4
features: Basic-Auth
Unable to connect to the server: EOF

Steps To Reproduce

1) Update docker for mac (17.03.0-ce-mac1)
2) oc cluster up

Current Result
$ oc cluster up 
-- Checking OpenShift client ... OK
-- Checking Docker client ... OK
-- Checking Docker version ... FAIL
   Error: Minor number must not contain leading zeroes "03"
Expected Result

a local openshift cluster needs to be setup

prioritP1

Most helpful comment

also fix brew install openshift-cli ?

All 26 comments

i think there's a fix underway for this, @csrwng can point to it.

additional info

1) fails with latest docker community edge / community stable
2) oc cluster up --create-machine also fails even if i have docker for mac 1.13 (old)

This goes too for stable version in macOS:
$ oc version
oc v1.4.1+3f9807a
kubernetes v1.4.0+776c994
features: Basic-Auth

Server https://192.168.99.100:8443
openshift v1.3.1
kubernetes v1.3.0+52492b4

$ oc cluster up
-- Checking OpenShift client ... OK
-- Checking Docker client ... OK
-- Checking Docker version ... FAIL
Error: Minor number must not contain leading zeroes "03"

I can also confirm this:

Michaels-MacBook-Air:~ michaelmarkieta$ oc cluster up
-- Checking OpenShift client ... OK
-- Checking Docker client ... OK
-- Checking Docker version ... FAIL
   Error: Minor number must not contain leading zeroes "03"
Michaels-MacBook-Air:~ michaelmarkieta$ docker --version
Docker version 17.03.0-ce, build 60ccb22
Michaels-MacBook-Air:~ michaelmarkieta$ oc version
oc v1.5.0-alpha.3+cf7e336
kubernetes v1.5.2+43a9be4
features: Basic-Auth

The fix has already merged in origin master. If you build an oc client from master, things should work.

Thanks @csrwng, confirmed. What's the release schedule like for each pre-release?

While this fixes the docker version parsing in cluster up, doesn't a proper fix that includes being able to actually run pods rely on a fix for https://github.com/kubernetes/kubernetes/issues/42492 ?

A simple fix for both of these would be to remove leading zeroes in version components before parsing as semver - according to docker's new versioning scheme this would end up being semver compatible and be backwards compatible too.

@jimmidyson I don't believe the error stops you from running pods. Until now I've had no problems running pods on origin v1.5.0-alpha.3 with the latest docker.

@MichaelMarkieta the fix will go in the final v1.5 release. I'm less sure about the the schedule for it.

@csrwng When you say latest Docker do you mean 17.03-ce?

Yes

@csrwng Hmm yeah works for me too - interesting. Sure this didn't work before... thanks though!

I can't run pods when using 17.03.0-ce. Getting this error back from kubelet

5m         5m          1         jenkins-1-deploy   Pod                   Warning   FailedSync   {kubelet 10.34.129.45}   Error syncing pod, skipping: failed to "StartContainer" for "POD" with RunContainerError: "Failed to check docker api version: docker: failed to parse docker version \"17.03.0-ce\": illegal zero-prefixed version component \"03\" in \"17.03.0-ce\""

oc cluster up works fine btw from master - but the kubelet probably needs an update?

@kargakis which version of the kubelet are you running?

@csrwng the one that runs inside openshift/origin:v1.5.0-alpha.3

Interestingly, running from Kube HEAD, it works fine...

Interestingly, running from Kube HEAD, it works fine...

Using hack/local-up-cluster

@kargakis I hit that same issue, hence my comment before, but it seems to be inconsistent as it's working for me now with same 1.5.0-alpha.3 image... Very odd.

Node status from Kube cluster

containerRuntimeVersion: docker://Unknown

:)

I am running on Fedora 25 btw, this thread seems to be about Mac so ignore me.

I'm on Fedora 25 too... please don't ignore us ;)

Is there any chance that this get backported to the previous releases, since this breaks all the previous oc releases till now for everyone who has the latest docker installed.

/cc @smarterclayton

I'm ok with backport

also fix brew install openshift-cli ?

Docker does not use semantic versioning, so a test for the leading zero is pointless. Use an enum.
https://github.com/docker/docker/pull/31075

Was this page helpful?
0 / 5 - 0 ratings