From: Sage Weil Date: Thu, 17 Jun 2021 21:12:15 +0000 (-0400) Subject: mgr/nfs: binding -> pseudo_path X-Git-Tag: v16.2.7~116^2~81 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e8262ba2e2d1c367082ae7eed1e3fd9c5517396b;p=ceph.git mgr/nfs: binding -> pseudo_path Signed-off-by: Sage Weil (cherry picked from commit 5a2382a5a85eeba80bdd7f6192d4bc7a4af094e5) --- diff --git a/doc/cephfs/fs-nfs-exports.rst b/doc/cephfs/fs-nfs-exports.rst index 043dacfcd4f..1766a237d13 100644 --- a/doc/cephfs/fs-nfs-exports.rst +++ b/doc/cephfs/fs-nfs-exports.rst @@ -210,7 +210,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 @@ -219,8 +219,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: @@ -236,13 +235,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 =================== @@ -262,14 +261,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 6f43c062048..3f15661269a 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 3e5ad1a2ecb..3d935218a95 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 09fb3c7684b..87f83380a1d 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 959f0297154..7039f5b2041 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')