Why is Docker breaking my OpenShift?!

Working local

I use oc cluster up for local testing a lot. On a Mac this requires to have docker-machine up and running to provide a docker daemon… so gar, so good.

This night I removed my openshift docker-machine and recreated it. BTW, we talked about all that Docker CE and Docker EE and … a few hours ago on a company call, I didnt think about the fact that it will strike upon me on a Mac just a few hours later.

docker-machine create openshift -d virtualbox recreated my machine and eval $(docker-machine env openshift) gave me all the environment configuration I need to oc cluster up my OpenShift.

But… nada!

- BREAK - BREAK - BREAK -

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

OpenShift doesnt like what it saw. First natural reaction: update to latest or brew upgrade openshift-cli, this gave me an oc v1.5.0-alpha.2+e4b43ee quick recheck:

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

[goern@tBook ~]$ docker version
Client:
 Version:      1.12.5
 API version:  1.24
 Go version:   go1.6.4
 Git commit:   7392c3b
 Built:        Fri Dec 16 06:14:34 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      17.03.0-ce
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   3a232c8
 Built:        Tue Feb 28 07:52:04 2017
 OS/Arch:      linux/amd64

No, OpenShift still does not like my Docker version. This problem is related to 1.5.0-alpha.3 so if you use OpenShift client tools from the github release page, you should be save!

More Updates…

Let’s do it, lets get oc from github rather than brew:

[goern@tBook ~]$ brew uninstall --force openshift-cli
Uninstalling openshift-cli... (26 files, 270.7MB)
[goern@tBook ~]$ curl -gO https://github.com/openshift/origin/releases/download/v3.6.0-alpha.0/openshift-origin-client-tools-v3.6.0-alpha.0-0343989-mac.zip -L
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   637    0   637    0     0   1099      0 --:--:-- --:--:-- --:--:--  1105
100 19.0M  100 19.0M    0     0  1824k      0  0:00:10  0:00:10 --:--:-- 2521k
[goern@tBook ~]$ unzip openshift-origin-client-tools-v3.6.0-alpha.0-0343989-mac.zip
Archive:  openshift-origin-client-tools-v3.6.0-alpha.0-0343989-mac.zip
  inflating: oc
  inflating: README.md
  inflating: LICENSE
[goern@tBook ~]$ mv oc ˜/bin/
[goern@tBook ~]$ rm README.md LICENSE
[goern@tBook ~]$ oc version
oc v3.6.0-alpha.0+0343989
kubernetes v1.5.2+43a9be4
features: Basic-Auth

HINT: The Atomic OpenShift team has change the versioning of OpenShift Origin, it is now in line with Red Hat’s OpenShift Container Platform, so 3.6 is the successor of 1.5 and will be based on Kubernetes 1.6.

So, now we got the latest and greatest… let start the local OpenShift cluster by oc cluster up… Pulling Images… and it works!

-- Checking OpenShift client ... OK
-- Checking Docker client ... OK
-- Checking Docker version ...
   WARNING: Cannot verify Docker version
-- Checking for existing OpenShift container ... OK
-- Checking for openshift/origin:v3.6.0-alpha.0 image ...
   Pulling image openshift/origin:v3.6.0-alpha.0

You should see that more container images are pulled and the OpenShift local cluster is starting up.

Have Fun!