]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
vstartnew.sh: -n (norestart) to avoid crun restart loop
authorSage Weil <sage@newdream.net>
Wed, 15 Oct 2008 21:01:22 +0000 (14:01 -0700)
committerSage Weil <sage@newdream.net>
Wed, 15 Oct 2008 21:01:26 +0000 (14:01 -0700)
src/crun
src/vstartnew.sh

index c5e35b4bad1b6d4b69a82c3ff996e12f7927fedd..2e304468a5ba079e711d0aa3f73237611556f310 100755 (executable)
--- a/src/crun
+++ b/src/crun
@@ -1,17 +1,25 @@
 #!/bin/sh
 
 let daemon=0
+
+# explicit -n/--norestart?
+case $1 in
+       -n | --norestart )
+       daemon=1
+       shift
+esac
+
 orig_args=$*
 
+# implicit from any -d?
 while [ $# -ge 1 ]; do
-       case $1 in
-               -d | --daemon )
-               daemon=1
-       esac
-       shift
+       case $1 in
+               -d | --daemon )
+               daemon=1
+       esac
+       shift
 done
 
-
 while [ true ]; do
        $orig_args
        [ $daemon -eq 1 ] && exit
index 7987a9023c00072a60e3aea20951cb99eae91676..19faed01be43726960b275982471b54e3d5e7146 100755 (executable)
@@ -5,11 +5,15 @@
 [ "$CEPH_NUM_MDS" == "" ] && CEPH_NUM_MDS=1
 
 let debug=0
+let norestart=""
 
 while [ $# -ge 1 ]; do
         case $1 in
                 -d | --debug )
                 debug=1
+               ;;
+               -n )
+               norestart="--norestart"
         esac
         shift
 done
@@ -81,14 +85,14 @@ do
  echo mkfs osd$osd
  $SUDO $CEPH_BIN/cosd --mkfs_for_osd $osd dev/osd$osd # --debug_journal 20 --debug_osd 20 --debug_filestore 20 --debug_ebofs 20
  echo start osd$osd
- $CEPH_BIN/crun $SUDO $CEPH_BIN/cosd -m $IP:$CEPH_PORT dev/osd$osd $ARGS $COSD_ARGS &
+ $CEPH_BIN/crun $norestart $SUDO $CEPH_BIN/cosd -m $IP:$CEPH_PORT dev/osd$osd $ARGS $COSD_ARGS &
 # echo valgrind --leak-check=full --show-reachable=yes $CEPH_BIN/cosd dev/osd$osd --debug_ms 1 --debug_osd 20 --debug_filestore 10 --debug_ebofs 20 #1>out/o$osd #& #--debug_osd 40
 done
 
 # mds
 for mds in `seq 0 $((CEPH_NUM_MDS-1))`
 do
-  $CEPH_BIN/crun $CEPH_BIN/cmds $ARGS $CMDS_ARGS &
+  $CEPH_BIN/crun $norestart $CEPH_BIN/cmds $ARGS $CMDS_ARGS &
 
 #valgrind --tool=massif $CEPH_BIN/cmds $ARGS --mds_log_max_segments 2 --mds_thrash_fragments 0 --mds_thrash_exports 0 > m  #--debug_ms 20
 #$CEPH_BIN/cmds -d $ARGS --mds_thrash_fragments 0 --mds_thrash_exports 0 #--debug_ms 20