You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Volume snapshots cannot be created if the Ceph CSI is setup to use a rados namespace and its user only has permissions on that namespace (as opposed to the whole pool).
Environment details
Image/version of Ceph CSI driver : 3.6.1
Helm chart version : 3.6.1
Kernel version : 4.18
Mounter used for mounting PVC (for cephFS its fuse or kernel. for rbd its krbd or rbd-nbd) : krbd
Kubernetes cluster version : 1.23
Ceph cluster version : 16.2.9
Steps to reproduce
I have setup ceph-csi-rbd to write volumes into a namespace within the rbd pool of our Ceph cluster:
I can see a snapshot get created and deleted repeatedly in Ceph, but from the perspective of the Kubernetes cluster, it fails:
Status:
Bound Volume Snapshot Content Name: snapcontent-2e734aba-76ef-4879-b5b5-5d01ffffc77b
Error:
Message: Failed to check and update snapshot content: failed to take snapshot of the volume 0001-0024-56dfe7fc-83fe-42b1-8e7c-be9cc71c55a8-0000000000000011-a989a43d-d1fa-11ec-8f1e-22c5cc23c07d: "rpc error: code = Internal desc = rb
d: ret=-1, Operation not permitted"
Time: 2022-07-05T13:38:47Z
Ready To Use: false
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal CreatingSnapshot 17s snapshot-controller Waiting for a snapshot default/rbd-pvc-snapshot to be created by the CSI driver.
The only way I managed to make it work is to grant the client.k8s.test user caps beyond its namespace:
After changing caps and restarting the provisioner with kubectl -n ceph-csi-rbd delete pod -l app=ceph-csi-rbd,component=provisioner, I can successfully create a snapshot.
Actual results
The volume snapshot is never properly created.
Expected behavior
The volume snapshot should be created even if the user is restricted to a single rados namespace. Creating volumes (PVCs) works fine with those permissions, only snapshots are broken.
Describe the bug
Volume snapshots cannot be created if the Ceph CSI is setup to use a rados namespace and its user only has permissions on that namespace (as opposed to the whole pool).
Environment details
fuse
orkernel
. for rbd itskrbd
orrbd-nbd
) :krbd
Steps to reproduce
I have setup ceph-csi-rbd to write volumes into a namespace within the
rbd
pool of our Ceph cluster:And the user for ceph-csi-rbd only has permission to work in that namespace:
I'm able to create PVCs in k8s and use them without any issue.
But then I configured the external-snapshotter with the following
VolumeSnapshotClass
:When I try and create a snapshot like this:
I can see a snapshot get created and deleted repeatedly in Ceph, but from the perspective of the Kubernetes cluster, it fails:
The only way I managed to make it work is to grant the
client.k8s.test
user caps beyond its namespace:After changing caps and restarting the provisioner with
kubectl -n ceph-csi-rbd delete pod -l app=ceph-csi-rbd,component=provisioner
, I can successfully create a snapshot.Actual results
The volume snapshot is never properly created.
Expected behavior
The volume snapshot should be created even if the user is restricted to a single rados namespace. Creating volumes (PVCs) works fine with those permissions, only snapshots are broken.
Logs
The text was updated successfully, but these errors were encountered: