From: Deepika Date: Mon, 24 May 2021 21:20:39 +0000 (+0000) Subject: qa/upgrade: conditionally disable update_features tests X-Git-Tag: v16.2.5~108^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=05c763bd66ae66b5f30b44db2caf92d62c1ba23a;p=ceph.git qa/upgrade: conditionally disable update_features tests 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 (cherry picked from commit 9c0b239d70cdeb0c5705fa89fa5aac111152671b) --- diff --git a/src/test/librbd/test_notify.py b/src/test/librbd/test_notify.py index 05864512ad7cb..25c5b3f4e4b7c 100755 --- a/src/test/librbd/test_notify.py +++ b/src/test/librbd/test_notify.py @@ -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)