Closed spuiuk closed 2 years ago
From a rook-ceph bug report I read,
RWO PVC can be attached in multiple pods on the same nodes, if you try to attach RWO PVC on multiple nodes you will face this error
smbshare3-pvc is created in RWO mode in my configuration and this seems to have caused this problem.
This is fixed by changing the PVC mode to ReadWriteMany
[sprabhu@fedora samba-operator]$ cat ~/smbshare3.yaml
apiVersion: samba-operator.samba.org/v1alpha1
kind: SmbShare
metadata:
name: smbshare3
spec:
scaling:
availabilityMode: clustered
minClusterSize: 2
storage:
pvc:
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
readOnly: false
shareName: "smbshare3"
[sprabhu@fedora samba-operator]$ kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
smbshare3-pvc Bound pvc-3eb64188-fc20-40f8-8c54-65660f10e91b 1Gi RWX rook-cephfs 3m32s
smbshare3-state Bound pvc-fe7ccd76-1701-401f-af3c-d95a1e0f9b87 1Gi RWX rook-cephfs 3m31s
NotABug
From a UX point of view it is somewhat annoying to create the resource and then have it fail somewhat "mysteriously" later. We could look into validating the spec through an adminssion controller in the future.
Checking with kubectl describe smbshare3-1, we see