From: Yehuda Sadeh Date: Tue, 5 Feb 2019 00:35:20 +0000 (-0800) Subject: vstart.sh: fix params generation for monmaptool X-Git-Tag: v14.1.0~206^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2ff5439c2b79b63fa20a64c3bd19562214e34a30;p=ceph.git vstart.sh: fix params generation for monmaptool Fixes: http://tracker.ceph.com/issues/38174 This broke in the msgr21 case, due to bash globbing in cases where the generated string somehow matched names of certain files in local directory. Also need to pass params to the prun function separately, otherwise everything is quoted together. Signed-off-by: Yehuda Sadeh --- diff --git a/src/vstart.sh b/src/vstart.sh index c59b0256a5c49..d92d7844d855e 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -680,7 +680,7 @@ start_mon() { "$keyring_fn" # build a fresh fs monmap, mon fs - local str="" + local params=() local count=0 local mon_host="" for f in $MONS @@ -694,7 +694,7 @@ start_mon() { if [ $msgr -eq 21 ]; then A="[v2:$IP:$(($CEPH_PORT+$count)),v1:$IP:$(($CEPH_PORT+$count+1))]" fi - str="$str --addv $f $A" + params+=("--addv" "$f" "$A") mon_host="$mon_host $A" wconf <