]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
initscript: more fixes
authorSage Weil <sage@newdream.net>
Wed, 11 Mar 2009 23:21:50 +0000 (16:21 -0700)
committerSage Weil <sage@newdream.net>
Wed, 11 Mar 2009 23:21:50 +0000 (16:21 -0700)
src/ceph_common.sh
src/init-ceph
src/mkcephfs

index db398bea0e220346e0567a22bab1fb5dd16162e0..ac5cf87e7f602110a50a496814392880cbaaae5c 100644 (file)
@@ -2,17 +2,17 @@
 
 CCONF="$BINDIR/cconf"
 
-conf=$ETCDIR"/cluster.conf"
-runtime_conf=$ETCDIR"/ceph.conf"
-
+conf=$ETCDIR"/ceph.conf"
 hostname=`hostname | cut -d . -f 1`
 
 
-# make sure cluster.conf exists
-if [ ! -e $conf ]; then
-    echo "$0: Cluster conf $conf not found"
-    usage_exit
-fi
+verify_conf() {
+    # make sure ceph.conf exists
+    if [ ! -e $conf ]; then
+       echo "$0: ceph conf $conf not found"
+       usage_exit
+    fi
+}
 
 
 check_host() {
index 2d47c5f9aab2190144d9c7141614d5eaa49c859b..3e81873dc034475f523f0bf8c5528b899f3cd94d 100755 (executable)
@@ -114,6 +114,8 @@ options="$options $1"
 shift
 done
 
+verify_conf
+
 # build mon_addr_arg with all mon addrs
 n=0
 mon_addr_arg=""
@@ -145,7 +147,7 @@ for name in $what; do
        cmd="$cmd -c $conf"
     else
        if [[ ! $pushed_to =~ " $host " ]]; then
-           scp $conf $host:/tmp/ceph.conf.$$
+           scp -q $conf $host:/tmp/ceph.conf.$$
            pushed_to="$pushed_to $host "
        fi
        cmd="$cmd -c /tmp/ceph.conf.$$"
index 998bb471cee1435eb392ad4daac92b172f678ae4..e09a2c9e4295e1923a79e8b2b9ec49698a9b8969 100755 (executable)
@@ -70,6 +70,8 @@ esac
 shift
 done
 
+verify_conf
+
 get_name_list "$@"
 
 # create the monmap if we're doing mon0
@@ -77,13 +79,17 @@ if [[ $what =~ "mon0" ]]; then
     # first, make a list of monitors
     mons=`$CCONF -c $conf -l mon | egrep -v '^mon$' | sort`
     args=""
-    for mon in $mons; do
-       get_conf addr "" "mon addr" mon0 mon global
+
+    type="mon"
+    for name in $mons; do
+       id=`echo $name | cut -c 4- | sed 's/\\.//'`
+       get_conf addr "" "mon addr"
        args=$args" --add $addr"
     done
 
     # build monmap
     monmap="/tmp/monmap.$$"
+    echo $BINDIR/monmaptool --create --clobber $args --print $monmap || exit 1
     $BINDIR/monmaptool --create --clobber $args --print $monmap || exit 1
 
     # build osdmap
@@ -118,8 +124,8 @@ for name in $what; do
     check_host || continue
 
     if [[ $ssh != "" ]] && [[ ! $pushed_to =~ " $host " ]]; then
-       scp $osdmap $host:$osdmap
-       scp $monmap $host:$monmap
+       scp -q $osdmap $host:$osdmap
+       scp -q $monmap $host:$monmap
        pushed_to="$pushed_to $host "
     fi