osdmap_fn="/tmp/ceph_osdmap.$$"
monmap_fn="/tmp/ceph_monmap.$$"
+msgr="21"
+
usage="usage: $0 [option]... \nex: MON=3 OSD=1 MDS=1 MGR=1 RGW=1 $0 -n -d\n"
usage=$usage"options:\n"
usage=$usage"\t-d, --debug\n"
usage=$usage"\t--multimds <count> allow multimds with maximum active count\n"
usage=$usage"\t--without-dashboard: do not run using mgr dashboard\n"
usage=$usage"\t--bluestore-spdk <vendor>:<device>: enable SPDK and specify the PCI-ID of the NVME device\n"
+usage=$usage"\t--msgr1: use msgr1 only\n"
+usage=$usage"\t--msgr2: use msgr2 only\n"
+usage=$usage"\t--msgr21: use msgr2 and msgr1\n"
usage_exit() {
printf "$usage"
--short )
short=1
;;
+ --msgr1 )
+ msgr="1"
+ ;;
+ --msgr2 )
+ msgr="2"
+ ;;
+ --msgr21 )
+ msgr="21"
+ ;;
--valgrind )
[ -z "$2" ] && usage_exit
valgrind=$2
mgr_modules="dashboard $mgr_modules"
fi
+ local msgr_conf=''
+ if [ $msgr -eq 21 ]; then
+ msgr_conf="ms bind msgr2 = true
+ms bind msgr1 = true
+";
+ fi
+ if [ $msgr -eq 2 ]; then
+ msgr_conf="ms bind msgr2 = true
+";
+ fi
+ if [ $msgr -eq 1 ]; then
+ msgr_conf="ms bind msgr2 = false
+ms bind msgr1 = true
+";
+ fi
+
wconf <<EOF
; generated by vstart.sh on `date`
[$VSTART_SEC]
enable experimental unrecoverable data corrupting features = *
osd_crush_chooseleaf_type = 0
debug asok assert abort = true
+$msgr_conf
$extra_conf
EOF
if [ "$lockdep" -eq 1 ] ; then
local count=0
for f in $MONS
do
- str="$str --add $f v2:$IP:$(($CEPH_PORT+$count))"
- wconf <<EOF
+ if [ $msgr -eq 1 ]; then
+ A="v1:$IP:$(($CEPH_PORT+$count+1))"
+ fi
+ if [ $msgr -eq 2 ]; then
+ A="v2:$IP:$(($CEPH_PORT+$count+1))"
+ fi
+ if [ $msgr -eq 21 ]; then
+ A="v2:$IP:$(($CEPH_PORT+$count)),v1:$IP:$(($CEPH_PORT+$count+1))"
+ fi
+ str="$str --addv $f $A"
+ wconf <<EOF
[mon.$f]
host = $HOSTNAME
mon data = $CEPH_DEV_DIR/mon.$f
- mon addr = v2:$IP:$(($CEPH_PORT+$count))
+ mon addr = $A
EOF
- count=$(($count + 1))
+ count=$(($count + 2))
done
prun "$CEPH_BIN/monmaptool" --create --clobber $str --print "$monmap_fn"