]>
git.proxmox.com Git - ceph.git/blob - ceph/src/test/osd/osd-reactivate.sh
3 # Author: Vicente Cheng <freeze.bilsted@gmail.com>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU Library Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU Library Public License for more details.
16 source $
(dirname $0)/..
/detect-build-env-vars.sh
17 source $CEPH_ROOT/qa
/workunits
/ceph-helpers.sh
23 export CEPH_MON
="127.0.0.1:7122" # git grep '\<7122\>' : there must be only one
25 CEPH_ARGS
+="--fsid=$(uuidgen) --auth-supported=none "
26 CEPH_ARGS
+="--mon-host=$CEPH_MON "
28 local funcs
=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
29 for func
in $funcs ; do
30 setup
$dir ||
return 1
31 $func $dir ||
return 1
32 teardown
$dir ||
return 1
36 function TEST_reactivate
() {
39 run_mon
$dir a ||
return 1
40 run_mgr
$dir x ||
return 1
41 run_osd
$dir 0 ||
return 1
43 kill_daemons
$dir TERM osd ||
return 1
45 ready_path
=$dir"/0/ready"
46 activate_path
=$dir"/0/active"
48 rm -rf $ready_path $activate_path
49 activate_osd
$dir 0 ||
return 1
53 main osd-reactivate
"$@"
56 # compile-command: "cd ../.. ; make -j4 && test/osd/osd-reactivate.sh"