]> git.proxmox.com Git - ceph.git/blob - ceph/qa/standalone/mon/mon-osdmap-prune.sh
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / qa / standalone / mon / mon-osdmap-prune.sh
1 #!/bin/bash
2
3 source $CEPH_ROOT/qa/standalone/ceph-helpers.sh
4
5 base_test=$CEPH_ROOT/qa/workunits/mon/test_mon_osdmap_prune.sh
6
7 # We are going to open and close a lot of files, and generate a lot of maps
8 # that the osds will need to process. If we don't increase the fd ulimit, we
9 # risk having the osds asserting when handling filestore transactions.
10 ulimit -n 4096
11
12 function run() {
13
14 local dir=$1
15 shift
16
17 export CEPH_MON="127.0.0.1:7115"
18 export CEPH_ARGS
19 CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none --mon-host=$CEPH_MON "
20
21 local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
22 for func in $funcs; do
23 setup $dir || return 1
24 $func $dir || return 1
25 teardown $dir || return 1
26 done
27 }
28
29 function TEST_osdmap_prune() {
30
31 local dir=$1
32
33 run_mon $dir a || return 1
34 run_mgr $dir x || return 1
35 run_osd $dir 0 || return 1
36 run_osd $dir 1 || return 1
37 run_osd $dir 2 || return 1
38
39 sleep 5
40
41 # we are getting OSD_OUT_OF_ORDER_FULL health errors, and it's not clear
42 # why. so, to make the health checks happy, mask those errors.
43 ceph osd set-full-ratio 0.97
44 ceph osd set-backfillfull-ratio 0.97
45
46 ceph config set osd osd_beacon_report_interval 10 || return 1
47 ceph config set mon mon_debug_extra_checks true || return 1
48
49 ceph config set mon mon_min_osdmap_epochs 100 || return 1
50 ceph config set mon mon_osdmap_full_prune_enabled true || return 1
51 ceph config set mon mon_osdmap_full_prune_min 200 || return 1
52 ceph config set mon mon_osdmap_full_prune_interval 10 || return 1
53 ceph config set mon mon_osdmap_full_prune_txsize 100 || return 1
54
55
56 bash -x $base_test || return 1
57
58 return 0
59 }
60
61 main mon-osdmap-prune "$@"
62