kubernetes: cinder volumes with statefulset Unable to mount
Is this a BUG REPORT or FEATURE REQUEST?:
Uncomment only one, leave it on its own line: /kind bug
What happened:
the pv info:

the pvc info:

``-bash-4.2#` cat cinderpv1.yaml apiVersion: “v1” kind: “PersistentVolume” metadata: name: “pv0001” spec: capacity: storage: “2Gi” accessModes: - “ReadWriteMany” cinder: fsType: “ext4” volumeID: “421806a2-db1e-460a-b65b-b1ae38b46317”
``-bash-4.2# cat cinderpvc1.yaml kind: PersistentVolumeClaim apiVersion: v1 metadata: name: cinder-jlx-0 spec: accessModes: - ReadWriteMany resources: requests: storage: 2Gi volumeName: “pv0001”
``-bash-4.2# cat cinderpv2.yaml apiVersion: “v1” kind: “PersistentVolume” metadata: name: “pv0002” spec: capacity: storage: “2Gi” accessModes: - “ReadWriteMany” cinder: fsType: “ext4” volumeID: “421806a2-db1e-460a-b65b-b1ae38b46317”
``-bash-4.2#` cat cinderpvc2.yaml kind: PersistentVolumeClaim apiVersion: v1 metadata: name: cinder-jlx-1 spec: accessModes: - ReadWriteMany resources: requests: storage: 2Gi volumeName: “pv0002”
the statefulset info: `-bash-4.2# cat statefulset-cinder.yaml apiVersion: apps/v1beta1 kind: StatefulSet metadata: name: jlx spec: serviceName: “cinder” replicas: 2 template: metadata: labels: app: cinder spec: containers: - name: cinder image: index.tenxcloud.com/docker_library/nginx:latest imagePullPolicy: Never ports: - containerPort: 80 name: web volumeMounts: - name: cinder mountPath: /usr/cinder volumeClaimTemplates:
- metadata:
name: cinder
annotations:
volume.alpha.kubernetes.io/storage-class:
spec:
accessModes: [ “ReadWriteMany” ]
resources:
requests:
storage: 2Gi
`
but the pod info
the kubelet info

cinder show

What you expected to happen: pod running How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
- Kubernetes version (use
kubectl version):GitVersion:“v1.6.4+d6f433224538d” - Cloud provider or hardware configuration**:openstack
- OS (e.g. from /etc/os-release):NAME=“NewStart Carrier Grade Server Linux”
- Kernel (e.g.
uname -a):Linux master-jlx-k8s.novalocal 3.10.0-514.6.1.el7.x86_64 #1 SMP Thu Feb 16 19:50:09 CST 2017 x86_64 x86_64 x86_64 GNU/Linux - Install tools:
- Others:
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 21 (13 by maintainers)
the first problem:I can not config the controller manager to --cloud-config= --cloud-provider=openstack; yeah,you correct that the doc https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes-1 write cinder supports only ReadWriteOnce access mode,but if two pod in one minion use the same volumeid you can try it!maybe the way not often use,thanks very much!