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 run_mon
$dir a
--public-addr $MON ||
return 1
32 timeout
360 ceph
--mon-host $MON mon stat ||
return 1
33 export CEPH_ARGS
="--mon_host $MON "
34 ceph config-key put mgr
/x
/dashboard
/server_port
7001
35 MGR_ARGS
+="--mgr_module_path=${CEPH_ROOT}/src/pybind/mgr "
36 MGR_ARGS
+="--mgr_modules=dashboard "
37 run_mgr
$dir x
${MGR_ARGS} ||
return 1
40 while [[ $tries < 30 ]] ; do
41 if [ $
(ceph status
-f json | jq .mgrmap.available
) = "true" ]
50 while [[ $tries < 30 ]] ; do
51 if [ curl
-s http
://127.0.0.1:7001/toplevel_data | \
52 jq
'.health.overall_status' |
grep HEALTH_
]
60 teardown
$dir ||
return 1
63 main mgr-dashboard-smoke
"$@"
66 # compile-command: "cd ../.. ; make -j4 TESTS=test/mon/mon-dashboard-smoke.sh check"