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 <yehuda@redhat.com>
"$keyring_fn"
# build a fresh fs monmap, mon fs
- local str=""
+ local params=()
local count=0
local mon_host=""
for f in $MONS
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 <<EOF
[mon.$f]
[global]
mon host = $mon_host
EOF
- prun "$CEPH_BIN/monmaptool" --create --clobber $str --print "$monmap_fn"
+ prun "$CEPH_BIN/monmaptool" --create --clobber "${params[@]}" --print "$monmap_fn"
for f in $MONS
do