Skip to content

cephfs static pv doesn't support params encrypted encryptionKMSID for fscrypt,err:Failed as pool not found #6209

@Tangxiaolianget

Description

@Tangxiaolianget

Describe the bug

My intention is to encrypt each subvolume with a separate passphrase,
and provision a dedicated static PV for each corresponding subvolume.

but if I add the encrypted and encryptionKMSID parameters, this error message will appear.

 Warning  FailedMount             1s (x3 over 3s)   kubelet                  MountVolume.MountDevice failed for volume "static-cephfs-pv-2026" : rpc error: code = Internal desc = Failed as pool not found (internal rados: ret=-2, No such file or directory) 

A clear and concise description of what the bug is.

Environment details

rke2 version: v1.34.5+rke2r1
cephfscsi : v3.16.2
os : Ubuntu 22.04.5 LTS
host kernel 6.8.0-106-generic
ceph version: 19.2.3 (c92aebb279828e9c3c1f5d24613efca272649e62) squid (stable)

Steps to reproduce

kind: PersistentVolume
metadata:
  name: static-cephfs-pv-2026
spec:
  accessModes:
  - ReadWriteMany
  capacity:
    storage: 1Gi
  csi:
    driver: cephfs.csi.ceph.com
    nodeStageSecretRef:
      name: ceph-mount-secret
      namespace: default
    volumeAttributes:
      "fsName": "contekray"
      "subvolumeGroup": "csi"
      "subvolumeName": "dontest"
      "rootPath": "/volumes/csi/dontest/cfb5a1fc-ecc8-4707-b627-36717b54b1d0"
      "clusterID": "0cc27686-e775-11ee-9484-0907b4b07245"
      "staticVolume": "true"
      "encrypted": "true"
      "encryptionKMSID": "test-secret"
    volumeHandle: dontest-encrypt-handler
  persistentVolumeReclaimPolicy: Retain
  volumeMode: Filesystem
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: ceph-share-pvc
  namespace: default
spec:
  accessModes:
  - ReadWriteMany
  storageClassName: ""
  resources:
    requests:
      storage: 1Gi
  volumeName: static-cephfs-pv-2026
  volumeMode: Filesystem
---
apiVersion: v1
kind: Pod
metadata:
  name: testpod
  namespace: default
spec:
  containers:
  - name: testpodx
    image: ubuntu
    command:
    - sleep
    - "3600"
    volumeMounts:
    - name: ceph-share-pvc
      mountPath: /pvc
    resources:
      limits:
        cpu: "200m"
        memory: "2Gi"
  volumes:
  - name: ceph-share-pvc
    persistentVolumeClaim:
      claimName: ceph-share-pvc```


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions