From: Yehuda Sadeh Date: Fri, 30 Jan 2009 00:20:46 +0000 (-0800) Subject: ceph.sh: some fixes X-Git-Tag: v0.7~262 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dba09e8acd5bcf6dac5ab7e80f08c6cb671363e6;p=ceph.git ceph.sh: some fixes --- diff --git a/src/ceph.sh b/src/ceph.sh index 822a499ad012b..df355ddbabd55 100755 --- a/src/ceph.sh +++ b/src/ceph.sh @@ -124,7 +124,9 @@ else CMDS_ARGS="--lockdep 1 --mds_cache_size 500 --mds_log_max_segments 2 --debug_ms 1 --debug_mds 20 --mds_thrash_fragments 0 --mds_thrash_exports 1" fi -get_val MON_ADDR "$MON_ADDR" global mon_addr 3 +get_val MON_HOST "$MON_HOST" global "mon host" "" +[ "$MON_HOST" != "" ] && get_val MON_PORT "$MON_PORT" global "mon port" "" +[ "$MON_PORT" != "" ] && MON_ADDR=$MON_HOST:$MON_PORT if [ "$MON_ADDR" != "" ]; then CMON_ARGS=$CMON_ARGS" -m "$MON_ADDR @@ -154,14 +156,17 @@ fi echo "ip $IP" [ "$CEPH_BIN" == "" ] && CEPH_BIN=. -[ "$CEPH_PORT" == "" ] && CEPH_PORT=6789 +[ "$MON_PORT" == "" ] && MON_PORT=6789 +[ "$MON_HOST" == "" ] && MON_HOST=$IP #mon if [ $select_mon -eq 1 ]; then - for f in `seq 0 $((CEPH_NUM_MON-1))`; do + for mon in `seq 0 $((CEPH_NUM_MON-1))`; do get_conf mon_data_path mondata "mon data path" mon$mon mon global get_conf mon_data_file mon$mon "mon data file" mon$mon mon global get_conf conf_file $startup_conf_file "conf file" mon$mon mon global + get_conf MON_PORT $MON_PORT "mon port" mon$osd mon global + get_conf CEPH_HOST $MON_HOST "mon host" mon$osd mon global get_conf ssh_host "" "ssh host" mon$mon mon global [ "$ssh_host" != "" ] && SSH_HOST="ssh $ssh_host" || SSH_HOST="" @@ -181,8 +186,8 @@ if [ $select_osd -eq 1 ]; then get_conf_bool use_sudo 0 sudo osd$osd osd global get_conf osd_dev dev/osd$osd "osd dev" osd$osd osd global get_conf conf_file $startup_conf_file "conf file" osd$osd osd global - get_conf CEPH_PORT $CEPH_PORT "mon port" osd$osd osd global - get_conf CEPH_HOST $IP "mon host" osd$osd osd global + get_conf MON_PORT $MON_PORT "mon port" osd$osd osd global + get_conf CEPH_HOST $MON_HOST "mon host" osd$osd osd global [ "$use_sudo" != "0" ] && SUDO="sudo" || SUDO="" @@ -194,7 +199,7 @@ if [ $select_osd -eq 1 ]; then echo start osd$osd $SSH_HOST $CD_PATH \ $CEPH_BIN/crun $norestart $valgrind $SUDO $CEPH_BIN/cosd --conf_file $conf_file \ - -m $CEPH_HOST:$CEPH_PORT $osd_dev $ARGS $COSD_ARGS & + $osd_dev $ARGS $COSD_ARGS & done fi @@ -204,13 +209,15 @@ if [ $select_mds -eq 1 ]; then do get_conf conf_file $startup_conf_file "conf file" mds$mds mds global get_conf ssh_host "" "ssh host" mds$mds mds global + get_conf MON_PORT $MON_PORT "mon port" mds$osd mds global + get_conf CEPH_HOST $MON_HOST "mon host" mds$osd mds global [ "$ssh_host" != "" ] && SSH_HOST="ssh $ssh_host" || SSH_HOST="" get_conf cd_path "" "ssh path" mds$mds mds global [ "$ssh_host" != "" ] && CD_PATH="cd $cd_path \\;" || CD_PATH="" $SSH_HOST $CD_PATH \ $CEPH_BIN/crun $norestart $valgrind $CEPH_BIN/cmds --conf_file $conf_file \ - -m $CEPH_HOST:$CEPH_PORT $ARGS $CMDS_ARGS & + $ARGS $CMDS_ARGS & done $CEPH_BIN/ceph mds set_max_mds $CEPH_NUM_MDS fi