]>
git.proxmox.com Git - ceph.git/blob - ceph/qa/standalone/mon/test_pool_quota.sh
4 # Generic pool quota test
10 source $CEPH_ROOT/qa
/standalone
/ceph-helpers.sh
16 export CEPH_MON
="127.0.0.1:17108" # git grep '\<17108\>' : there must be only one
18 CEPH_ARGS
+="--fsid=$(uuidgen) --auth-supported=none "
19 CEPH_ARGS
+="--mon-host=$CEPH_MON "
21 local funcs
=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
22 for func
in $funcs ; do
23 $func $dir ||
return 1
27 function TEST_pool_quota
() {
29 setup
$dir ||
return 1
31 run_mon
$dir a ||
return 1
32 run_osd
$dir 0 ||
return 1
33 run_osd
$dir 1 ||
return 1
34 run_osd
$dir 2 ||
return 1
36 local poolname
=testquoa
37 create_pool
$poolname 20
38 local objects
=`ceph df detail | grep -w $poolname|awk '{print $3}'`
39 local bytes
=`ceph df detail | grep -w $poolname|awk '{print $4}'`
43 if [ $objects != 'N/A' ] ||
[ $bytes != 'N/A' ] ;
48 ceph osd pool set-quota
$poolname max_objects
1000
49 ceph osd pool set-quota
$poolname max_bytes
1024
51 objects
=`ceph df detail | grep -w $poolname|awk '{print $3}'`
52 bytes
=`ceph df detail | grep -w $poolname|awk '{print $4}'`
54 if [ $objects != '1000' ] ||
[ $bytes != '1024' ] ;
59 ceph osd pool delete
$poolname $poolname --yes-i-really-really-mean-it
60 teardown
$dir ||
return 1