mirror of
https://github.com/ceph/ceph
synced 2025-01-03 01:22:53 +00:00
Merge pull request #41514 from ideepika/wip-49592-upgrade
qa/upgrade: conditionally disable update_features tests Reviewed-by: Kefu Chai <kchai@redhat.com> Reviewed-by: Mykola Golub <mgolub@suse.com>
This commit is contained in:
commit
109f0b3c05
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user