rook: OpenShift: insufficient permission inside the containers
Bug Report
What happened:
When trying to create a cluster the operator fails with:
op-cluster: failed to create cluster in namespace rook. failed to start the mons. failed to initialize ceph cluster info. failed to get cluster info. failed to create mon secret
s. failed to create dir /var/lib/rook/rook. mkdir /var/lib/rook: permission denied
What you expected to happen:
Cluster creation should succeed.
Additional information:
OpenShift uses the following feature to get fewer user privileges on application development where the expected user is ‘root’, see https://blog.openshift.com/jupyter-on-openshift-part-6-running-as-an-assigned-user-id/
How to reproduce it (minimal and precise):
Simply run kubectl create -f rook-cluster.yml
Environment:
- OS (e.g. from /etc/os-release): CentOS Linux release 7.4.1708 (Core)
- Kernel (e.g.
uname -a): Linux k8s-master.example.com 3.10.0-693.11.1.el7.x86_64 #1 SMP Mon Dec 4 23:52:40 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux - Cloud provider or hardware configuration: VM 1 CPU, 4GB RAM
- Rook version (use
rook versioninside of a Rook Pod): v0.6.0-80.g3dfb151 - Kubernetes version (use
kubectl version): v1.7.6+a08f5eeb62 - Kubernetes cluster type (e.g. Tectonic, GKE, OpenShift): OpenShift
- Ceph status (use
ceph healthin the Rook toolbox): no cluster yet
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 49 (46 by maintainers)
FWIW, I got Rook running on openshift (minishift) by doing the following:
Now edit the restricted SCC policy as follows:
change the following values:
Now launch the rook operator:
finally modify the dataDirHostPath to point to /mnt/sda1/rook since this is the only path in minishift that actually has space (vs. tmpfs).
and then run
the Rook cluster is up: