Skip to content

Commit b895e59

Browse files
committed
doc: nit fixes for nfs doc
Signed-off-by: Avan Thakkar <[email protected]> Fixes some doc lint and also fixed qa tests for having both 3 & 4 protocols by default in expot config.
1 parent b8f3db5 commit b895e59

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

PendingReleaseNotes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ CephFS: Disallow delegating preallocated inode ranges to clients. Config
261261
* RBD: The output of `rbd snap ls --all` command now includes the original
262262
type for trashed snapshots.
263263

264-
* NFS: The export create/apply of CephFS based exports will now have a additional parameter `cmount_path` under FSAL block,
264+
* NFS: The export create/apply of CephFS based exports will now have a additional parameter `cmount_path` under the FSAL block,
265265
which specifies the path within the CephFS to mount this export on. If this and the other
266266
`EXPORT { FSAL {} }` options are the same between multiple exports, those exports will share a single CephFS client. If not specified, the default is `/`.
267267

doc/mgr/nfs.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,11 @@ values may be separated by a comma (example: ``--sectype krb5p,krb5i``). The
318318
server will negotatiate a supported security type with the client preferring
319319
the supplied methods left-to-right.
320320

321-
``<cmount_path>`` specifies the path within the ceph filesystem to mount this export on. It is
321+
``<cmount_path>`` specifies the path within the CephFS to mount this export on. It is
322322
allowed to be any complete path hierarchy between ``/`` and the ``EXPORT {path}``. (i.e. if ``EXPORT { Path }`` parameter is ``/foo/bar`` then cmount_path could be ``/``, ``/foo`` or ``/foo/bar``).
323-
!! If this and the other ``EXPORT { FSAL {} }`` options are the same between multiple exports, those exports will share a single cephfs client.
324-
If not specified, the default is ``/``.
323+
324+
.. note:: If this and the other ``EXPORT { FSAL {} }`` options are the same between multiple exports, those exports will share a single CephFS client.
325+
If not specified, the default is ``/``.
325326

326327
.. note:: Specifying values for sectype that require Kerberos will only function on servers
327328
that are configured to support Kerberos. Setting up NFS-Ganesha to support Kerberos
@@ -498,7 +499,8 @@ provided JSON should fully describe the new state of the export (just
498499
as when creating a new export), with the exception of the
499500
authentication credentials, which will be carried over from the
500501
previous state of the export where possible.
501-
The ``user_id`` in the ``fsal`` block should not be modified or mentioned in the JSON file as it is auto-generated for CephFS exports.
502+
503+
!! NOTE: The ``user_id`` in the ``fsal`` block should not be modified or mentioned in the JSON file as it is auto-generated for CephFS exports.
502504
It's auto-generated in the format ``nfs.<cluster_id>.<fs_name>.<hash_id>``.
503505

504506
::

qa/tasks/cephfs/test_nfs.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,12 @@ def _create_default_export(self):
235235
self._test_create_cluster()
236236
self._create_export(export_id='1', create_fs=True)
237237

238-
def _delete_export(self, pseduo_path=None):
238+
def _delete_export(self, pseduo_path=None, check_in=False, user_id=None):
239239
'''
240240
Delete an export.
241241
'''
242242
self._nfs_cmd('export', 'rm', self.cluster_id, pseduo_path if pseduo_path else self.pseudo_path)
243-
self._check_auth_ls(self.fs_name)
243+
self._check_auth_ls(self.fs_name, check_in, user_id)
244244

245245
def _test_list_export(self):
246246
'''
@@ -1222,8 +1222,10 @@ def test_nfs_export_creation_without_cmount_path(self):
12221222
"""
12231223
Test that ensure cmount_path is present in FSAL block
12241224
"""
1225+
self._create_cluster_with_fs(self.fs_name)
1226+
12251227
pseudo_path = '/test_without_cmount'
1226-
self._create_export(export_id='1234',
1228+
self._create_export(export_id='1',
12271229
extra_cmd=['--pseudo-path', pseudo_path])
12281230
nfs_output = self._get_export(pseudo_path)
12291231
self.assertIn('cmount_path', nfs_output['fsal'])
@@ -1234,6 +1236,8 @@ def test_nfs_exports_with_same_and_diff_user_id(self):
12341236
"""
12351237
Test that exports with same FSAL share same user_id
12361238
"""
1239+
self._create_cluster_with_fs(self.fs_name)
1240+
12371241
pseudo_path_1 = '/test1'
12381242
pseudo_path_2 = '/test2'
12391243
pseudo_path_3 = '/test3'
@@ -1245,10 +1249,10 @@ def test_nfs_exports_with_same_and_diff_user_id(self):
12451249
fs_path_1 = self._cmd('fs', 'subvolume', 'getpath', self.fs_name, 'sub_vol_1').strip()
12461250
fs_path_2 = self._cmd('fs', 'subvolume', 'getpath', self.fs_name, 'sub_vol_2').strip()
12471251
# Both exports should have same user_id(since cmount_path=/ & fs_name is same)
1248-
self._create_export(export_id='21',
1252+
self._create_export(export_id='1',
12491253
extra_cmd=['--pseudo-path', pseudo_path_1,
12501254
'--path', fs_path_1])
1251-
self._create_export(export_id='22',
1255+
self._create_export(export_id='2',
12521256
extra_cmd=['--pseudo-path', pseudo_path_2,
12531257
'--path', fs_path_2])
12541258

@@ -1259,7 +1263,7 @@ def test_nfs_exports_with_same_and_diff_user_id(self):
12591263
self.assertEqual(nfs_output_1['fsal']['user_id'], 'nfs.test.nfs-cephfs.3746f603')
12601264

12611265
cmount_path = '/volumes'
1262-
self._create_export(export_id='23',
1266+
self._create_export(export_id='3',
12631267
extra_cmd=['--pseudo-path', pseudo_path_3,
12641268
'--path', fs_path_1,
12651269
'--cmount-path', cmount_path])
@@ -1268,13 +1272,10 @@ def test_nfs_exports_with_same_and_diff_user_id(self):
12681272
self.assertNotEqual(nfs_output_3['fsal']['user_id'], nfs_output_1['fsal']['user_id'])
12691273
self.assertEqual(nfs_output_3['fsal']['user_id'], 'nfs.test.nfs-cephfs.32cd8545')
12701274

1271-
self._delete_export(pseudo_path_1)
12721275
# Deleting export with same user_id should not delete the user_id
1273-
self._check_auth_ls(self.fs_name, True, nfs_output_2['fsal']['user_id'])
1274-
self._delete_export(pseudo_path_2)
1276+
self._delete_export(pseudo_path_1, True, nfs_output_1['fsal']['user_id'])
12751277
# Deleting export 22 should delete the user_id since it's only export left with that user_id
1276-
self._check_auth_ls(self.fs_name, False, nfs_output_2['fsal']['user_id'])
1278+
self._delete_export(pseudo_path_2, False, nfs_output_2['fsal']['user_id'])
12771279

1278-
self._delete_export(pseudo_path_3)
12791280
# Deleting export 23 should delete the user_id since it's only export with that user_id
1280-
self._check_auth_ls(self.fs_name, False, nfs_output_3['fsal']['user_id'])
1281+
self._delete_export(pseudo_path_3, False, nfs_output_3['fsal']['user_id'])

0 commit comments

Comments
 (0)