mgr/nfs: add cmount_path
Implementing necessary changes for the NFS module to align with the new export block format introduced in nfs-ganesha-V5.6.
The purpose of these changes is to enhance memory efficiency for exports. To achieve this goal, we have introduced a new field
called cmount_path under the FSAL block of export. Initially, this is applicable only to CephFS-based exports.
Furthermore, the newly created CephFS exports will now share the same user_id and secret_access_key, which are determined based
on the NFS cluster name and filesystem name. This results in each export on the same filesystem using a shared connection,
thereby optimizing resource usage.
Signed-off-by: avanthakkar <avanjohn@gmail.com>
mgr/nfs: fix a unit test failure
Signed-off-by: John Mulligan <jmulligan@redhat.com>
mgr/nfs: fix a unit test failure
Signed-off-by: John Mulligan <jmulligan@redhat.com>
mgr/nfs: fix a unit test failure
Signed-off-by: John Mulligan <jmulligan@redhat.com>
mgr/nfs: enable user management on a per-fs basis
Add back the ability to create a user for a cephfs export but do
it only for a cluster+filesystem combination. According to the
ganesha devs this ought to continue sharing a cephfs client connection
across multiple exports.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
mgr/nfs: add more unit tests with cmount_path
Add more unit tests for CEPHFS based NFS exports with
newly added cmount_path field under FSAL.
Signed-off-by: avanthakkar <avanjohn@gmail.com>
mgr/nfs: fix rgw nfs export when no existing exports
Signed-off-by: avanthakkar <avanjohn@gmail.com>
mgr/nfs: generate user_id & access_key for apply_export(CEPHFS)
Generate user_id & secret_access_key for CephFS based exports
for apply export. Also ensure the export FSAL block has
`cmount_path`.
Fixes: https://tracker.ceph.com/issues/63377
Signed-off-by: avanthakkar <avanjohn@gmail.com>
mgr/nfs: simplify validation, update f-strings, add generate_user_id function
- Improved validation to check cmount_path as a superset of path
- Replaced format method with f-strings
- Added generate_user_id function using SHA-1 hash
- Enhanced error handling and integrated new user_id generation
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit
9c70adf8080c053950e89b220195e3aa47991f86)