Skip to content

[manila-csi-plugin] CephFS mount options from share metadata are not used #2986

@nfroger

Description

@nfroger

/kind bug

What happened: When a Manila share type is configured on a different CephFS filesystem than the default one, Manila adds a __mount_options key in share metadata to specify the fs mount option to use. Manila CSI plugin ignores this and calls CephFS CSI without specifying a fsName, resulting in CephFS CSI's Node server to attempt mounting the share on the default CephFS filesystem.

This can be seen in the documentation of Manila : https://docs.openstack.org/manila/latest/configuration/shared-file-systems/drivers/cephfs_driver.html#configure-cephfs-native-share-backend-in-manila-conf

For Native CephFS shares, the backing cephfs_filesystem_name is visible to end users through the __mount_options metadata. Make sure to add the __mount_options metadata key to the list of admin only modifiable metadata keys (admin_only_metadata), as explained in the additional configuration options page.

What you expected to happen: The Manila CSI Plugin should read the __mount_options of CephFS shares and use the fs mount option provided by Manila.

How to reproduce it: Create two CephFS filesystems (see the Ceph documentation). Configure one of Manila's driver on the secondary CephFS. Try to provision a PVC with this share type with Manila CSI Plugin and mount it in a pod. The PVC will be be provisioned successfully by Manila but mounting will fail with the following error: mount error 2 = No such file or directory.

Anything else we need to know?:

I have implemented my own fix in nfroger@40d9dc7 and ran it in a test environment, it works well. It is probably quite dirty so let me know how you would prefer it if you want me to write a better patch.

Environment:

  • openstack-cloud-controller-manager(or other related binary) version: 1.33.1
  • OpenStack version: 2025.1 Epoxy
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions