Bug 2049272 - mgr/nfs: allow dynamic updates of CephFS NFS exports
Summary: mgr/nfs: allow dynamic updates of CephFS NFS exports
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Ceph-Mgr Plugins
Version: 5.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 5.2
Assignee: Ram Raja
QA Contact: Hemanth Kumar
URL:
Whiteboard:
Depends On:
Blocks: 1961115 2071977 2102272
TreeView+ depends on / blocked
 
Reported: 2022-02-01 20:06 UTC by Ram Raja
Modified: 2022-08-09 17:38 UTC (History)
9 users (show)

Fixed In Version: ceph-16.2.8-2.el8cp
Doc Type: Enhancement
Doc Text:
.CephFS NFS export can be dynamically updated using the `ceph nfs export apply` command Previously, when updating a CephFS NFS export, the NFS-Ganesha servers were always restarted. This temporarily affected all the client connections served by the ganesha servers including those exports that were not updated. With this release, a CephFS NFS export can now be dynamically updated using the `ceph nfs export apply` command. The NFS servers are no longer restarted every time a CephFS NFS export is updated.
Clone Of:
Environment:
Last Closed: 2022-08-09 17:37:27 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Ceph Project Bug Tracker 54025 0 None None None 2022-02-01 20:06:02 UTC
Red Hat Issue Tracker RHCEPH-3089 0 None None None 2022-02-01 20:09:07 UTC
Red Hat Product Errata RHSA-2022:5997 0 None None None 2022-08-09 17:38:03 UTC

Description Ram Raja 2022-02-01 20:06:02 UTC
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.

Comment 1 RHEL Program Management 2022-02-01 20:06:08 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 4 Ram Raja 2022-03-29 16:46:10 UTC
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

Comment 9 Ram Raja 2022-06-16 22:10:24 UTC
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.

Comment 17 errata-xmlrpc 2022-08-09 17:37:27 UTC
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


Note You need to log in before you can comment on or make changes to this bug.