ceph/qa/workunits/rados/test_pool_quota.sh
Sage Weil e611937f3e mon: OSDMonitor: add 'osd pool set-quota' command
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-03-29 17:59:35 -07:00

39 lines
639 B
Bash
Executable File

#!/bin/sh -ex
p=`uuidgen`
# objects
ceph osd pool create $p 12
ceph osd pool set-quota $p max_objects 10
for f in `seq 1 10` ; do
rados -p $p put obj$f /etc/passwd
done
sleep 30
rados -p $p put onemore /etc/passwd && exit 1 || true
ceph osd pool set-quota $p max_objects 100
sleep 30
rados -p $p put onemore /etc/passwd
# bytes
ceph osd pool set-quota $p max_bytes 100
sleep 30
rados -p $p put two /etc/passwd && exit 1 || true
ceph osd pool set-quota $p max_bytes 0
ceph osd pool set-quota $p max_objects 0
sleep 30
rados -p $p put three /etc/passwd
# done
ceph osd pool delete $p $p --yes-i-really-really-mean-it
echo OK