]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/cephadm/test_cephadm.sh: add nfs-ganesha test
authorMichael Fritch <mfritch@suse.com>
Sun, 2 Feb 2020 06:22:20 +0000 (23:22 -0700)
committerMichael Fritch <mfritch@suse.com>
Thu, 12 Mar 2020 14:03:18 +0000 (08:03 -0600)
Signed-off-by: Michael Fritch <mfritch@suse.com>
qa/workunits/cephadm/test_cephadm.sh
src/cephadm/cephadm

index cc273343631d192720211d38942f28459805b39b..40a0021cd06aa42af92ad42d72827d32b02756f8 100755 (executable)
@@ -277,6 +277,20 @@ cat ${CEPHADM_SAMPLES_DIR}/grafana.json | \
 cond="curl --insecure 'https://localhost:3000' | grep -q 'grafana'"
 is_available "grafana" "$cond" 30
 
+# add nfs-ganesha
+nfs_rados_pool=$(cat ${CEPHADM_SAMPLES_DIR}/nfs.json | jq -r '.["pool"]')
+$CEPHADM shell --fsid $FSID --config $CONFIG --keyring $KEYRING -- \
+        ceph osd pool create $nfs_rados_pool 64
+$CEPHADM shell --fsid $FSID --config $CONFIG --keyring $KEYRING -- \
+        rados --pool nfs-ganesha --namespace nfs-ns create conf-nfs.a
+$CEPHADM deploy --name nfs.a \
+      --fsid $FSID \
+      --keyring $KEYRING \
+      --config $CONFIG \
+      --config-json ${CEPHADM_SAMPLES_DIR}/nfs.json
+cond="$SUDO ss -tlnp '( sport = :nfs )' | grep 'ganesha.nfsd'"
+is_available "nfs" "$cond" 10
+
 ## run
 # WRITE ME
 
index 38b82cb1233b0ca01c1acb727f791afd9b390ee5..5b9332aa71c85163ffc4746286d83f72ff3395e2 100755 (executable)
@@ -199,7 +199,6 @@ class NFSGanesha(object):
         # type: (str) -> Dict[str, str]
         mounts = dict()
         mounts[os.path.join(data_dir, 'config')] = '/etc/ceph/ceph.conf:z'
-        # TODO: `ceph auth get-or-create` instead of admin keyring?
         mounts[os.path.join(data_dir, 'keyring')] = '/etc/ceph/keyring:z'
         mounts[os.path.join(data_dir, 'etc/ganesha')] = '/etc/ganesha'
         return mounts