]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
suites/rados/singleton-nomsgr/all/cache-fs-trunc.yaml
authorIvo Jimenez <ivo.jimenez@gmail.com>
Thu, 20 Aug 2015 05:24:10 +0000 (22:24 -0700)
committerSage Weil <sage@redhat.com>
Wed, 9 Sep 2015 20:21:39 +0000 (16:21 -0400)
Verify the cache tier doesn't clobber truncate_{seq,size}

suites/rados/singleton-nomsgr/all/cache-fs-trunc.yaml [new file with mode: 0644]

diff --git a/suites/rados/singleton-nomsgr/all/cache-fs-trunc.yaml b/suites/rados/singleton-nomsgr/all/cache-fs-trunc.yaml
new file mode 100644 (file)
index 0000000..f10b3e3
--- /dev/null
@@ -0,0 +1,38 @@
+roles:
+- [mon.0, mds.a, osd.0, osd.1, osd.2, client.0, client.1]
+tasks:
+- install:
+- ceph:
+- exec:
+    client.0:
+    - ceph osd pool create data_cache 4
+    - ceph osd tier add data data_cache
+    - ceph osd tier cache-mode data_cache writeback
+    - ceph osd tier set-overlay data data_cache
+    - ceph osd pool set data_cache hit_set_type bloom
+    - ceph osd pool set data_cache hit_set_count 8
+    - ceph osd pool set data_cache hit_set_period 3600
+    - ceph osd pool set data_cache min_read_recency_for_promote 0
+- ceph-fuse:
+- exec:
+    client.0:
+      - sudo chmod 777 $TESTDIR/mnt.0/
+      - dd if=/dev/urandom of=$TESTDIR/mnt.0/foo bs=1M count=5
+      - ls -al $TESTDIR/mnt.0/foo
+      - truncate --size 0 $TESTDIR/mnt.0/foo
+      - ls -al $TESTDIR/mnt.0/foo
+      - dd if=/dev/urandom of=$TESTDIR/mnt.0/foo bs=1M count=5
+      - ls -al $TESTDIR/mnt.0/foo
+      - cp $TESTDIR/mnt.0/foo /tmp/foo
+      - sync
+      - rados -p data_cache ls -
+      - sleep 10
+      - rados -p data_cache ls -
+      - rados -p data_cache cache-flush-evict-all
+      - rados -p data_cache ls -
+      - sleep 1
+- exec:
+    client.1:
+      - hexdump -C /tmp/foo | head
+      - hexdump -C $TESTDIR/mnt.1/foo | head
+      - cmp $TESTDIR/mnt.1/foo /tmp/foo