]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: kill_daemon use $name.pid instead of pidfile
authorLoic Dachary <loic-201408@dachary.org>
Sun, 19 Oct 2014 00:15:41 +0000 (17:15 -0700)
committerLoic Dachary <ldachary@redhat.com>
Sun, 9 Nov 2014 10:59:51 +0000 (11:59 +0100)
So that it can be used instead of stop.sh to stop vstart.sh daemons. The
problem with stop.sh is that it kills any daemon, not just a selection.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
src/test/mon/mon-test-helpers.sh
src/test/osd/osd-test-helpers.sh

index deeb9f38f863e89da87592fb64f793253fc64ca9..9d54bef22461af3c903c4cf71c2b601ed52f0c41 100644 (file)
@@ -60,13 +60,13 @@ function run_mon() {
         --log-file=$dir/log \
         --mon-cluster-log-file=$dir/log \
         --run-dir=$dir \
-        --pid-file=$dir/pidfile \
+        --pid-file=$dir/\$name.pid \
         "$@"
 }
 
 function kill_daemons() {
     local dir=$1
-    for pidfile in $(find $dir | grep pidfile) ; do
+    for pidfile in $(find $dir | grep '\.pid') ; do
         pid=$(cat $pidfile)
         for try in 0 1 1 1 2 3 ; do
             kill -9 $pid 2> /dev/null || break
index 4b3a8b79541e640b2e8858a7dac588647a092a6f..f754618cc17ed9cad5079baf08252336e205e48a 100644 (file)
@@ -45,7 +45,7 @@ function run_osd() {
     ceph_args+=" --run-dir=$dir"
     ceph_args+=" --debug-osd=20"
     ceph_args+=" --log-file=$dir/osd-\$id.log"
-    ceph_args+=" --pid-file=$dir/osd-\$id.pidfile"
+    ceph_args+=" --pid-file=$dir/osd-\$id.pid"
     ceph_args+=" "
     ceph_args+="$@"
     mkdir -p $osd_data