]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/suite/rbd: simple migration import test case
authorJason Dillaman <dillaman@redhat.com>
Mon, 26 Oct 2020 18:47:17 +0000 (14:47 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 3 Nov 2020 00:58:55 +0000 (19:58 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
17 files changed:
qa/suites/rbd/migration/% [new file with mode: 0644]
qa/suites/rbd/migration/.qa [new symlink]
qa/suites/rbd/migration/1-base [new symlink]
qa/suites/rbd/migration/2-clusters/+ [new file with mode: 0644]
qa/suites/rbd/migration/2-clusters/.qa [new symlink]
qa/suites/rbd/migration/2-clusters/fixed-3.yaml [new symlink]
qa/suites/rbd/migration/2-clusters/openstack.yaml [new file with mode: 0644]
qa/suites/rbd/migration/3-objectstore [new symlink]
qa/suites/rbd/migration/4-supported-random-distro$ [new symlink]
qa/suites/rbd/migration/5-pool/.qa [new symlink]
qa/suites/rbd/migration/5-pool/ec-data-pool.yaml [new file with mode: 0644]
qa/suites/rbd/migration/5-pool/none.yaml [new file with mode: 0644]
qa/suites/rbd/migration/5-pool/replicated-data-pool.yaml [new file with mode: 0644]
qa/suites/rbd/migration/6-prepare/raw-file.yaml [new file with mode: 0644]
qa/suites/rbd/migration/7-io-workloads/qemu_xfstests.yaml [new file with mode: 0644]
qa/suites/rbd/migration/8-migrate-workloads/execute.yaml [new file with mode: 0644]
qa/suites/rbd/migration/9-cleanup/cleanup.yaml [new file with mode: 0644]

diff --git a/qa/suites/rbd/migration/% b/qa/suites/rbd/migration/%
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/qa/suites/rbd/migration/.qa b/qa/suites/rbd/migration/.qa
new file mode 120000 (symlink)
index 0000000..a602a03
--- /dev/null
@@ -0,0 +1 @@
+../.qa/
\ No newline at end of file
diff --git a/qa/suites/rbd/migration/1-base b/qa/suites/rbd/migration/1-base
new file mode 120000 (symlink)
index 0000000..fd10a85
--- /dev/null
@@ -0,0 +1 @@
+../thrash/base
\ No newline at end of file
diff --git a/qa/suites/rbd/migration/2-clusters/+ b/qa/suites/rbd/migration/2-clusters/+
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/qa/suites/rbd/migration/2-clusters/.qa b/qa/suites/rbd/migration/2-clusters/.qa
new file mode 120000 (symlink)
index 0000000..a602a03
--- /dev/null
@@ -0,0 +1 @@
+../.qa/
\ No newline at end of file
diff --git a/qa/suites/rbd/migration/2-clusters/fixed-3.yaml b/qa/suites/rbd/migration/2-clusters/fixed-3.yaml
new file mode 120000 (symlink)
index 0000000..f75a848
--- /dev/null
@@ -0,0 +1 @@
+.qa/clusters/fixed-3.yaml
\ No newline at end of file
diff --git a/qa/suites/rbd/migration/2-clusters/openstack.yaml b/qa/suites/rbd/migration/2-clusters/openstack.yaml
new file mode 100644 (file)
index 0000000..9c39c7e
--- /dev/null
@@ -0,0 +1,8 @@
+openstack:
+  - machine:
+      disk: 40 # GB
+      ram: 30000 # MB
+      cpus: 1
+    volumes: # attached to each instance
+      count: 4
+      size: 30 # GB
diff --git a/qa/suites/rbd/migration/3-objectstore b/qa/suites/rbd/migration/3-objectstore
new file mode 120000 (symlink)
index 0000000..c40bd32
--- /dev/null
@@ -0,0 +1 @@
+.qa/objectstore
\ No newline at end of file
diff --git a/qa/suites/rbd/migration/4-supported-random-distro$ b/qa/suites/rbd/migration/4-supported-random-distro$
new file mode 120000 (symlink)
index 0000000..0862b44
--- /dev/null
@@ -0,0 +1 @@
+.qa/distros/supported-random-distro$
\ No newline at end of file
diff --git a/qa/suites/rbd/migration/5-pool/.qa b/qa/suites/rbd/migration/5-pool/.qa
new file mode 120000 (symlink)
index 0000000..a602a03
--- /dev/null
@@ -0,0 +1 @@
+../.qa/
\ No newline at end of file
diff --git a/qa/suites/rbd/migration/5-pool/ec-data-pool.yaml b/qa/suites/rbd/migration/5-pool/ec-data-pool.yaml
new file mode 100644 (file)
index 0000000..f39a5bb
--- /dev/null
@@ -0,0 +1,24 @@
+tasks:
+- exec:
+    client.0:
+      - sudo ceph osd erasure-code-profile set teuthologyprofile crush-failure-domain=osd m=1 k=2
+      - sudo ceph osd pool create datapool 4 4 erasure teuthologyprofile
+      - sudo ceph osd pool set datapool allow_ec_overwrites true
+      - rbd pool init datapool
+
+overrides:
+  thrashosds:
+    bdev_inject_crash: 2
+    bdev_inject_crash_probability: .5
+  ceph:
+    fs: xfs
+    conf:
+      client:
+        rbd default data pool: datapool
+      osd: # force bluestore since it's required for ec overwrites
+        osd objectstore: bluestore
+        bluestore block size: 96636764160
+        enable experimental unrecoverable data corrupting features: "*"
+        osd debug randomize hobject sort order: false
+# this doesn't work with failures bc the log writes are not atomic across the two backends
+#        bluestore bluefs env mirror: true
diff --git a/qa/suites/rbd/migration/5-pool/none.yaml b/qa/suites/rbd/migration/5-pool/none.yaml
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/qa/suites/rbd/migration/5-pool/replicated-data-pool.yaml b/qa/suites/rbd/migration/5-pool/replicated-data-pool.yaml
new file mode 100644 (file)
index 0000000..c5647db
--- /dev/null
@@ -0,0 +1,11 @@
+tasks:
+- exec:
+    client.0:
+      - sudo ceph osd pool create datapool 4
+      - rbd pool init datapool
+
+overrides:
+  ceph:
+    conf:
+      client:
+        rbd default data pool: datapool
diff --git a/qa/suites/rbd/migration/6-prepare/raw-file.yaml b/qa/suites/rbd/migration/6-prepare/raw-file.yaml
new file mode 100644 (file)
index 0000000..0035534
--- /dev/null
@@ -0,0 +1,10 @@
+tasks:
+  - exec:
+      client.0:
+        - mkdir /home/ubuntu/cephtest/migration
+        - wget -nv -O /home/ubuntu/cephtest/migration/base.client.0.qcow2 http://download.ceph.com/qa/ubuntu-12.04.qcow2
+        - qemu-img convert -f qcow2 -O raw /home/ubuntu/cephtest/migration/base.client.0.qcow2 /home/ubuntu/cephtest/migration/base.client.0.raw
+        - dd if=/dev/zero of=/home/ubuntu/cephtest/migration/empty.raw count=1 bs=1G
+        - echo '{"type":"raw","stream":{"type":"file","file_path":"/home/ubuntu/cephtest/migration/base.client.0.raw"}}' | rbd migration prepare --import-only --source-spec-path - client.0.0
+        - rbd migration prepare --import-only --source-spec '{"type":"raw","stream":{"type":"file","file_path":"/home/ubuntu/cephtest/migration/empty.raw"}}' client.0.1
+        - rbd migration prepare --import-only --source-spec '{"type":"raw","stream":{"type":"file","file_path":"/home/ubuntu/cephtest/migration/empty.raw"}}' client.0.2
diff --git a/qa/suites/rbd/migration/7-io-workloads/qemu_xfstests.yaml b/qa/suites/rbd/migration/7-io-workloads/qemu_xfstests.yaml
new file mode 100644 (file)
index 0000000..2617a41
--- /dev/null
@@ -0,0 +1,15 @@
+io_workload:
+  sequential:
+    - qemu:
+        client.0:
+          clone: true
+          type: block
+          disks:
+            - action: none
+              image_name: client.0.0
+            - action: none
+              image_name: client.0.1
+            - action: none
+              image_name: client.0.2
+          test: qa/run_xfstests_qemu.sh
+exclude_arch: armv7l
diff --git a/qa/suites/rbd/migration/8-migrate-workloads/execute.yaml b/qa/suites/rbd/migration/8-migrate-workloads/execute.yaml
new file mode 100644 (file)
index 0000000..d7735c4
--- /dev/null
@@ -0,0 +1,14 @@
+tasks:
+  - parallel:
+      - io_workload
+      - migrate_workload
+migrate_workload:
+  sequential:
+    - exec:
+        client.0:
+          - sleep 60
+          - rbd migration execute client.0.0
+          - sleep 60
+          - rbd migration commit client.0.0
+          - sleep 60
+          - rbd migration execute client.0.1
diff --git a/qa/suites/rbd/migration/9-cleanup/cleanup.yaml b/qa/suites/rbd/migration/9-cleanup/cleanup.yaml
new file mode 100644 (file)
index 0000000..18c2bb5
--- /dev/null
@@ -0,0 +1,4 @@
+tasks:
+  - exec:
+      client.0:
+        - rm -rf /home/ubuntu/cephtest/migration