]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librbd/test_notify.py: don't disable feature in slave 14751/head
authorMykola Golub <mgolub@mirantis.com>
Mon, 24 Apr 2017 14:23:21 +0000 (16:23 +0200)
committerMykola Golub <mgolub@mirantis.com>
Mon, 24 Apr 2017 14:23:21 +0000 (16:23 +0200)
On jewel it will have stolen the exclusive lock. Instead, ensure that
object map and fast diff are already disabled on the clone before the
start of the test.

Fixes: http://tracker.ceph.com/issues/19716
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
src/test/librbd/test_notify.py

index 6571935f961fab5bbc56c8c0fd0185410440099c..b44ef0cab302bf88050fe6b89b8983fe48c03542 100755 (executable)
@@ -64,6 +64,7 @@ def master(ioctx):
         image.create_snap('snap1')
         image.protect_snap('snap1')
 
+    features = features & ~(RBD_FEATURE_OBJECT_MAP | RBD_FEATURE_FAST_DIFF)
     RBD().clone(ioctx, PARENT_IMG_NAME, 'snap1', ioctx, CLONE_IMG_NAME,
                 features=features)
     with Image(ioctx, CLONE_IMG_NAME) as image:
@@ -141,10 +142,7 @@ def slave(ioctx):
         assert(list(image.list_snaps()) == [])
 
         print("rebuild object map")
-        features = image.features() & (
-                RBD_FEATURE_OBJECT_MAP | RBD_FEATURE_FAST_DIFF)
-        if features:
-            image.update_features(features, False)
+        assert((image.features() & RBD_FEATURE_OBJECT_MAP) == 0)
         image.update_features(RBD_FEATURE_OBJECT_MAP, True)
         assert((image.flags() & RBD_FLAG_OBJECT_MAP_INVALID) != 0)
         image.rebuild_object_map()