diff options
author | Greg Farnum <greg@inktank.com> | 2013-09-04 13:44:47 -0700 |
---|---|---|
committer | Greg Farnum <greg@inktank.com> | 2013-09-10 15:33:50 -0700 |
commit | ab2506dbfa95948474b27b8f00d393b13c35571a (patch) | |
tree | 92ce9aa1bc64ba5deb079f83e28a43fb868d6d3e | |
parent | 76c343ba1793f5d87d5b036a57422ee855027318 (diff) | |
download | ceph-ab2506dbfa95948474b27b8f00d393b13c35571a.tar.gz |
test: update cache test since OSDs support redirects
Signed-off-by: Greg Farnum <greg@inktank.com>
-rwxr-xr-x | qa/workunits/rados/caching_redirects.sh | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/qa/workunits/rados/caching_redirects.sh b/qa/workunits/rados/caching_redirects.sh index a8eda487246..19b940b5b4c 100755 --- a/qa/workunits/rados/caching_redirects.sh +++ b/qa/workunits/rados/caching_redirects.sh @@ -11,9 +11,9 @@ expect_false() #create pools, set up tier relationship ceph osd pool create base_pool 2 -ceph osd pool create empty_cache 2 +ceph osd pool create partial_cache 2 ceph osd pool create data_cache 2 -ceph osd tier add base_pool empty_cache +ceph osd tier add base_pool partial_cache ceph osd tier add base_pool data_cache # populate base_pool and data_cache with some data @@ -25,6 +25,8 @@ rados -p base_pool put barobj bar.txt # data_cache is backwards so we can tell we read from it rados -p data_cache put fooobj bar.txt rados -p data_cache put barobj foo.txt +# partial_cache gets barobj backwards +rados -p partial_cache put barobj foo.txt # get the objects back before setting a caching pool rados -p base_pool get fooobj tmp.txt @@ -32,20 +34,18 @@ diff -q tmp.txt foo.txt rados -p base_pool get barobj tmp.txt diff -q tmp.txt bar.txt -# set up redirect and make sure we get nothing -ceph osd tier set-overlay base_pool empty_cache -expect_false rados -p base_pool get fooobj tmp.txt -expect_false rados -p base_pool get barobj tmp.txt -#let's write as well -rados -p base_pool put fooobj baz.txt -rados -p base_pool put barobj baz.txt -#and make sure we can look at the cache pool directly -rados -p empty_cache get fooobj tmp.txt -diff -q tmp.txt baz.txt +# set up redirect and make sure we get redirect-based results +ceph osd tier set-overlay base_pool partial_cache +ceph osd tier cache-mode partial_cache writeback +rados -p base_pool get fooobj tmp.txt +diff -q tmp.txt foo.txt +rados -p base_pool get barobj tmp.txt +diff -q tmp.txt foo.txt # switch cache pools and make sure contents differ ceph osd tier remove-overlay base_pool ceph osd tier set-overlay base_pool data_cache +ceph osd tier cache-mode data_cache writeback rados -p base_pool get fooobj tmp.txt diff -q tmp.txt bar.txt rados -p base_pool get barobj tmp.txt |