I am trying to locally deploy cockroachdb for use with Kubernetes on Rancher. I have created 3 Kubernetes persistent volumes with hostPath set as a local directory.
When I try to deploy cockroachdb through:
kubectl create -f https://raw.githubusercontent.com/cockroachdb/cockroach/master/cloud/kubernetes/cockroachdb-statefulset.yaml
two of the three created pods show error.
The logs of one of the failed pods show this:
I180202 08:47:45.224556 39 storage/engine/rocksdb.go:411 opening rocksdb instance at "/cockroach/cockroach-data"
E180202 08:47:45.285297 1 cli/error.go:68 cockroach server exited with error: failed to create engines: could not open rocksdb instance: IO error: lock /cockroach/cockroach-data/LOCK: Resource temporarily unavailable
Error: cockroach server exited with error: failed to create engines: could not open rocksdb instance: IO error: lock /cockroach/cockroach-data/LOCK: Resource temporarily unavailable
Failed running "start"`.
The directory which is the hostPath of the 3 persistent volumes show this:
total 56
drwxr-xr-x 5 root root 4096 Feb 2 12:59 .
drwxrwxr-x 3 user user 4096 Feb 2 12:59 ..
-rw-r--r-- 1 root root 0 Feb 2 12:59 000003.log
drwxr-xr-x 2 root root 4096 Feb 2 12:59 auxiliary
-rw-r--r-- 1 root root 57 Feb 2 12:59 cockroach.advertise-addr
-rw-r--r-- 1 root root 13 Feb 2 12:59 COCKROACHDB_VERSION
-rw-r--r-- 1 root root 12 Feb 2 12:59 cockroach.http-addr
-rw-r--r-- 1 root root 19 Feb 2 12:59 cockroach.listen-addr
-rw-r--r-- 1 root root 16 Feb 2 12:59 CURRENT
-rw-r--r-- 1 root root 37 Feb 2 12:59 IDENTITY
drwxr-xr-x 3 root root 4096 Feb 2 14:38 local
-rw-r--r-- 1 root root 0 Feb 2 12:59 LOCK
drwxr-xr-x 2 root root 4096 Feb 2 14:38 logs
-rw-r--r-- 1 root root 13 Feb 2 12:59 MANIFEST-000001
-rw-r--r-- 1 root root 4241 Feb 2 12:59 OPTIONS-000005
I tried setting up nfs for rancher but the catalogs show that rancher-nfs is not compatible.