]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/nfs: allow dynamic update of cephfs nfs export
authorRamana Raja <rraja@redhat.com>
Tue, 25 Jan 2022 01:06:11 +0000 (20:06 -0500)
committerAdam King <adking@redhat.com>
Sat, 21 May 2022 22:58:26 +0000 (18:58 -0400)
commit4569336be67f1dd171550509bdfadd3f51caea94
tree8c1bc3c8b11a8a64714054af93375f8acc5281f6
parentf012d628e72f09b112d1bc32bc1fc918213d5e3d
mgr/nfs: allow dynamic update of cephfs nfs export

mgr/nfs module's apply_export() method is used to update an existing
CephFS NFS export. The method always restarted the ganesha service (
ganesha server cluster) after updating the export object and notifying
the ganesha servers to reload their exports. The restart temporarily
affected the clients connections of all the exports served by the
ganesha servers.

It is not always necessary to restart the ganesha servers. Only
updating the export ID, path, or FSAL block of a CephFS NFS export
requires a restart. So modify apply_export() to only restart the
ganesha servers for such export updates.

The mgr/nfs module creates a FSAL ceph user with read-only or
read-write path restricted MDS caps for each export. To change the
access type of the CephFS NFS export, the MDS caps of the export's FSAL
ceph user must also be changed. Ganesha can dynamically enforce an
export's access type changes, but Ceph server daemons can't dynamically
enforce changes in caps of the Ceph clients. To allow dynamic updates
of CephFS NFS exports, always create a FSAL Ceph user with read-write
path restricted MDS caps per export. Rely on the ganesha servers to
enforce the export access type changes for the NFS clients.

Fixes: https://tracker.ceph.com/issues/54025
Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit 2415e03217b4afe9e430863da0b4503be254c425)
src/pybind/mgr/nfs/export.py