]> git.proxmox.com Git - ceph.git/blame - ceph/src/test/test_pools.sh
buildsys: switch source download to quincy
[ceph.git] / ceph / src / test / test_pools.sh
CommitLineData
11fdf7f2
TL
1#!/usr/bin/env bash
2set -x
7c673cae
FG
3
4#
5# Test pools
6#
7
8# Includes
9source "`dirname $0`/test_common.sh"
10
11# Functions
12setup() {
13 export CEPH_NUM_OSD=$1
14
15 # Start ceph
16 ./stop.sh
17
18 ./vstart.sh -d -n || die "vstart failed"
19}
20
21test629_impl() {
22 # create the pool
11fdf7f2 23 ./ceph -c ./ceph.conf osd pool create foo 8 || die "pool create failed"
7c673cae
FG
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
11fdf7f2 35 ./ceph -c ./ceph.conf osd pool rm foo foo --yes-i-really-really-mean-it || die "pool rm failed"
7c673cae
FG
36
37 # make sure the system is stable
38 sleep 10
39}
40
41test629(){
42 setup 3
43 test629_impl
44}
45
46run() {
47 test629 || die "test failed"
48}
49
50$@