]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/test/librbd/test_notify.py
import quincy 17.2.0
[ceph.git] / ceph / src / test / librbd / test_notify.py
index 25c5b3f4e4b7c2bbddbd3939c8c93e682a30c5ff..4e929d74fa46585aaec58242aa95b79e05e0bae1 100755 (executable)
@@ -140,11 +140,6 @@ def slave(ioctx):
         assert(not image.is_exclusive_lock_owner())
         assert(list(image.list_snaps()) == [])
 
-        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)
@@ -155,6 +150,13 @@ def slave(ioctx):
             assert(not image.is_exclusive_lock_owner())
             assert((image.features() & RBD_FEATURE_OBJECT_MAP) != 0)
             assert((image.flags() & RBD_FLAG_OBJECT_MAP_INVALID) != 0)
+        else:
+            print("skipping update_features")
+
+        print("rebuild object map")
+        image.rebuild_object_map()
+        assert(not image.is_exclusive_lock_owner())
+        assert((image.flags() & RBD_FLAG_OBJECT_MAP_INVALID) == 0)
 
         print("write")
         data = os.urandom(512)