From: Sage Weil Date: Fri, 18 Jun 2021 15:01:32 +0000 (-0400) Subject: mgr/nfs: 'nfs export get' -> 'nfs export info' X-Git-Tag: v16.2.7~116^2~80 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=92a18b7f93a9cb8db1181b33005c2277d6fc8811;p=ceph.git mgr/nfs: 'nfs export get' -> 'nfs export info' This is a breaking change, but aligns the CLI verbs with the rest of ceph. Signed-off-by: Sage Weil (cherry picked from commit 2400937ce25289f5a8e003244f8a14654735d0c2) --- diff --git a/doc/cephfs/fs-nfs-exports.rst b/doc/cephfs/fs-nfs-exports.rst index 1766a237d13..31ae38c02fe 100644 --- a/doc/cephfs/fs-nfs-exports.rst +++ b/doc/cephfs/fs-nfs-exports.rst @@ -261,7 +261,7 @@ Get CephFS Export .. code:: bash - $ ceph nfs export get + $ ceph nfs export info This displays export block for a cluster based on pseudo root name, where: @@ -278,7 +278,7 @@ An existing export can be dumped in JSON format with: .. prompt:: bash # - ceph nfs export get ** + ceph nfs export info ** An export can be created or modified by importing a JSON description in the same format: @@ -289,12 +289,12 @@ same format: For example,:: - $ ceph nfs export get vstart /cephfs > update_cephfs_export.json + $ ceph nfs export info mynfs /cephfs > update_cephfs_export.json $ cat update_cephfs_export.json { "export_id": 1, "path": "/", - "cluster_id": "vstart", + "cluster_id": "mynfs", "pseudo": "/cephfs", "access_type": "RW", "squash": "no_root_squash", @@ -307,7 +307,7 @@ For example,:: ], "fsal": { "name": "CEPH", - "user_id": "vstart1", + "user_id": "nfs.mynfs.1", "fs_name": "a", "sec_label_xattr": "" }, @@ -322,7 +322,7 @@ and *access_type* are modified:: { "export_id": 1, "path": "/", - "cluster_id": "vstart", + "cluster_id": "mynfs", "pseudo": "/cephfs_testing", "access_type": "RO", "squash": "no_root_squash", @@ -335,7 +335,7 @@ and *access_type* are modified:: ], "fsal": { "name": "CEPH", - "user_id": "vstart1", + "user_id": "nfs.mynfs.1", "fs_name": "a", "sec_label_xattr": "" }, @@ -343,29 +343,6 @@ and *access_type* are modified:: } -Configuring NFS Ganesha to export CephFS with vstart -==================================================== - -1) Using ``cephadm`` - - .. code:: bash - - $ MDS=1 MON=1 OSD=3 NFS=1 ../src/vstart.sh -n -d --cephadm - - This will deploy a single NFS Ganesha daemon using ``vstart.sh``, where - the daemon will listen on the default NFS Ganesha port. - -2) Using test orchestrator - - .. code:: bash - - $ MDS=1 MON=1 OSD=3 NFS=1 ../src/vstart.sh -n -d - - Environment variable ``NFS`` is the number of NFS Ganesha daemons to be - deployed, each listening on a random port. - - .. note:: NFS Ganesha packages must be pre-installed for this to work. - Mount ===== diff --git a/doc/dev/vstart-ganesha.rst b/doc/dev/vstart-ganesha.rst new file mode 100644 index 00000000000..1b07ada86c1 --- /dev/null +++ b/doc/dev/vstart-ganesha.rst @@ -0,0 +1,23 @@ +Configuring NFS Ganesha to export CephFS with vstart +==================================================== + +1) Using ``cephadm`` + + .. code:: bash + + $ MDS=1 MON=1 OSD=3 NFS=1 ../src/vstart.sh -n -d --cephadm + + This will deploy a single NFS Ganesha daemon using ``vstart.sh``, where + the daemon will listen on the default NFS Ganesha port. + +2) Using test orchestrator + + .. code:: bash + + $ MDS=1 MON=1 OSD=3 NFS=1 ../src/vstart.sh -n -d + + Environment variable ``NFS`` is the number of NFS Ganesha daemons to be + deployed, each listening on a random port. + + .. note:: NFS Ganesha packages must be pre-installed for this to work. + diff --git a/qa/tasks/cephfs/test_nfs.py b/qa/tasks/cephfs/test_nfs.py index eaa8c820e0a..ee4ecb25618 100644 --- a/qa/tasks/cephfs/test_nfs.py +++ b/qa/tasks/cephfs/test_nfs.py @@ -220,7 +220,7 @@ class TestNFS(MgrTestCase): ''' Returns export block in json format ''' - return json.loads(self._nfs_cmd('export', 'get', self.cluster_id, self.pseudo_path)) + return json.loads(self._nfs_cmd('export', 'info', self.cluster_id, self.pseudo_path)) def _test_get_export(self): ''' @@ -621,6 +621,6 @@ class TestNFS(MgrTestCase): exec_cmd_invalid('export', 'ls') exec_cmd_invalid('export', 'delete') exec_cmd_invalid('export', 'delete', 'clusterid') - exec_cmd_invalid('export', 'get') - exec_cmd_invalid('export', 'get', 'clusterid') + exec_cmd_invalid('export', 'info') + exec_cmd_invalid('export', 'info', 'clusterid') exec_cmd_invalid('export', 'update') diff --git a/src/pybind/mgr/nfs/module.py b/src/pybind/mgr/nfs/module.py index 7039f5b2041..a5e0c8cbdd3 100644 --- a/src/pybind/mgr/nfs/module.py +++ b/src/pybind/mgr/nfs/module.py @@ -73,8 +73,8 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule): """List exports of a NFS cluster""" 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, pseudo_path: str) -> Tuple[int, str, str]: + @CLICommand('nfs export info', perm='r') + def _cmd_nfs_export_info(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=pseudo_path)