From 86ae486cb1654ebbfdb853fe1f9497ac6629d1a8 Mon Sep 17 00:00:00 2001 From: lixiaoy1 Date: Fri, 15 Jan 2021 06:17:04 -0500 Subject: [PATCH] qa: add tests for persistent writeback cache Signed-off-by: Li, Xiaoyan --- qa/suites/rbd/persistent-writeback-cache/% | 0 qa/suites/rbd/persistent-writeback-cache/.qa | 1 + qa/suites/rbd/persistent-writeback-cache/1-base | 1 + .../rbd/persistent-writeback-cache/2-cluster/+ | 0 .../rbd/persistent-writeback-cache/2-cluster/.qa | 1 + .../2-cluster/fix-2.yaml | 3 +++ .../2-cluster/openstack.yaml | 4 ++++ .../3-supported-random-distro$ | 1 + .../persistent-writeback-cache/4-pool/cache.yaml | 15 +++++++++++++++ .../5-cache-mode/rwl.yaml | 5 +++++ .../persistent-writeback-cache/6-workloads/.qa | 1 + .../6-workloads/c_api_tests_with_defaults.yaml | 1 + .../6-workloads/fio.yaml | 8 ++++++++ .../6-workloads/qemu_xfstests.yaml | 8 ++++++++ .../6-workloads/recovery.yaml | 10 ++++++++++ 15 files changed, 59 insertions(+) create mode 100644 qa/suites/rbd/persistent-writeback-cache/% create mode 120000 qa/suites/rbd/persistent-writeback-cache/.qa create mode 120000 qa/suites/rbd/persistent-writeback-cache/1-base create mode 100644 qa/suites/rbd/persistent-writeback-cache/2-cluster/+ create mode 120000 qa/suites/rbd/persistent-writeback-cache/2-cluster/.qa create mode 100644 qa/suites/rbd/persistent-writeback-cache/2-cluster/fix-2.yaml create mode 100644 qa/suites/rbd/persistent-writeback-cache/2-cluster/openstack.yaml create mode 120000 qa/suites/rbd/persistent-writeback-cache/3-supported-random-distro$ create mode 100644 qa/suites/rbd/persistent-writeback-cache/4-pool/cache.yaml create mode 100644 qa/suites/rbd/persistent-writeback-cache/5-cache-mode/rwl.yaml create mode 120000 qa/suites/rbd/persistent-writeback-cache/6-workloads/.qa create mode 120000 qa/suites/rbd/persistent-writeback-cache/6-workloads/c_api_tests_with_defaults.yaml create mode 100644 qa/suites/rbd/persistent-writeback-cache/6-workloads/fio.yaml create mode 100644 qa/suites/rbd/persistent-writeback-cache/6-workloads/qemu_xfstests.yaml create mode 100644 qa/suites/rbd/persistent-writeback-cache/6-workloads/recovery.yaml diff --git a/qa/suites/rbd/persistent-writeback-cache/% b/qa/suites/rbd/persistent-writeback-cache/% new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/qa/suites/rbd/persistent-writeback-cache/.qa b/qa/suites/rbd/persistent-writeback-cache/.qa new file mode 120000 index 0000000000000..a602a0353e751 --- /dev/null +++ b/qa/suites/rbd/persistent-writeback-cache/.qa @@ -0,0 +1 @@ +../.qa/ \ No newline at end of file diff --git a/qa/suites/rbd/persistent-writeback-cache/1-base b/qa/suites/rbd/persistent-writeback-cache/1-base new file mode 120000 index 0000000000000..fd10a859de29f --- /dev/null +++ b/qa/suites/rbd/persistent-writeback-cache/1-base @@ -0,0 +1 @@ +../thrash/base \ No newline at end of file diff --git a/qa/suites/rbd/persistent-writeback-cache/2-cluster/+ b/qa/suites/rbd/persistent-writeback-cache/2-cluster/+ new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/qa/suites/rbd/persistent-writeback-cache/2-cluster/.qa b/qa/suites/rbd/persistent-writeback-cache/2-cluster/.qa new file mode 120000 index 0000000000000..a602a0353e751 --- /dev/null +++ b/qa/suites/rbd/persistent-writeback-cache/2-cluster/.qa @@ -0,0 +1 @@ +../.qa/ \ No newline at end of file diff --git a/qa/suites/rbd/persistent-writeback-cache/2-cluster/fix-2.yaml b/qa/suites/rbd/persistent-writeback-cache/2-cluster/fix-2.yaml new file mode 100644 index 0000000000000..dbccecbceaafd --- /dev/null +++ b/qa/suites/rbd/persistent-writeback-cache/2-cluster/fix-2.yaml @@ -0,0 +1,3 @@ +roles: +- [mon.a, mgr.x, osd.0, osd.1] +- [mon.b, mgr.y, osd.2, osd.3, client.0] diff --git a/qa/suites/rbd/persistent-writeback-cache/2-cluster/openstack.yaml b/qa/suites/rbd/persistent-writeback-cache/2-cluster/openstack.yaml new file mode 100644 index 0000000000000..b113e4f2ef7f6 --- /dev/null +++ b/qa/suites/rbd/persistent-writeback-cache/2-cluster/openstack.yaml @@ -0,0 +1,4 @@ +openstack: + - volumes: # attached to each instance + count: 4 + size: 10 # GB diff --git a/qa/suites/rbd/persistent-writeback-cache/3-supported-random-distro$ b/qa/suites/rbd/persistent-writeback-cache/3-supported-random-distro$ new file mode 120000 index 0000000000000..0862b4457b37a --- /dev/null +++ b/qa/suites/rbd/persistent-writeback-cache/3-supported-random-distro$ @@ -0,0 +1 @@ +.qa/distros/supported-random-distro$ \ No newline at end of file diff --git a/qa/suites/rbd/persistent-writeback-cache/4-pool/cache.yaml b/qa/suites/rbd/persistent-writeback-cache/4-pool/cache.yaml new file mode 100644 index 0000000000000..9265e7dd89d71 --- /dev/null +++ b/qa/suites/rbd/persistent-writeback-cache/4-pool/cache.yaml @@ -0,0 +1,15 @@ +overrides: + ceph: + conf: + client: + rbd_persistent_cache_path: /home/ubuntu/cephtest/write_back_cache + rbd_persistent_cache_size: 1073741824 + rbd_plugins: pwl_cache + rbd_default_features: 61 +tasks: +- exec: + client.0: + - "mkdir -m 777 /home/ubuntu/cephtest/write_back_cache" +- exec_on_cleanup: + client.0: + - "rm -rf /home/ubuntu/cephtest/write_back_cache" diff --git a/qa/suites/rbd/persistent-writeback-cache/5-cache-mode/rwl.yaml b/qa/suites/rbd/persistent-writeback-cache/5-cache-mode/rwl.yaml new file mode 100644 index 0000000000000..5aeab26b34947 --- /dev/null +++ b/qa/suites/rbd/persistent-writeback-cache/5-cache-mode/rwl.yaml @@ -0,0 +1,5 @@ +overrides: + ceph: + conf: + client: + rbd_persistent_cache_mode: rwl diff --git a/qa/suites/rbd/persistent-writeback-cache/6-workloads/.qa b/qa/suites/rbd/persistent-writeback-cache/6-workloads/.qa new file mode 120000 index 0000000000000..a602a0353e751 --- /dev/null +++ b/qa/suites/rbd/persistent-writeback-cache/6-workloads/.qa @@ -0,0 +1 @@ +../.qa/ \ No newline at end of file diff --git a/qa/suites/rbd/persistent-writeback-cache/6-workloads/c_api_tests_with_defaults.yaml b/qa/suites/rbd/persistent-writeback-cache/6-workloads/c_api_tests_with_defaults.yaml new file mode 120000 index 0000000000000..9490327251bed --- /dev/null +++ b/qa/suites/rbd/persistent-writeback-cache/6-workloads/c_api_tests_with_defaults.yaml @@ -0,0 +1 @@ +../../librbd/workloads/c_api_tests_with_defaults.yaml \ No newline at end of file diff --git a/qa/suites/rbd/persistent-writeback-cache/6-workloads/fio.yaml b/qa/suites/rbd/persistent-writeback-cache/6-workloads/fio.yaml new file mode 100644 index 0000000000000..f7aecce8aeb1d --- /dev/null +++ b/qa/suites/rbd/persistent-writeback-cache/6-workloads/fio.yaml @@ -0,0 +1,8 @@ +tasks: +- rbd_fio: + client.0: + fio-io-size: 100% + formats: [2] + io-engine: rbd + rw: randwrite + runtime: 600 diff --git a/qa/suites/rbd/persistent-writeback-cache/6-workloads/qemu_xfstests.yaml b/qa/suites/rbd/persistent-writeback-cache/6-workloads/qemu_xfstests.yaml new file mode 100644 index 0000000000000..255b9631e39f8 --- /dev/null +++ b/qa/suites/rbd/persistent-writeback-cache/6-workloads/qemu_xfstests.yaml @@ -0,0 +1,8 @@ +tasks: +- qemu: + client.0: + test: qa/run_xfstests_qemu.sh + type: block + cpus: 4 + memory: 4096 + disks: 3 diff --git a/qa/suites/rbd/persistent-writeback-cache/6-workloads/recovery.yaml b/qa/suites/rbd/persistent-writeback-cache/6-workloads/recovery.yaml new file mode 100644 index 0000000000000..63a0c9dcf2558 --- /dev/null +++ b/qa/suites/rbd/persistent-writeback-cache/6-workloads/recovery.yaml @@ -0,0 +1,10 @@ +tasks: +- rbd.create_image: + client.0: + image_name: testimage + image_size: 10 + image_format: 2 +- exec: + client.0: + - "timeout 10s rbd bench --io-pattern rand --io-type write testimage || true" + - "rbd bench --io-type write --io-pattern rand --io-total 32M testimage" -- 2.47.3