mirror of
https://github.com/ceph/ceph
synced 2025-02-20 09:27:35 +00:00
qa/workunits/rados: test cache-{flush,evict,flush-evict-all}
Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
71cd4a2278
commit
ea519b48c0
34
qa/workunits/rados/caching_redirects.sh
Executable file → Normal file
34
qa/workunits/rados/caching_redirects.sh
Executable file → Normal file
@ -78,4 +78,36 @@ expect_false rados -p base_pool get bazobj tmp.txt
|
||||
rados -p empty_cache ls > tmp.txt
|
||||
expect_false diff -q tmp.txt empty.txt
|
||||
rados -p base_pool ls > tmp2.txt
|
||||
diff -q tmp.txt tmp2.txt
|
||||
diff -q tmp.txt tmp2.txt
|
||||
|
||||
|
||||
## set of base, cache
|
||||
ceph osd pool create base 8
|
||||
ceph osd pool create cache 8
|
||||
|
||||
ceph osd tier add base cache
|
||||
ceph osd tier cache-mode cache writeback
|
||||
ceph osd tier set-overlay base cache
|
||||
|
||||
# cache-flush, cache-evict
|
||||
rados -p base put foo /etc/passwd
|
||||
expect_false rados -p base cache-evict foo
|
||||
rados -p base cache-flush foo
|
||||
rados -p base cache-evict foo
|
||||
rados -p cache ls - | wc -l | grep 0
|
||||
|
||||
# cache-flush-evict-all
|
||||
rados -p base put bar /etc/passwd
|
||||
rados -p cache ls - | wc -l | grep 1
|
||||
rados -p base cache-flush-evict-all
|
||||
rados -p cache ls - | wc -l | grep 0
|
||||
|
||||
# cleanup
|
||||
ceph osd tier remove-overlay base
|
||||
ceph osd tier cache-mode cache none
|
||||
ceph osd tier remove base cache
|
||||
|
||||
ceph osd pool delete cache cache --yes-i-really-really-mean-it
|
||||
ceph osd pool delete cache base --yes-i-really-really-mean-it
|
||||
|
||||
echo OK
|
Loading…
Reference in New Issue
Block a user