用户kubernetes持有cockroachdb的卷

时间:2018-02-02 10:14:33

标签: ubuntu kubernetes nfs rancher cockroachdb

我正在尝试本地部署 cockroachdb ,以便与Rancher上的Kubernetes一起使用。我创建了3个Kubernetes持久卷,并将hostPath设置为本地目录。

当我尝试通过以下方式部署cockroachdb时:

kubectl create -f https://raw.githubusercontent.com/cockroachdb/cockroach/master/cloud/kubernetes/cockroachdb-statefulset.yaml

三个创建的pod中的两个显示错误。

其中一个失败的pod的日志显示:

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"`.

作为3个持久卷的hostPath的目录显示:

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

我尝试为牧场主设置nfs,但目录显示rancher-nfs不兼容。

0 个答案:

没有答案