]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/nfs: add --squash option to 'nfs export create rgw ...'
authorSage Weil <sage@newdream.net>
Mon, 19 Jul 2021 17:47:12 +0000 (13:47 -0400)
committerSage Weil <sage@newdream.net>
Mon, 26 Jul 2021 20:23:17 +0000 (16:23 -0400)
The cephfs variant already has it.

Signed-off-by: Sage Weil <sage@newdream.net>
doc/mgr/nfs.rst
src/pybind/mgr/nfs/module.py

index 27a29ea781a21033abcb1227ce9c792b2ea5cd68..14e0cfc89ac3aa742ef6f3164d28265aed23f5c3 100644 (file)
@@ -197,7 +197,7 @@ To export a bucket
 
 .. code::
 
-   $ ceph nfs export create rgw <bucket_name> <cluster_id> <pseudo_path> [--readonly] [--client_addr <value>...] [--realm <value>]
+   $ ceph nfs export create rgw <bucket_name> <cluster_id> <pseudo_path> [--readonly] [--client_addr <value>...] [--squash <value>]
 
 For example, to export *mybucket* via NFS cluster *mynfs* at the pseudo-path */bucketdata* to any host in the ``192.168.10.0/24`` network
 
@@ -207,6 +207,23 @@ For example, to export *mybucket* via NFS cluster *mynfs* at the pseudo-path */b
 
 .. note:: Export creation is supported only for NFS Ganesha clusters deployed using nfs interface.
 
+``<bucket_name>`` is the name of the bucket that will be exported.
+
+.. note:: Currently, if multi-site RGW is enabled, Ceph can only export RGW buckets in the default realm.
+
+``<cluster_id>`` is the NFS Ganesha cluster ID.
+
+``<pseudo_path>`` is the export position within the NFS v4 Pseudo Filesystem where the export will be available on the server. It must be an absolute path and unique.
+
+``<client_addr>`` is the list of client address for which these export
+permissions will be applicable. By default all clients can access the export
+according to specified export permissions. See the `NFS-Ganesha Export Sample`_
+for permissible values.
+
+``<squash>`` defines the kind of user id squashing to be performed. The default
+value is `no_root_squash`. See the `NFS-Ganesha Export Sample`_ for
+permissible values.
+
 Delete Export
 -------------
 
index 157ff046fab7c28f6baac9486235930f48144523..04ce5e80925f87a7cfe1a5cb417a5f0eb5c39ab5 100644 (file)
@@ -50,12 +50,13 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
             readonly: Optional[bool] = False,
             client_addr: Optional[List[str]] = None,
             realm: Optional[str] = None,
+            squash: str = 'none',
     ) -> Tuple[int, str, str]:
         """Create an RGW export"""
         return self.export_mgr.create_export(fsal_type='rgw', bucket=bucket,
                                              realm=realm,
                                              cluster_id=cluster_id, pseudo_path=pseudo_path,
-                                             read_only=readonly, squash='none',
+                                             read_only=readonly, squash=squash,
                                              addr=client_addr)
 
     @CLICommand('nfs export rm', perm='rw')