[
https://issues.apache.org/jira/browse/CLOUDSTACK-10154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16268095#comment-16268095
]
ASF GitHub Bot commented on CLOUDSTACK-10154:
---------------------------------------------
rhtyd closed pull request #2335: CLOUDSTACK-10154: fixing some smoketests
failures
URL: https://github.com/apache/cloudstack/pull/2335
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
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 @@ def tearDownClass(cls):
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 @@ def test_05_add_annotation_for_invalid_entityType(self):
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 @@ def tearDown(self):
return
def waitForSystemVMAgent(self, vmname):
- timeout = self.services["timeout"]
+ timeout = 120
while True:
list_host_response = list_hosts(
@@ -89,7 +89,7 @@ def waitForSystemVMAgent(self, vmname):
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 @@ def test_06_stop_cpvm(self):
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 @@ def test_06_stop_cpvm(self):
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 @@
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 @@ def test_10_list_volumes(self):
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 @@ def test_10_list_volumes(self):
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
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> test failures in smoketest
> --------------------------
>
> Key: CLOUDSTACK-10154
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10154
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: Boris Stoyanov
>
> The following tests are failing:
> test/integration/smoke/test_deploy_vm_root_resize.py
> test/integration/smoke/test_host_annotations.py
> test/integration/smoke/test_ssvm.py
> test/integration/smoke/test_volumes.py
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)