]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/smoke.sh
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / test / smoke.sh
1 #!/usr/bin/env bash
2
3 source $CEPH_ROOT/qa/standalone/ceph-helpers.sh
4
5 mon_port=$(get_unused_port)
6
7 function run() {
8 local dir=$1
9 shift
10
11 export CEPH_MON="127.0.0.1:$mon_port"
12 export CEPH_ARGS
13 CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
14 CEPH_ARGS+="--mon-host=$CEPH_MON "
15 set -e
16
17 local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
18 for func in $funcs ; do
19 setup $dir || return 1
20 $func $dir || return 1
21 teardown $dir || return 1
22 done
23 }
24
25 function TEST_minimal() {
26 local dir=$1
27
28 run_mon $dir a
29 run_mgr $dir x
30 run_osd $dir 0
31 run_osd $dir 1
32 run_osd $dir 2
33 create_rbd_pool
34 wait_for_clean
35 }
36
37 function TEST_multimon() {
38 local dir=$1
39 MONA="127.0.0.1:$((mon_port++))"
40 MONB="127.0.0.1:$((mon_port++))"
41 MONC="127.0.0.1:$((mon_port++))"
42
43 run_mon $dir a --public-addr $MONA
44 run_mon $dir b --public-addr $MONB
45 run_mon $dir c --public_addr $MONC
46 run_mgr $dir x
47 run_mgr $dir y
48 run_osd $dir 0
49 run_osd $dir 1
50 run_osd $dir 2
51
52 ceph osd pool create foo 32
53 ceph osd out 0
54 wait_for_clean
55
56 timeout 8 rados -p foo bench 4 write -b 4096 --no-cleanup || return 1
57 wait_for_clean
58
59 ceph osd in 0
60 flush_pg_stats
61 wait_for_clean
62 }
63
64 main smoke "$@"