From a64a3fd9183f183ab649b69457e5412b1ada91c7 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Thu, 29 Jan 2026 21:41:03 +0100 Subject: [PATCH] qa/workunits/rbd: reduce randomized sleeps in live import tests These tests were tuned for slower hardware than what we have now. Currently "rbd migration execute" always finishes (successfully) before the NBD server is killed. Fixes: https://tracker.ceph.com/issues/74669 Signed-off-by: Ilya Dryomov (cherry picked from commit 592e3a9846b130c7321481f8b2bf9dba2fb05195) Conflicts: qa/workunits/rbd/cli_migration.sh [ commit afc89fdde80f ("qa/workunits/rbd: add test_import_nbd_stream_disconnected()") was originally skipped due to NBD stream not being in squid at the time ] --- .../rbd/cli/workloads/rbd_cli_migration.yaml | 8 +++ qa/workunits/rbd/cli_migration.sh | 64 +++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/qa/suites/rbd/cli/workloads/rbd_cli_migration.yaml b/qa/suites/rbd/cli/workloads/rbd_cli_migration.yaml index b04ac08f7b4..96845dce436 100644 --- a/qa/suites/rbd/cli/workloads/rbd_cli_migration.yaml +++ b/qa/suites/rbd/cli/workloads/rbd_cli_migration.yaml @@ -1,3 +1,11 @@ +overrides: + install: + extra_system_packages: + rpm: + - qemu-kvm-block-rbd + deb: + - qemu-block-extra + - qemu-utils tasks: - workunit: clients: diff --git a/qa/workunits/rbd/cli_migration.sh b/qa/workunits/rbd/cli_migration.sh index b543bd383b6..dd6e6b70e26 100755 --- a/qa/workunits/rbd/cli_migration.sh +++ b/qa/workunits/rbd/cli_migration.sh @@ -571,6 +571,68 @@ EOF kill_nbd_server } +test_import_nbd_stream_disconnected() { + local dest_image=$1 + local migration_execute_pid + + dd if=/dev/urandom of=${TEMPDIR}/large.raw bs=1M count=20480 + qemu-nbd -f raw --read-only --shared 10 --persistent --fork \ + ${TEMPDIR}/large.raw + + cat > ${TEMPDIR}/spec.json <&1 | wc -l | grep -v '^0$' && echo "nonempty rbd pool, aborting! run this script on an empty test cluster only." && exit 1 @@ -589,4 +651,6 @@ test_import_nbd_stream_qcow2 ${IMAGE2} ${IMAGE3} test_import_raw_format ${IMAGE1} ${IMAGE2} test_import_nbd_stream_raw ${IMAGE1} ${IMAGE2} +test_import_nbd_stream_disconnected ${IMAGE2} + echo OK -- 2.47.3