]>
git.proxmox.com Git - ceph.git/blob - ceph/src/test/mon/run_test.sh
2 # vim: ts=8 sw=2 smarttab
4 # $0.sh - run mon workload generator
6 if [[ ! -e "./ceph_ver.h" ]]; then
7 echo "This script must be run from the repository's src/ directory"
12 echo "usage: $1 [options..] <num-osds>"
15 echo " -v, --verbose Be more verbose"
16 echo " -c, --conf FILE ceph.conf location"
17 echo " -d, --duration SECS Run test for SECS seconds (default: 300)"
18 echo " --debug LEVEL Set the test's debug level (default: 0)"
19 echo " -n, --new Make a fresh run by creating a new cluster"
21 echo "environment variables:"
22 echo " EXTRA_ARGS Pass additional ceph arguments to the test"
27 if [[ ! -e "init-ceph" ]]; then
28 echo "could not find 'init-ceph'; killing only by hand and may bob have"
29 echo "mercy on our souls"
34 for i
in mon osd mds
; do
40 if [[ ! -e "init-ceph" ]]; then
41 echo "could not find 'init-ceph'; attempting to start monitors by hand"
44 .
/ceph-mon
-i $i -c ceph.conf
-k keyring
-d
52 rm -fr dev
/ out
/ keyring
55 if [[ ! -e "vstart.sh" ]]; then
56 echo "could not find 'vstart.sh', which is weird; what have you done?"
60 env MON
=3 OSD
=0 MDS
=0 MGR
=0 \
61 .
/vstart.sh
-n -l -d mon
70 [[ ! -z $EXTRA_ARGS ]] && ARGS
="$EXTRA_ARGS"
82 if [[ "$2" == "" ]]; then
83 echo "'$1' expects an argument; none was given"
91 echo "'$1' expects an argument; none was given"
94 ARGS
="$ARGS --debug-none $2"
99 echo "'$1' expects an argument; none was given"
114 echo "$1: unknown option" >&2
126 if [[ -z $LOADGEN_NUM_OSDS ]]; then
127 echo "must specify the number of osds"
133 [[ $fresh_run -eq 1 ]] && make_fresh
;
136 env VERBOSE
=$VERBOSE TEST_CEPH_CONF
="$TEST_CEPH_CONF" \
137 DURATION
=$DURATION EXTRA_ARGS
="$ARGS" \
138 LOADGEN_NUM_OSDS
=$LOADGEN_NUM_OSDS \
139 PATH
="$PATH:`pwd`" ..
/qa
/workunits
/mon
/workloadgen.sh