]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/rbd-mirror: fix broken ceph_test_rbd_mirror_random_write 39650/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 3 Feb 2021 04:34:18 +0000 (23:34 -0500)
committerNathan Cutler <ncutler@suse.com>
Tue, 23 Feb 2021 20:58:00 +0000 (21:58 +0100)
It appears that commit 6eb8f30a238 broke the test utility and
its failure was masked by the test case that expected a failure
due to a timeout force-killing the app.

Fixes: https://tracker.ceph.com/issues/49117
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 8643b046fb4d5b05b4c75b83f16cd8ccc6a8b0a0)

Conflicts:
qa/workunits/rbd/rbd_mirror_helpers.sh
- no show_diff function in nautilus

qa/workunits/rbd/rbd_mirror_helpers.sh
src/test/rbd_mirror/random_write.cc

index 20b7440e5ec29c3c379a53dad3a0e163ebbf7f84..563e256cdd1b53d4e2695a2d041b4f6824d40472 100755 (executable)
@@ -1002,10 +1002,18 @@ stress_write_image()
     local image=$3
     local duration=$(awk 'BEGIN {srand(); print int(10 * rand()) + 5}')
 
+    set +e
     timeout ${duration}s ceph_test_rbd_mirror_random_write \
-       --cluster ${cluster} ${pool} ${image} \
-       --debug-rbd=20 --debug-journaler=20 \
-       2> ${TEMPDIR}/rbd-mirror-random-write.log || true
+        --cluster ${cluster} ${pool} ${image} \
+        --debug-rbd=20 --debug-journaler=20 \
+        2> ${TEMPDIR}/rbd-mirror-random-write.log
+    error_code=$?
+    set -e
+
+    if [ $error_code -eq 124 ]; then
+        return 0
+    fi
+    return 1
 }
 
 compare_images()
index 34145206da6b334f3eecbcd58799858b2359799c..8a5423f0063fc7ff2a02df5b6cb741d943b4588e 100644 (file)
@@ -164,8 +164,8 @@ int main(int argc, const char **argv)
   }
 
   auto cct = global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT,
-                        CODE_ENVIRONMENT_UTILITY,
-                        CINIT_FLAG_NO_DEFAULT_CONFIG_FILE);
+                         CODE_ENVIRONMENT_UTILITY,
+                         CINIT_FLAG_NO_MON_CONFIG);
 
   if (args.size() < 2) {
     usage();