-
Notifications
You must be signed in to change notification settings - Fork 547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to restrict cephfs-csi access to single filesystem #2687
Comments
Can you check the logs of the |
Here it is, but the information seems to be the same
The logs are the same for both sets of caps specified in my last message. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions. |
Hello, we see the same errors in our Env:
|
@marco-venuti @fhufenreuter have you tried manually creating a subvolume/subvolumegroup and rados objects with this restricted user access? you can create a rados object with the below command and check is it working
|
With
subvolume(group) creation succeds, but it actually succeds even for filesystems other than Object creation instead fails on the metadata pool, but succeds on data pool:
|
cephcsi needs access to create the objects in the cephfs metadata pool (to store some informations in the rados objects) without that PVC creation fails. |
Ok, the following seems to be working indeed
However, I have not tried letting cephcsi create the subvolumegroup, since that had already been done in my cluster with the If you think this is a clean and useful solution, maybe it's worth adding a few lines here (?) |
Following caps also work for us:
Update of the docs to make this clear would be great. |
@marco-venuti @fhufenreuter if you can contribute we are happy to review the changes. if not let us know anyone from @ceph/contributors can take this up/ |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions. |
good to get this documented, keeping it alive |
@fhufenreuter thanks, would add a bit more: ceph fs volume ls
FS_NAME=cephfs
ceph fs subvolumegroup ls $FS_NAME
SUB_VOL=csi
ceph fs subvolumegroup create $FS_NAME $SUB_VOL
USER=cephfs-csi
ceph auth get-or-create client.$USER mgr "allow rw" osd "allow rw tag cephfs metadata=$FS_NAME, allow rw tag cephfs data=$FS_NAME" mds "allow r fsname=$FS_NAME path=/volumes, allow rws fsname=$FS_NAME path=/volumes/$SUB_VOL" mon "allow r fsname=$FS_NAME" This setup will add |
Describe the bug
I have deployed ceph-csi with helm on a k3s cluster. I can succesfully provision volumes on cephfs using a user with the following capabilities, provided in the documentation
However, I'd like to restrict this user access to the single filesystem hosting the
pvc
s.I have tried restricting to the filesystem as per ceph's documentation
or to a single pool
but in both cases the provisioner fails. In particular, I can only see the following requests repeating on ceph's side (with
journalctl
)(whereas with sufficient permissions I also see the creation of subvolumegroup and subvolumes).
On kubernetes' side, I get the following logs
and
However, with the caps specified above, in all cases I can manually create subvolumegroups and subvolumes with
Environment details
3.4.0
5.10.0-9-amd64
kernel
k3s version v1.21.5+k3s2 (724ef700)
,go version go1.16.8
ceph version 15.2.15 octopus (stable)
deployed with cephadmThe text was updated successfully, but these errors were encountered: