From 2ff5439c2b79b63fa20a64c3bd19562214e34a30 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Mon, 4 Feb 2019 16:35:20 -0800 Subject: [PATCH] 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 --- src/vstart.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vstart.sh b/src/vstart.sh index c59b0256a5c4..d92d7844d855 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 <