]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/upgrade: conditionally disable update_features tests 41629/head
authorDeepika <dupadhya@redhat.com>
Mon, 24 May 2021 21:20:39 +0000 (21:20 +0000)
committerDeepika Upadhyay <dupadhya@redhat.com>
Tue, 1 Jun 2021 14:11:42 +0000 (19:41 +0530)
with the recent support for async rbd operations from pacific+ when an
    older client(non async support) goes on upgrade, and simultaneously
    interacts with a newer client which expects the requests to be async,
    experiences hang; considering the return code for request completion to
    be acknowledgement for async request, which then keeps waiting for
    another acknowledgement of request completion.

    this if happens should be a rare only when lockowner is an old client
    and should be deferred if compatibility issues arises.

see also: 541230475d3b25ab18c4eb9bc5011060462594a6(octopus)

Signed-off-by: Deepika <dupadhya@redhat.com>
(cherry picked from commit 9c0b239d70cdeb0c5705fa89fa5aac111152671b)

src/test/librbd/test_notify.py

index 05864512ad7cb8963a4e17a7820ec5587cf77d10..25c5b3f4e4b7c2bbddbd3939c8c93e682a30c5ff 100755 (executable)
@@ -140,21 +140,22 @@ def slave(ioctx):
         assert(not image.is_exclusive_lock_owner())
         assert(list(image.list_snaps()) == [])
 
-        print("update_features")
-        assert((image.features() & RBD_FEATURE_OBJECT_MAP) != 0)
-        image.update_features(RBD_FEATURE_OBJECT_MAP, False)
-        assert(not image.is_exclusive_lock_owner())
-        assert((image.features() & RBD_FEATURE_OBJECT_MAP) == 0)
-        image.update_features(RBD_FEATURE_OBJECT_MAP, True)
-        assert(not image.is_exclusive_lock_owner())
-        assert((image.features() & RBD_FEATURE_OBJECT_MAP) != 0)
-        assert((image.flags() & RBD_FLAG_OBJECT_MAP_INVALID) != 0)
-
         print("rebuild object map")
         image.rebuild_object_map()
         assert(not image.is_exclusive_lock_owner())
         assert((image.flags() & RBD_FLAG_OBJECT_MAP_INVALID) == 0)
 
+        if 'RBD_DISABLE_UPDATE_FEATURES' not in os.environ:
+            print("update_features")
+            assert((image.features() & RBD_FEATURE_OBJECT_MAP) != 0)
+            image.update_features(RBD_FEATURE_OBJECT_MAP, False)
+            assert(not image.is_exclusive_lock_owner())
+            assert((image.features() & RBD_FEATURE_OBJECT_MAP) == 0)
+            image.update_features(RBD_FEATURE_OBJECT_MAP, True)
+            assert(not image.is_exclusive_lock_owner())
+            assert((image.features() & RBD_FEATURE_OBJECT_MAP) != 0)
+            assert((image.flags() & RBD_FLAG_OBJECT_MAP_INVALID) != 0)
+
         print("write")
         data = os.urandom(512)
         image.write(data, 0)