mirror of
https://github.com/ceph/ceph
synced 2025-01-03 17:42:36 +00:00
tests: kill_daemon use $name.pid instead of pidfile
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>
This commit is contained in:
parent
6741b71d90
commit
0b4ccbd68d
@ -60,13 +60,13 @@ function run_mon() {
|
|||||||
--log-file=$dir/log \
|
--log-file=$dir/log \
|
||||||
--mon-cluster-log-file=$dir/log \
|
--mon-cluster-log-file=$dir/log \
|
||||||
--run-dir=$dir \
|
--run-dir=$dir \
|
||||||
--pid-file=$dir/pidfile \
|
--pid-file=$dir/\$name.pid \
|
||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
function kill_daemons() {
|
function kill_daemons() {
|
||||||
local dir=$1
|
local dir=$1
|
||||||
for pidfile in $(find $dir | grep pidfile) ; do
|
for pidfile in $(find $dir | grep '\.pid') ; do
|
||||||
pid=$(cat $pidfile)
|
pid=$(cat $pidfile)
|
||||||
for try in 0 1 1 1 2 3 ; do
|
for try in 0 1 1 1 2 3 ; do
|
||||||
kill -9 $pid 2> /dev/null || break
|
kill -9 $pid 2> /dev/null || break
|
||||||
|
@ -45,7 +45,7 @@ function run_osd() {
|
|||||||
ceph_args+=" --run-dir=$dir"
|
ceph_args+=" --run-dir=$dir"
|
||||||
ceph_args+=" --debug-osd=20"
|
ceph_args+=" --debug-osd=20"
|
||||||
ceph_args+=" --log-file=$dir/osd-\$id.log"
|
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+=" "
|
||||||
ceph_args+="$@"
|
ceph_args+="$@"
|
||||||
mkdir -p $osd_data
|
mkdir -p $osd_data
|
||||||
|
Loading…
Reference in New Issue
Block a user