Description of problem: ====================== While creating NFS Ganesha export via Dashboard, the "CephFS Path" and "Pseudo" path are autofilled. 1. The CephFS path should be immutable. If a user attempts to change the CephFS path to an invalid value, the export creation still succeeds, although it should ideally fail due to the invalid path. Scenario - ========== If the user edit the default "CephFS Path" to someother value - Original Path - /volumes/nfssubvolgroup/nfsvol/283b30d1-9efe-4d97-beb8-63ae1d17a34b Overwritten the Path - /volumes/nfssubvolgroup/nfsvol/283b30d1-9efe-4d97-beb8-63ae1d17a3 The export creation is still successful and mount fail on client since the path mentioned is incorrect # ceph nfs export info nfsganesha /cephfs/volumes/nfssubvolgroup/nfsvol/283b30d1-9efe-4d97-beb8-63ae1d17a3 { "access_type": "RW", "clients": [], "cluster_id": "nfsganesha", "export_id": 2, "fsal": { "fs_name": "cephfsnfs", "name": "CEPH", "user_id": "nfs.nfsganesha.2" }, "path": "/volumes/nfssubvolgroup/nfsvol/283b30d1-9efe-4d97-beb8-63ae1d17a3", "protocols": [ 3, 4 ], "pseudo": "/cephfs/volumes/nfssubvolgroup/nfsvol/283b30d1-9efe-4d97-beb8-63ae1d17a3", "security_label": false, "squash": "no_root_squash", "transports": [ "TCP", "UDP" ] } In actual, if same is tried with cephadm cli, it fails # ceph nfs export create cephfs nfsganesha /export_demo cephfs --path=/volumes/nfssubvolgroup/nfsvol/283b30d1-9efe-4d97-beb8-63ae1d17a3 [ceph: root@ceph-auto-cluster-pd1jue-node1-installer /]# ceph nfs export create cephfs nfsganesha /export_demo cephfsnfs --path=/volumes/nfssubvolgroup/nfsvol/283b30d1-9efe-4d97-beb8-63ae1d17a3 Error ENOENT: path /volumes/nfssubvolgroup/nfsvol/283b30d1-9efe-4d97-beb8-63ae1d17a3 does not exist [ceph: root@ceph-auto-cluster-pd1jue-node1-installer /]# ceph nfs export create cephfs nfsganesha /export_demo cephfsnfs --path=/volumes/nfssubvolgroup/nfsvol/283b30d1-9efe-4d97-beb8-63ae1d17a34b { "bind": "/export_demo", "cluster": "nfsganesha", "fs": "cephfsnfs", "mode": "RW", "path": "/volumes/nfssubvolgroup/nfsvol/283b30d1-9efe-4d97-beb8-63ae1d17a34b" } # ceph nfs export info nfsganesha /export_demo { "access_type": "RW", "clients": [], "cluster_id": "nfsganesha", "export_id": 3, "fsal": { "fs_name": "cephfsnfs", "name": "CEPH", "user_id": "nfs.nfsganesha.3" }, "path": "/volumes/nfssubvolgroup/nfsvol/283b30d1-9efe-4d97-beb8-63ae1d17a34b", "protocols": [ 4 ], "pseudo": "/export_demo", "security_label": true, "squash": "none", "transports": [ "TCP" ] } 2. Pseudo Path: This field should be left blank for the user to input a name. Currently, it automatically uses the same Pseudo name as the CephFS Path. (i) If the user attempts to create an export on the same CephFS subvolume from which an export was previously created, the same Pseudo name is autofilled by default, causing the export creation to fail. To successfully create a new export on the same CephFS subvolume, the user must provide a different Pseudo name. (ii) The Pseudo Name is used for mounting the export on the client. Using a complex name can make it difficult for the user to differentiate between multiple exports. Version-Release number of selected component (if applicable): ============================================================= # ceph --version ceph version 19.1.0-15.el9cp (f552c890eaaac66497a15d2c04b4fc4cab52f209) squid (rc) How reproducible: ================ 1/1 Steps to Reproduce: 1. On Dashboard, create cephfs filesystem, subvolume group and subvolume 2. On File --> NFS Page, try creating the export twice using the same subvolume Actual results: ============== 1. Export creation still pass if the incorrect CephFS path is given while creating export 2. Pseudo Name is autofilled. As a result, when user try creating another export using same subvolume, export creation will fail with same Pseudo name. User will have to delete the autofill entry and give a unique name. Expected results: ================ 1. CephFS path validation should be implemented in the Dashboard, or the path should be made uneditable. 2. The Pseudo Name should not be autofilled. Instead, the user should see a blank space in the field, as was the case in previous releases. Additional info:
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Red Hat Ceph Storage 8.0 security, bug fix, and enhancement updates), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2024:10216