origin: oc cluster with oc 1.5.0.alpha.2 fails when persistent data directory used.
When using --host-data-dir option with oc cluster up using oc 1.5.0.alpha.2, get the error:
oc cluster up --host-data-dir "/C/Users/Graha/PowerShift/profiles/oc15/data" --host-config-dir "/C/Users/Graha/PowerShift/profiles/oc15/config" --use-existing-config
-- Checking OpenShift client ... OK
-- Checking Docker client ... OK
-- Checking Docker version ... OK
-- Checking for existing OpenShift container ... OK
-- Checking for openshift/origin:v1.5.0-alpha.2 image ...
Pulling image openshift/origin:v1.5.0-alpha.2
Pulled 1/3 layers, 36% complete
Pulled 1/3 layers, 70% complete
Pulled 2/3 layers, 83% complete
Pulled 3/3 layers, 100% complete
Extracting
Image pull complete
-- Checking Docker daemon configuration ... OK
-- Checking for available ports ... OK
-- Checking type of volume mount ...
Using Docker shared volumes for OpenShift volumes
-- Creating host directories ... OK
-- Finding server IP ...
Using 10.0.75.2 as the server IP
-- Starting OpenShift container ...
Creating initial OpenShift configuration
Starting OpenShift using container 'origin'
FAIL
Error: could not start OpenShift container "origin"
Details:
Last 10 lines of "origin" container log:
2017-01-15 02:43:53.883049 I | etcdserver: name = openshift.local
2017-01-15 02:43:53.883125 I | etcdserver: data dir = /var/lib/origin/openshift.local.etcd
2017-01-15 02:43:53.883146 I | etcdserver: member dir = /var/lib/origin/openshift.local.etcd/member
2017-01-15 02:43:53.883163 I | etcdserver: heartbeat = 100ms
2017-01-15 02:43:53.883174 I | etcdserver: election = 1000ms
2017-01-15 02:43:53.883185 I | etcdserver: snapshot count = 10000
2017-01-15 02:43:53.883201 I | etcdserver: advertise client URLs = https://10.0.75.2:4001
2017-01-15 02:43:53.883265 I | etcdserver: initial advertise peer URLs = https://10.0.75.2:7001
2017-01-15 02:43:53.883288 I | etcdserver: initial cluster = openshift.local=https://10.0.75.2:7001
2017-01-15 02:43:53.897919 C | etcdserver: create wal error: rename /var/lib/origin/openshift.local.etcd/member/wal.tmp /var/lib/origin/openshift.local.etcd/member/wal: permission denied
Version
oc 1.5.0.alpha.2
Steps To Reproduce
Use oc cluster up with --host-data-dir option.
Current Result
Fails on startup.
Expected Result
Should startup.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 27 (14 by maintainers)
I’m using:
VirtualBox 5.1.26 Kubernetes v1.5.2+43a9be4
openshift v1.5.0+031cbe4
Didn’t work for me using --host-data-dir (and others) :
With output:
Openshift writes to the directories /vm/… (also defined in VirtualBox) but successfully won’t start.
@bparees or @GrahamDumpleton : Just wondering if you would have any ideas as I’ve seen a couple of your conversations that touched on this problem please?
Thanks.
You need to specify a directory that is not a windows directory (which is pretty much anything that’s not /c/blah). In non-windows Docker, it’s easy to just mount the root fs of the vm into a container and explore. However, on Windows, it looks like mounting the root doesn’t work, so using /var is a safe bet. How can you explore it? Simply run a container that mounts it and take a look at what’s there:
Pretty much yes, as long as it’s not root (‘/’) as I mentioned above. I tried -v /foo:/foo and it simply creates that directory on the vm
I’d follow the pattern we already use by default, something under ‘/var/lib/’, like: ‘/var/lib/profiles/[profile]/pv’
You can just run a container that mounts the parent directory and remove that directory. For example:
Same for copying it to the host drive… just create a container with a given name that mounts the directory, use
docker cpto copy the contents, and then delete the container: