Closed crltc closed 7 months ago
@crltc yes its not expected to set the volumeNamePrefix
for pre created volumes because it will be ignored, i don't have example for nomad but this is how the kubernetes static PVC's looks like https://github.com/ceph/ceph-csi/blob/devel/docs/static-pvc.md#cephfs-static-pvc
Thank you, with that info I was able to successfully provision the existing volume on Nomad. Included my config below for anyone else who may come across this. I also had to change adminID to userID (and still using admin credentials, not sure if required).
resource "nomad_csi_volume_registration" "example" {
external_id = "/volumes/csi/csi-vol-example-084f01c4-9a21-4b5a-a23d-5045e47cb6fz"
volume_id = "ceph-example"
name = "ceph-example"
plugin_id = "cephfs-csi"
context = {
clusterID = "090e7e3f-0b34-289q-9202-gh8z35g3db51"
fsName = "examplefs"
staticVolume = true
rootPath = "/volumes/csi/csi-vol-example-084f01c4-9a21-4b5a-a23d-5045e47cb6fz"
}
secrets = {
userID = "redacted"
userKey = "redacted"
}
capability {
access_mode = "multi-node-multi-writer"
attachment_mode = "file-system"
}
mount_options {
fs_type = "ext4"
}
}
Describe the bug
The volumeNamePrefix parameter is ignored when registering rbd and cephfs volumes. Note that this only occurs when registering existing volumes that have a prefix and works correctly when creating a new volume through ceph-csi.
Environment details
fuse
orkernel
. for rbd itskrbd
orrbd-nbd
) : rbd and kernelSteps to reproduce
Steps to reproduce the behavior:
Setup Details: I have a near identical setup to the example provided here: https://docs.ceph.com/en/latest/rbd/rbd-nomad/
Deployment: Create cephfs volume in cephfs with the name below:
Run nomad volume job with Terraform:
Actual results
Volume mount and registration fail
Expected behavior
The volume should mount and register successfully. When I create a different cephfs volume named
csi-vol-084f01c4-9a21-4b5a-a23d-5045e47cb6fz
without a non-standard volume prefix - it mounts and registers successfully.Logs