From 936e720c010ea737c337b2d9adf723de3af2ac14 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 11 Feb 2018 11:46:25 +0800 Subject: [PATCH] vstart.sh: add comma in DASH_URLS and RESTFUL_URLS Signed-off-by: Kefu Chai --- src/vstart.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/vstart.sh b/src/vstart.sh index 8d4e7a579381d..6324469453a33 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -678,14 +678,21 @@ start_mgr() { host = $HOSTNAME EOF - ceph_adm config-key set mgr/dashboard/$name/server_port $MGR_PORT - DASH_URLS+="http://$IP:$MGR_PORT/" - MGR_PORT=$(($MGR_PORT + 1000)) - - ceph_adm config-key set mgr/restful/$name/server_port $MGR_PORT + ceph_adm config-key set mgr/dashboard/$name/server_port $MGR_PORT + if [ $mgr -eq 1 ]; then + DASH_URLS="http://$IP:$MGR_PORT" + else + DASH_URLS+=", http://$IP:$MGR_PORT" + fi + MGR_PORT=$(($MGR_PORT + 1000)) - RESTFUL_URLS+="https://$IP:$MGR_PORT" - MGR_PORT=$(($MGR_PORT + 1000)) + ceph_adm config-key set mgr/restful/$name/server_port $MGR_PORT + if [ $mgr -eq 1 ]; then + RESTFUL_URLS="https://$IP:$MGR_PORT" + else + RESTFUL_URLS+=", https://$IP:$MGR_PORT" + fi + MGR_PORT=$(($MGR_PORT + 1000)) echo "Starting mgr.${name}" run 'mgr' $CEPH_BIN/ceph-mgr -i $name $ARGS -- 2.39.5