diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2024-09-03 17:03:55 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2024-09-06 14:14:12 +0200 |
commit | 3260b8fbea9257f12eb04a59af2ebb6f46042d82 (patch) | |
tree | 09c42ad64eee0e2c7af6dc4be158d09180413c3d /qa/suites/rbd/migration | |
parent | librbd/migration/NBDStream: call nbd_shutdown() in close() (diff) | |
download | ceph-3260b8fbea9257f12eb04a59af2ebb6f46042d82.tar.xz ceph-3260b8fbea9257f12eb04a59af2ebb6f46042d82.zip |
qa/suites/rbd: add snippets for migration import from NBD
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | qa/suites/rbd/migration/6-prepare/qcow2-nbd.yaml | 12 | ||||
-rw-r--r-- | qa/suites/rbd/migration/6-prepare/raw-nbd.yaml | 13 | ||||
-rw-r--r-- | qa/suites/rbd/migration/9-cleanup/cleanup.yaml | 1 |
3 files changed, 26 insertions, 0 deletions
diff --git a/qa/suites/rbd/migration/6-prepare/qcow2-nbd.yaml b/qa/suites/rbd/migration/6-prepare/qcow2-nbd.yaml new file mode 100644 index 00000000000..b0e8af4d933 --- /dev/null +++ b/qa/suites/rbd/migration/6-prepare/qcow2-nbd.yaml @@ -0,0 +1,12 @@ +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 create -f qcow2 /home/ubuntu/cephtest/migration/empty.qcow2 1G + - qemu-nbd -f qcow2 --read-only --shared 10 --persistent --fork /home/ubuntu/cephtest/migration/base.client.0.qcow2 + - qemu-nbd -f qcow2 --read-only --shared 10 --persistent --fork --socket /home/ubuntu/cephtest/migration/qemu-nbd-empty /home/ubuntu/cephtest/migration/empty.qcow2 + - chmod 0777 /home/ubuntu/cephtest/migration/qemu-nbd-empty + - echo '{"type":"raw","stream":{"type":"nbd","uri":"nbd://localhost"}}' | rbd migration prepare --import-only --source-spec-path - client.0.0 + - rbd migration prepare --import-only --source-spec '{"type":"raw","stream":{"type":"nbd","uri":"nbd+unix:///?socket=/home/ubuntu/cephtest/migration/qemu-nbd-empty"}}' client.0.1 + - rbd migration prepare --import-only --source-spec '{"type":"raw","stream":{"type":"nbd","uri":"nbd+unix:///?socket=/home/ubuntu/cephtest/migration/qemu-nbd-empty"}}' client.0.2 diff --git a/qa/suites/rbd/migration/6-prepare/raw-nbd.yaml b/qa/suites/rbd/migration/6-prepare/raw-nbd.yaml new file mode 100644 index 00000000000..d5c2e60fed9 --- /dev/null +++ b/qa/suites/rbd/migration/6-prepare/raw-nbd.yaml @@ -0,0 +1,13 @@ +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 + - qemu-nbd -f raw --read-only --shared 10 --persistent --fork /home/ubuntu/cephtest/migration/base.client.0.raw + - qemu-nbd -f raw --read-only --shared 10 --persistent --fork --socket /home/ubuntu/cephtest/migration/qemu-nbd-empty /home/ubuntu/cephtest/migration/empty.raw + - chmod 0777 /home/ubuntu/cephtest/migration/qemu-nbd-empty + - echo '{"type":"raw","stream":{"type":"nbd","uri":"nbd://localhost"}}' | rbd migration prepare --import-only --source-spec-path - client.0.0 + - rbd migration prepare --import-only --source-spec '{"type":"raw","stream":{"type":"nbd","uri":"nbd+unix:///?socket=/home/ubuntu/cephtest/migration/qemu-nbd-empty"}}' client.0.1 + - rbd migration prepare --import-only --source-spec '{"type":"raw","stream":{"type":"nbd","uri":"nbd+unix:///?socket=/home/ubuntu/cephtest/migration/qemu-nbd-empty"}}' client.0.2 diff --git a/qa/suites/rbd/migration/9-cleanup/cleanup.yaml b/qa/suites/rbd/migration/9-cleanup/cleanup.yaml index 18c2bb5f4c4..1d724d09086 100644 --- a/qa/suites/rbd/migration/9-cleanup/cleanup.yaml +++ b/qa/suites/rbd/migration/9-cleanup/cleanup.yaml @@ -1,4 +1,5 @@ tasks: - exec: client.0: + - pkill -9 qemu-nbd || true - rm -rf /home/ubuntu/cephtest/migration |