Origin: oc cluster up broken in rc1 with Docker for OSX

Created on 9 Sep 2016  路  17Comments  路  Source: openshift/origin

oc cluster up is broken in rc1 and worked just fine with alpha3
using oc version alpha3 with --version=v1.3.0-rc1 successfully starts the cluster.

Version

oc-13 v1.3.0-rc1
kubernetes v1.3.0+52492b4
features: Basic-Auth

OS X 10.11.6 (15G1004)
Docker for OSX OS X 1.12.0-a (build: 11213) ad6ab836187e4111082447b7c0a6a74d01929a5c

Steps To Reproduce
  1. Reset Docker for OSX to factory defaults
  2. Add 172.30.0.0/16 to insecure registries
  3. run oc cluster up
    Current Result
-- Checking OpenShift client ... OK
-- Checking Docker client ... OK
-- Checking Docker version ... OK
-- Checking for existing OpenShift container ... OK
-- Checking for openshift/origin:v1.3.0-rc1 image ... OK
-- Checking Docker daemon configuration ... OK
-- Checking for available ports ... OK
-- Checking type of volume mount ...
   Using nsenter mounter for OpenShift volumes
-- Creating host directories ... OK
-- Finding server IP ...
   Using 192.168.1.42 as the server IP
-- Starting OpenShift container ...
   Creating initial OpenShift configuration
FAIL
   Error: could not create OpenShift configuration
   Caused By:
     Error: cannot start container 8bb0f10aede3920d2c9dd1030fbca63ac83861b99b79ad1419f1b57141fd173d
     Caused By:
       Error: API error (500): {"message":"linux mounts: Path /var/lib/origin/openshift.local.volumes is mounted on /var but it is not a shared or slave mount."}
Expected Result
-- Checking OpenShift client ... OK
-- Checking Docker client ... OK
-- Checking for existing OpenShift container ... OK
-- Checking for openshift/origin:v1.3.0-rc1 image ... OK
-- Checking Docker daemon configuration ... OK
-- Checking for available ports ... OK
-- Checking type of volume mount ...
   Using Docker shared volumes for OpenShift volumes
-- Checking Docker version ... OK
-- Creating host directories ... OK
-- Finding server IP ...
   Using 192.168.1.42 as the server IP
-- Starting OpenShift container ...
   Creating initial OpenShift configuration
   Starting OpenShift using container 'origin'
   Waiting for API server to start listening
   OpenShift server started
-- Installing registry ... OK
-- Installing router ... OK
-- Importing image streams ... OK
-- Importing templates ... OK
-- Login to server ... OK
-- Creating initial project "myproject" ... OK
-- Server Information ...
   OpenShift server started.
   The server is accessible via web console at:
       https://192.168.1.42:8443

   You are logged in as:
       User:     developer
       Password: developer

   To login as administrator:
       oc login -u system:admin

Start the cluster.

Additional Information

It works fine with alpha-3 (thats how I got the expected output):

 oc-13-alpha3 cluster up --version=v1.3.0-rc1
componencomposition prioritP2

Most helpful comment

ok, so I confirmed that this is no longer an issue with beta25, which you can download from here (beta channel):
https://docs.docker.com/docker-for-mac/
however, if you need to use the release version, or an older version, here's a workaround. Before starting 'cluster up', run this:
docker run -v /:/rootfs -ti --rm --entrypoint=/bin/bash --privileged openshift/origin:v1.3.0-rc1 -c "mv /rootfs/bin/findmnt /rootfs/bin/findmnt.backup"
This is to stop 'cluster up' from using the nsenter mounter when on the Mac.

All 17 comments

I can't reproduce this locally with oc built from master and the latest Docker for Mac (from the beta channel):
Version 1.12.1-beta25 (build: 11807)

I will try shortly with the released oc and the Docker for Mac from the stable channel.

Wanted to try HEAD, but failed installing it from homebrew with:

==> Cloning https://github.com/openshift/origin.git
Cloning into '/Users/mikz/Library/Caches/Homebrew/openshift-cli--git'...
remote: Counting objects: 13079, done.
remote: Compressing objects: 100% (10794/10794), done.
remote: Total 13079 (delta 2565), reused 8382 (delta 1431), pack-reused 0
Receiving objects: 100% (13079/13079), 44.05 MiB | 177.00 KiB/s, done.
Resolving deltas: 100% (2565/2565), done.
Checking connectivity... done.
Checking out files: 100% (10893/10893), done.
==> Checking out branch master
==> make all WHAT=cmd/oc GOFLAGS=-v OS_OUTPUT_GOPATH=1
Last 15 lines from /Users/mikz/Library/Logs/Homebrew/openshift-cli/01.make:
/private/tmp/openshift-cli-20160909-30874-futzd0/hack/common.sh: line 775: OS_GIT_MAJOR: unbound variable
[ERROR] PID 31069: /private/tmp/openshift-cli-20160909-30874-futzd0/hack/common.sh:761: `ldflags+=($(os::build::ldflag "${OS_GO_PACKAGE}/pkg/version.majorFromGit" "${OS_GIT_MAJOR}"))` exited with status 1.
[INFO]      Stack Trace:
[INFO]        1: /private/tmp/openshift-cli-20160909-30874-futzd0/hack/common.sh:761: `ldflags+=($(os::build::ldflag "${OS_GO_PACKAGE}/pkg/version.majorFromGit" "${OS_GIT_MAJOR}"))`
[INFO]        2: /private/tmp/openshift-cli-20160909-30874-futzd0/hack/common.sh:263: os::build::ldflags
[INFO]        3: /private/tmp/openshift-cli-20160909-30874-futzd0/hack/common.sh:247: os::build::internal::build_binaries
[INFO]        4: hack/build-go.sh:24: os::build::build_binaries
[INFO]   Exiting with code 1.
[ERROR] PID 31069: /private/tmp/openshift-cli-20160909-30874-futzd0/hack/common.sh:257: `version_ldflags=$(os::build::ldflags)` exited with status 1.
[INFO]      Stack Trace:
[INFO]        1: /private/tmp/openshift-cli-20160909-30874-futzd0/hack/common.sh:257: `version_ldflags=$(os::build::ldflags)`
[INFO]        2: /private/tmp/openshift-cli-20160909-30874-futzd0/hack/common.sh:247: os::build::internal::build_binaries
[INFO]        3: hack/build-go.sh:24: os::build::build_binaries
[INFO]   Exiting with code 1.
make: *** [all] Error 1

Tried with Docker for OSX Beta: Version 1.12.1-rc1-beta23 (build: 11375) 2f0427ac7d4d47c705934ae141c3a248ed7fff40 and got the same result as in the description.

Maybe resetting Docker to factory settings is not enough? I'll see if I can completely uninstall Docker and related files and start from scratch.

Resetting Docker to default wipes all the VMs, asks for all permissions like new install. But will try Uninstall.

I was thinking about my end :)

Tried it anyway and still the same issue. If you can share HEAD binary I can try I'll try. But can't easily build it locally.

I was finally able to reproduce. I switched to the Docker for Mac stable (version you were using when reporting the issue). So the problem is that because the findmnt binary is present on that image, we are deciding to use nsenter mounter, and that fails.

After installing the beta version did you do a factory reset ?

Before I didn't. Now I did and still the same issue.

edit: no, different issue (running socat in the background)

It fixes it. So the workaround is to use Docker for OSX Beta and reset to factory defaults.

ok, so I confirmed that this is no longer an issue with beta25, which you can download from here (beta channel):
https://docs.docker.com/docker-for-mac/
however, if you need to use the release version, or an older version, here's a workaround. Before starting 'cluster up', run this:
docker run -v /:/rootfs -ti --rm --entrypoint=/bin/bash --privileged openshift/origin:v1.3.0-rc1 -c "mv /rootfs/bin/findmnt /rootfs/bin/findmnt.backup"
This is to stop 'cluster up' from using the nsenter mounter when on the Mac.

Is there going to be an attempt to address this problem so not forced to use beta stream of Docker for Mac?

FWIW. I can't get oc cluster up to work with latest beta stream version either.

docker 1.12.1-beta26.1 (build: 12100)
oc v1.3.0
kubernetes v1.3.0+52492b4

So have no way of running oc cluster up on Mac any more. Will create separate issues.

Crap. Hit by my firewall rules again as was using host IP and not 127.0.0.1.

I get this error on ubuntu 14.04:

FAIL
Error: could not create OpenShift configuration
Caused By:
Error: cannot start container 402236f989e5363426aff9e38d668b3605ac43667fc8a844d4e2dc5761c15061
Caused By:
Error: API error (500): Cannot start container 402236f989e5363426aff9e38d668b3605ac43667fc8a844d4e2dc5761c15061: Path /var/lib/origin/openshift.local.volumes is mounted on / but it is not a shared or slave mount.

Any idea?

if I execute the following command on my Ubuntu 14.04 the cluster up works.

mv /bin/findmnt /bin/findmnt.backup

This is no longer broken on the stable channel of Docker for the Mac. Will track the issue on other distros through #11314

Was this page helpful?
0 / 5 - 0 ratings