diff --git a/test/integration/smoke/test_deploy_vm_root_resize.py b/test/integration/smoke/test_deploy_vm_root_resize.py index a41d29f4c18..4855099917f 100755 --- a/test/integration/smoke/test_deploy_vm_root_resize.py +++ b/test/integration/smoke/test_deploy_vm_root_resize.py @@ -155,6 +155,13 @@ class TestDeployVmRootSize(cloudstackTestCase): Configurations.update(cls.api_client, "vmware.root.disk.controller", value=cls.defaultdiskcontroller) + StoragePool.update(cls.api_client, id=cls.storageID, + tags="") + cls.restartServer() + + #Giving 30 seconds to management to warm-up, + #Experienced failures when trying to deploy a VM exactly when management came up + time.sleep(30) cleanup_resources(cls.api_client, cls._cleanup) except Exception as e: diff --git a/test/integration/smoke/test_host_annotations.py b/test/integration/smoke/test_host_annotations.py index 91c3409d27d..9ce2586c812 100644 --- a/test/integration/smoke/test_host_annotations.py +++ b/test/integration/smoke/test_host_annotations.py @@ -175,4 +175,3 @@ class TestHostAnnotations(cloudstackTestCase): else: self.fail("AddAnnotation is allowed for on an unknown entityType") - return self.added_annotations[-1] diff --git a/test/integration/smoke/test_ssvm.py b/test/integration/smoke/test_ssvm.py index 48512e2b9bf..616f8b38d24 100644 --- a/test/integration/smoke/test_ssvm.py +++ b/test/integration/smoke/test_ssvm.py @@ -75,7 +75,7 @@ class TestSSVMs(cloudstackTestCase): return def waitForSystemVMAgent(self, vmname): - timeout = self.services["timeout"] + timeout = 120 while True: list_host_response = list_hosts( @@ -89,7 +89,7 @@ class TestSSVMs(cloudstackTestCase): if timeout == 0: raise Exception("Timed out waiting for SSVM agent to be Up") - time.sleep(self.services["sleep"]) + time.sleep(1) timeout = timeout - 1 @attr( @@ -798,7 +798,7 @@ class TestSSVMs(cloudstackTestCase): cmd.id = cpvm.id self.apiclient.stopSystemVm(cmd) - timeout = self.services["timeout"] + timeout = 120 while True: list_cpvm_response = list_ssvms( self.apiclient, @@ -810,7 +810,7 @@ class TestSSVMs(cloudstackTestCase): if timeout == 0: raise Exception("List CPVM call failed!") - time.sleep(self.services["sleep"]) + time.sleep(1) timeout = timeout - 1 cpvm_response = list_cpvm_response[0] diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py index 588b7624792..4e9e0777fac 100644 --- a/test/integration/smoke/test_volumes.py +++ b/test/integration/smoke/test_volumes.py @@ -24,7 +24,8 @@ from marvin.cloudstackAPI import (deleteVolume, resizeVolume) #from marvin.sshClient import SshClient from marvin.lib.utils import (cleanup_resources, - format_volume_to_ext3) + format_volume_to_ext3, + wait_until) from marvin.lib.base import (ServiceOffering, VirtualMachine, Account, @@ -814,7 +815,7 @@ class TestVolumes(cloudstackTestCase): host = Host.list( self.apiclient, type='Routing', - virtualmachineid=list_vm.id + id=list_vm.hostid )[0] list_pods = get_pod(self.apiclient, self.zone.id, host.podid) @@ -857,15 +858,20 @@ class TestVolumes(cloudstackTestCase): self.assertEqual(root_volume.podname, list_pods.name) def wait_for_attributes_and_return_root_vol(self): - - for i in range(60): + def checkVolumeResponse(): list_volume_response = Volume.list( self.apiClient, virtualmachineid=self.virtual_machine.id, type='ROOT', listall=True ) - if list_volume_response[0].virtualsize is not None: - return list_volume_response[0] - time.sleep(1) + if isinstance(list_volume_response, list) and list_volume_response[0].virtualsize is not None: + return True, list_volume_response[0] + return False, None + + # sleep interval is 1s, retries is 360, this will sleep atmost 360 seconds, or 6 mins + res, response = wait_until(1, 360, checkVolumeResponse) + if not res: + self.fail("Failed to return root volume response") + return response