]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart.sh: simplify the objectstore related logic 17749/head
authorKefu Chai <kchai@redhat.com>
Fri, 15 Sep 2017 04:42:48 +0000 (12:42 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 15 Sep 2017 04:49:20 +0000 (12:49 +0800)
also avoid overriding --memstore specified by command line with
the default "bluestore"

Reported-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/vstart.sh

index b4f81a061f887ba2e6217cc1b260d5ae28246c55..83312230c10224abf38728d10ef3df969f2c2d9f 100755 (executable)
@@ -105,11 +105,10 @@ hitset=""
 overwrite_conf=1
 cephx=1 #turn cephx on by default
 cache=""
-memstore=0
 if [ `uname` = FreeBSD ]; then
-    bluestore=0
+    objectstore="filestore"
 else
-    bluestore=1
+    objectstore="bluestore"
 fi
 rgw_frontend="civetweb"
 rgw_compression=""
@@ -291,13 +290,13 @@ case $1 in
            overwrite_conf=0
            ;;
     --memstore )
-           memstore=1
+           objectstore="memstore"
            ;;
     -b | --bluestore )
-           bluestore=1
+           objectstore="bluestore"
            ;;
     -f | --filestore )
-           bluestore=0
+           objectstore="filestore"
            ;;
     --hitset )
            hitset="$hitset $2 $3"
@@ -521,7 +520,7 @@ $DAEMONOPTS
         bluestore block wal size = 1048576000
         bluestore block wal create = true
 $COSDDEBUG
-$COSDMEMSTORE
+        osd objectstore = $objectstore
 $COSDSHORT
 $extra_conf
 [mon]
@@ -806,15 +805,6 @@ if [ -n "$MON_ADDR" ]; then
        CMDS_ARGS=" -m "$MON_ADDR
 fi
 
-if [ "$memstore" -eq 1 ]; then
-    COSDMEMSTORE='
-       osd objectstore = memstore'
-fi
-if [ "$bluestore" -eq 1 ]; then
-    COSDMEMSTORE='
-       osd objectstore = bluestore'
-fi
-
 if [ -z "$CEPH_PORT" ]; then
     CEPH_PORT=6789
     [ -e ".ceph_port" ] && CEPH_PORT=`cat .ceph_port`