diff options
author | Zuul <zuul@review.opendev.org> | 2023-03-01 00:20:08 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2023-03-01 00:20:08 +0000 |
commit | 0c10907cf8ca61c8c164c7d911365374d66113f2 (patch) | |
tree | fef12024748f1ea88135b9d5ae6999e9572446fb | |
parent | 6f93d828fc317b4e53c27128b24f8d82c914ac3d (diff) | |
parent | d3155552ec0d176aa03410f6d2725b5c4138c976 (diff) | |
download | tempest-0c10907cf8ca61c8c164c7d911365374d66113f2.tar.gz |
Merge "Avoid wait for vol detach in live-migrate tests"
-rw-r--r-- | tempest/api/compute/admin/test_live_migration.py | 3 | ||||
-rw-r--r-- | tempest/api/compute/base.py | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tempest/api/compute/admin/test_live_migration.py b/tempest/api/compute/admin/test_live_migration.py index 1cb8004f5..f7c0dd9e3 100644 --- a/tempest/api/compute/admin/test_live_migration.py +++ b/tempest/api/compute/admin/test_live_migration.py @@ -202,7 +202,8 @@ class LiveMigrationTest(LiveMigrationTestBase): volume = self.create_volume() # Attach the volume to the server - self.attach_volume(server, volume, device='/dev/xvdb') + self.attach_volume(server, volume, device='/dev/xvdb', + wait_for_detach=False) server = self.admin_servers_client.show_server(server_id)['server'] volume_id1 = server["os-extended-volumes:volumes_attached"][0]["id"] self._live_migrate(server_id, target_host, 'ACTIVE') diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py index ea1cddc5f..260d4e05f 100644 --- a/tempest/api/compute/base.py +++ b/tempest/api/compute/base.py @@ -568,7 +568,8 @@ class BaseV2ComputeTest(api_version_utils.BaseMicroversionTest, # is already detached. pass - def attach_volume(self, server, volume, device=None, tag=None): + def attach_volume(self, server, volume, device=None, tag=None, + wait_for_detach=True): """Attaches volume to server and waits for 'in-use' volume status. The volume will be detached when the test tears down. @@ -605,7 +606,7 @@ class BaseV2ComputeTest(api_version_utils.BaseMicroversionTest, # the contents of the console log. The final check of the volume state # should be a no-op by this point and is just added for completeness # when detaching non-multiattach volumes. - if not volume['multiattach']: + if not volume['multiattach'] and wait_for_detach: self.addCleanup( waiters.wait_for_volume_resource_status, self.volumes_client, volume['id'], 'available') |