From 5a2382a5a85eeba80bdd7f6192d4bc7a4af094e5 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 17 Jun 2021 17:12:15 -0400 Subject: [PATCH] mgr/nfs: binding -> pseudo_path Signed-off-by: Sage Weil --- doc/cephfs/fs-nfs-exports.rst | 15 +++++++------- doc/radosgw/nfs.rst | 4 ++-- .../2-services/nfs-ingress.yaml | 2 +- .../2-services/nfs-ingress2.yaml | 2 +- src/pybind/mgr/nfs/module.py | 20 +++++++++---------- 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/doc/cephfs/fs-nfs-exports.rst b/doc/cephfs/fs-nfs-exports.rst index 6d08323bccd82..a152be661ab6a 100644 --- a/doc/cephfs/fs-nfs-exports.rst +++ b/doc/cephfs/fs-nfs-exports.rst @@ -211,7 +211,7 @@ Create CephFS Export .. code:: bash - $ ceph nfs export create cephfs [--readonly] [--path=/path/in/cephfs] + $ ceph nfs export create cephfs [--readonly] [--path=/path/in/cephfs] This creates export RADOS objects containing the export block, where @@ -220,8 +220,7 @@ that will serve this export. ```` is the NFS Ganesha cluster ID. -```` is the pseudo root path (must be an absolute path and unique). -It specifies the export position within the NFS v4 Pseudo Filesystem. +```` 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. ```` is the path within cephfs. Valid path should be given and default path is '/'. It need not be unique. Subvolume path can be fetched using: @@ -237,13 +236,13 @@ Delete CephFS Export .. code:: bash - $ ceph nfs export rm + $ ceph nfs export rm This deletes an export in an NFS Ganesha cluster, where: ```` is the NFS Ganesha cluster ID. -```` is the pseudo root path (must be an absolute path). +```` is the pseudo root path (must be an absolute path). List CephFS Exports =================== @@ -263,14 +262,14 @@ Get CephFS Export .. code:: bash - $ ceph nfs export get + $ ceph nfs export get -This displays export block for a cluster based on pseudo root name (binding), +This displays export block for a cluster based on pseudo root name, where: ```` is the NFS Ganesha cluster ID. -```` is the pseudo root path (must be an absolute path). +```` is the pseudo root path (must be an absolute path). Create or update CephFS Export via JSON specification diff --git a/doc/radosgw/nfs.rst b/doc/radosgw/nfs.rst index 538ac1da4c63b..9be7572686fb8 100644 --- a/doc/radosgw/nfs.rst +++ b/doc/radosgw/nfs.rst @@ -109,7 +109,7 @@ To export a bucket, .. prompt:: bash # - ceph nfs export create rgw ** ** ** [--readonly] [--addr ** + ceph nfs export create rgw ** ** ** [--readonly] [--addr ** 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, @@ -133,7 +133,7 @@ To disable an existing export, .. prompt:: bash # - ceph nfs export rm ** ** + ceph nfs export rm ** ** For example, to disable an export from cluster *mynfs* on ``/my-export``, diff --git a/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-ingress.yaml b/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-ingress.yaml index 3e5ad1a2ecbdb..3d935218a95e4 100644 --- a/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-ingress.yaml +++ b/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-ingress.yaml @@ -40,7 +40,7 @@ tasks: - cephadm.shell: host.a: - - ceph nfs export create cephfs foofs foo --binding /fake + - ceph nfs export create cephfs foofs foo --pseudo-path /fake - vip.exec: host.a: diff --git a/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-ingress2.yaml b/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-ingress2.yaml index 09fb3c7684bf4..87f83380a1d6a 100644 --- a/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-ingress2.yaml +++ b/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-ingress2.yaml @@ -15,7 +15,7 @@ tasks: host.a: - ceph fs volume create foofs - ceph nfs cluster create foo --ingress --virtual-ip {{VIP0}}/{{VIPPREFIXLEN}} - - ceph nfs export create cephfs foofs foo --binding /fake + - ceph nfs export create cephfs foofs foo --pseudo-path /fake - cephadm.wait_for_service: service: nfs.foo diff --git a/src/pybind/mgr/nfs/module.py b/src/pybind/mgr/nfs/module.py index 959f0297154d7..7039f5b2041cc 100644 --- a/src/pybind/mgr/nfs/module.py +++ b/src/pybind/mgr/nfs/module.py @@ -29,7 +29,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule): self, fsname: str, cluster_id: str, - binding: str, + pseudo_path: str, path: Optional[str] = '/', readonly: Optional[bool] = False, addr: Optional[List[str]] = None, @@ -37,7 +37,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule): ) -> Tuple[int, str, str]: """Create a cephfs export""" return self.export_mgr.create_export(fsal_type='cephfs', fs_name=fsname, - cluster_id=cluster_id, pseudo_path=binding, + cluster_id=cluster_id, pseudo_path=pseudo_path, read_only=readonly, path=path, squash=squash, addr=addr) @@ -46,7 +46,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule): self, bucket: str, cluster_id: str, - binding: str, + pseudo_path: str, readonly: Optional[bool] = False, addr: Optional[List[str]] = None, realm: Optional[str] = None, @@ -54,19 +54,19 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule): """Create an RGW export""" return self.export_mgr.create_export(fsal_type='rgw', bucket=bucket, realm=realm, - cluster_id=cluster_id, pseudo_path=binding, + cluster_id=cluster_id, pseudo_path=pseudo_path, read_only=readonly, squash='none', addr=addr) @CLICommand('nfs export rm', perm='rw') - def _cmd_nfs_export_rm(self, cluster_id: str, binding: str) -> Tuple[int, str, str]: + def _cmd_nfs_export_rm(self, cluster_id: str, pseudo_path: str) -> Tuple[int, str, str]: """Remove a cephfs export""" - return self.export_mgr.delete_export(cluster_id=cluster_id, pseudo_path=binding) + return self.export_mgr.delete_export(cluster_id=cluster_id, pseudo_path=pseudo_path) @CLICommand('nfs export delete', perm='rw') - def _cmd_nfs_export_delete(self, cluster_id: str, binding: str) -> Tuple[int, str, str]: + def _cmd_nfs_export_delete(self, cluster_id: str, pseudo_path: str) -> Tuple[int, str, str]: """Delete a cephfs export (DEPRECATED)""" - return self.export_mgr.delete_export(cluster_id=cluster_id, pseudo_path=binding) + return self.export_mgr.delete_export(cluster_id=cluster_id, pseudo_path=pseudo_path) @CLICommand('nfs export ls', perm='r') def _cmd_nfs_export_ls(self, cluster_id: str, detailed: bool = False) -> Tuple[int, str, str]: @@ -74,9 +74,9 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule): return self.export_mgr.list_exports(cluster_id=cluster_id, detailed=detailed) @CLICommand('nfs export get', perm='r') - def _cmd_nfs_export_get(self, cluster_id: str, binding: str) -> Tuple[int, str, str]: + def _cmd_nfs_export_get(self, cluster_id: str, pseudo_path: str) -> Tuple[int, str, str]: """Fetch a export of a NFS cluster given the pseudo path/binding""" - return self.export_mgr.get_export(cluster_id=cluster_id, pseudo_path=binding) + return self.export_mgr.get_export(cluster_id=cluster_id, pseudo_path=pseudo_path) @CLICommand('nfs export apply', perm='rw') @CLICheckNonemptyFileInput(desc='Export JSON specification') -- 2.39.5