3 # Copyright (C) 2014,2015,2017 Red Hat <contact@redhat.com>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU Library Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU Library Public License for more details.
15 source $
(dirname $0)/..
/detect-build-env-vars.sh
16 source $CEPH_ROOT/qa
/workunits
/ceph-helpers.sh
21 setup
$dir ||
return 1
23 MON
=127.0.0.1:7150 # git grep '\<7150\>' : there must be only one
27 CEPH_ARGS
+="--fsid=$FSID --auth-supported=none "
28 CEPH_ARGS
+="--mon-initial-members=a --mon-host=$MON "
29 CEPH_ARGS
+="--mgr-initial-modules=dashbaord "
30 CEPH_ARGS
+="--mon-host=$MON"
31 run_mon
$dir a
--public-addr $MON ||
return 1
34 timeout
360 ceph
--mon-host $MON mon stat ||
return 1
35 export CEPH_ARGS
="--mon_host $MON "
36 ceph config-key put mgr
/x
/dashboard
/server_port
7001
37 MGR_ARGS
+="--mgr_module_path=${CEPH_ROOT}/src/pybind/mgr "
38 run_mgr
$dir x
${MGR_ARGS} ||
return 1
41 while [[ $tries < 30 ]] ; do
42 if [ $
(ceph status
-f json | jq .mgrmap.available
) = "true" ]
51 while [[ $tries < 30 ]] ; do
52 if [ curl
-s http
://127.0.0.1:7001/toplevel_data | \
53 jq
'.health.overall_status' |
grep HEALTH_
]
61 teardown
$dir ||
return 1
64 main mgr-dashboard-smoke
"$@"
67 # compile-command: "cd ../.. ; make -j4 TESTS=test/mon/mon-dashboard-smoke.sh check"