Description of problem: You can update a CephFS NFS export using `ceph nfs export apply` CLI. But this always restarts the NFS Ganesha servers, and temporarily affects all the NFS clients served by the NFS servers. Many of the export field updates do not need the NFS servers to be restarted. These exports updates can be dynamic. The mgr/nfs module's apply_export() needs to be modified to allow dynamic updates of CephFS NFS exports. Use case: OpenStack Manila's CephFS NFS driver currently allows dynamic client access updates of manila shares (CephFS NFS exports). It wants to use the `ceph nfs export` interfaces to manage the exports and expects the exports' client access updates to be dynamic.
Please specify the severity of this bug. Severity is defined here: https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.
The feature was merged in master and pacific (should be available in 16.2.8). Quincy backport is pending. You can see the following tracker ticker for more details, https://tracker.ceph.com/issues/54025 https://tracker.ceph.com/issues/54987
Steps to test: - create a NFS cluster using cephadm # ceph nfs cluster create nfs-ganesha - create a CephFS subvolume # ceph fs volume create a # ceph fs subvolume create a subvol00 # ceph fs subvolume getpath a subvol00 /volumes/_nogroup/subvol00/ce8c002b-5f6e-4db5-8189-7bec6aceb39f - create a read-write NFS export for the subvolume path # ceph nfs export create cephfs nfs-ganesha /cephfs a /volumes/_nogroup/subvol00/ce8c002b-5f6e-4db5-8189-7bec6aceb39f - mount export # mount.nfs4 192.168.0.14:/cephfs /mnt/nfs/ where 192.168.0.14 is the ganesha server IP and /cephfs is pseudo path of export - from the mount point perform writes - note the PID of NFS server - update NFS export's access type from read-write to read-only # ceph nfs export get nfs-ganesha /cephfs > export1.conf # sed -i 's/RW/RO/g' export1.conf # ceph nfs export apply nfs-ganesha -i export1.conf - try writing from NFS mountpoint. It'll say it's a read-only file system - check the PID of NFS server. It shouldn't have changed. This confirms that the NFS server was not restarted when the NFS export was reloaded.
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 (Moderate: Red Hat Ceph Storage Security, Bug Fix, and Enhancement Update), 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/RHSA-2022:5997