]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/test_pools.sh
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / test / test_pools.sh
1 #!/usr/bin/env bash
2 set -x
3
4 #
5 # Test pools
6 #
7
8 # Includes
9 source "`dirname $0`/test_common.sh"
10
11 # Functions
12 setup() {
13 export CEPH_NUM_OSD=$1
14
15 # Start ceph
16 ./stop.sh
17
18 ./vstart.sh -d -n || die "vstart failed"
19 }
20
21 test629_impl() {
22 # create the pool
23 ./ceph -c ./ceph.conf osd pool create foo 8 || die "pool create failed"
24
25 # Write lots and lots of objects
26 write_objects 1 1 10 1000000 foo
27
28 # Take down first osd
29 stop_osd 0
30
31 # Now degraded PGs should exist
32 poll_cmd "./ceph pg debug degraded_pgs_exist" TRUE 3 120
33
34 # delete the pool
35 ./ceph -c ./ceph.conf osd pool rm foo foo --yes-i-really-really-mean-it || die "pool rm failed"
36
37 # make sure the system is stable
38 sleep 10
39 }
40
41 test629(){
42 setup 3
43 test629_impl
44 }
45
46 run() {
47 test629 || die "test failed"
48 }
49
50 $@