source $(dirname $0)/../detect-build-env-vars.sh
source $CEPH_ROOT/qa/standalone/ceph-helpers.sh
+mon_port=$(get_unused_port)
+dashboard_port=$((mon_port+1))
+
function run() {
local dir=$1
shift
- export CEPH_MON=127.0.0.1:7160 # git grep '\<7160\>' : there must be only one
+ export CEPH_MON=127.0.0.1:$mon_port
export CEPH_ARGS
CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
CEPH_ARGS+="--mon-initial-members=a --mon-host=$MON "
run_mon $dir a || return 1
timeout 30 ceph mon stat || return 1
- ceph config-key set mgr/dashboard/x/server_port 7161
+ ceph config-key set mgr/dashboard/x/server_port $dashboard_port
MGR_ARGS+="--mgr_module_path=${CEPH_ROOT}/src/pybind/mgr "
run_mgr $dir x ${MGR_ARGS} || return 1
tries=0
while [[ $tries < 30 ]] ; do
- if curl -c $dir/cookiefile -X POST -d '{"username":"admin","password":"admin"}' http://127.0.0.1:7161/api/auth
+ if curl -c $dir/cookiefile -X POST -d '{"username":"admin","password":"admin"}' http://127.0.0.1:$dashboard_port/api/auth
then
- if curl -b $dir/cookiefile -s http://127.0.0.1:7161/api/summary | \
+ if curl -b $dir/cookiefile -s http://127.0.0.1:$dashboard_port/api/summary | \
jq '.health.overall_status' | grep HEALTH_
then
break