From 9467f1e89e628e36cc751b1cdaafea79cb3102d4 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 20 Oct 2021 15:35:49 -0400 Subject: [PATCH] mgr/nfs: document and use keyword args for 'nfs export create cephfs' Signed-off-by: Sage Weil --- doc/mgr/nfs.rst | 8 ++++---- qa/suites/orch/cephadm/mgr-nfs-upgrade/2-nfs.yaml | 2 +- .../cephadm/smoke-roleless/2-services/nfs-ingress.yaml | 2 +- .../cephadm/smoke-roleless/2-services/nfs-ingress2.yaml | 2 +- src/vstart.sh | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/mgr/nfs.rst b/doc/mgr/nfs.rst index 54ca19fdd2e26..52ddf104fd8fc 100644 --- a/doc/mgr/nfs.rst +++ b/doc/mgr/nfs.rst @@ -239,17 +239,17 @@ Create CephFS Export .. code:: bash - $ ceph nfs export create cephfs [--readonly] [--path=/path/in/cephfs] [--client_addr ...] [--squash ] + $ ceph nfs export create cephfs --cluster-id --pseudo-path --fsname [--readonly] [--path=/path/in/cephfs] [--client_addr ...] [--squash ] This creates export RADOS objects containing the export block, where -```` is the name of the FS volume used by the NFS Ganesha cluster -that will serve this export. - ```` is the NFS Ganesha cluster ID. ```` 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 name of the FS volume used by the NFS Ganesha cluster +that will serve this export. + ```` 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: diff --git a/qa/suites/orch/cephadm/mgr-nfs-upgrade/2-nfs.yaml b/qa/suites/orch/cephadm/mgr-nfs-upgrade/2-nfs.yaml index eb8fa2a547807..34680fc8a6b91 100644 --- a/qa/suites/orch/cephadm/mgr-nfs-upgrade/2-nfs.yaml +++ b/qa/suites/orch/cephadm/mgr-nfs-upgrade/2-nfs.yaml @@ -15,7 +15,7 @@ tasks: - cephadm.shell: host.a: - ceph nfs cluster create foo --placement=2 || ceph nfs cluster create cephfs foo --placement=2 - - ceph nfs export create cephfs foofs foo --binding /fake || ceph nfs export create cephfs foofs foo --pseudo-path /fake + - ceph nfs export create cephfs --fsname foofs --clusterid foo --binding /fake || ceph nfs export create cephfs --fsname foofs --cluster-id foo --pseudo-path /fake # we can't do wait_for_service here because with octopus it's nfs.ganesha-foo not nfs.foo - while ! ceph orch ls | grep nfs | grep 2/2 ; do sleep 1 ; done 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 3d935218a95e4..b4e843df26116 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 --pseudo-path /fake + - ceph nfs export create cephfs --fsname foofs --cluster-id 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 58f7e13a2499c..a47dd9d7646bd 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}} --port 2999 - - ceph nfs export create cephfs foofs foo --pseudo-path /fake + - ceph nfs export create cephfs --fsname foofs --cluster-id foo --pseudo-path /fake - cephadm.wait_for_service: service: nfs.foo diff --git a/src/vstart.sh b/src/vstart.sh index bdf0f596dec2c..0fa55eba02ed9 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -1224,7 +1224,7 @@ start_ganesha() { ceph_adm orch set backend test_orchestrator ceph_adm test_orchestrator load_data -i $CEPH_ROOT/src/pybind/mgr/test_orchestrator/dummy_data.json prun ceph_adm nfs cluster create $cluster_id - prun ceph_adm nfs export create cephfs "a" $cluster_id "/cephfs" + prun ceph_adm nfs export create cephfs --fsname "a" --cluster-id $cluster_id --pseudo-path "/cephfs" for name in a b c d e f g h i j k l m n o p do @@ -1664,7 +1664,7 @@ if [ $GANESHA_DAEMON_NUM -gt 0 ]; then port="2049" prun ceph_adm nfs cluster create $cluster_id if [ $CEPH_NUM_MDS -gt 0 ]; then - prun ceph_adm nfs export create cephfs "a" $cluster_id $pseudo_path + prun ceph_adm nfs export create cephfs --fsname "a" --cluster-id $cluster_id --pseudo-path $pseudo_path echo "Mount using: mount -t nfs -o port=$port $IP:$pseudo_path mountpoint" fi if [ "$CEPH_NUM_RGW" -gt 0 ]; then -- 2.39.5