incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasanna Santhanam (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CLOUDSTACK-735) Integration smoke tests: Fix expunge vm test on api_refactoring
Date Fri, 04 Jan 2013 00:06:12 GMT

     [ https://issues.apache.org/jira/browse/CLOUDSTACK-735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Prasanna Santhanam resolved CLOUDSTACK-735.
-------------------------------------------

    Resolution: Won't Fix

Below is the response from a 4.0 install of CloudStack:

The uuid below is one that does not exist:
2013-01-03 15:45:53,876 - INFO - testclient.testengine.run - sending command: listVirtualMachines
{'id': u'7fe80ebb-c821-49f9-b10c-d5d0aec52786'}
2013-01-03 15:45:53,887 - INFO - testclient.testengine.run - got response: { "listvirtualmachinesresponse"
: { } }

Instead of throwing an exception iff an entity doesn't exist, return of empty response is
expected.
                
> Integration smoke tests: Fix expunge vm test on api_refactoring
> ---------------------------------------------------------------
>
>                 Key: CLOUDSTACK-735
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-735
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>            Reporter: Rohit Yadav
>            Assignee: Prasanna Santhanam
>             Fix For: 4.1.0
>
>
> With last test of smoke tests for devcloud on api_refactoring, when an expunged vm is
listed, marvin raises HTTPError which was a recent change on master (was done so clients like
cloudmonkey can display error correctly). The bug is that test vm life cycle does not trap
the error correctly:
>  867         while expunge_cycle > 0:                                            
      
>  868             list_vm_response = list_virtual_machines(                          
                                                          
>  869                                                 self.apiclient,                
   
>  870                                                 id=self.small_virtual_machine.id
  
>  871                                                 )                              
   
>  872             if list_vm_response:                                               
   
>  873                 time.sleep(expunge_cycle)                                      
   
>  874                 expunge_cycle = 0                                              
   
>  875                 continue 
> Log:
> $ nosetests --with-marvin --marvin-config ../../tools/devcloud/devcloud.cfg --load -a
tags="devcloud" -w smoke                      [15:05:40]
> Test Deploy Virtual Machine ... ok
> Test Stop Virtual Machine ... ok
> Test Start Virtual Machine ... ok
> Test Reboot Virtual Machine ... ok
> Test destroy Virtual Machine ... ok
> Test recover Virtual Machine ... ok
> Test destroy(expunge) Virtual Machine ... ERROR
> ERROR
> ======================================================================
> ERROR: Test destroy(expunge) Virtual Machine
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/Bhaisaab/Work/apache-cloudstack/test/integration/smoke/test_vm_life_cycle.py",
line 870, in test_09_expunge_vm
>     id=self.small_virtual_machine.id
>   File "/Library/Python/2.7/site-packages/marvin/integration/lib/common.py", line 368,
in list_virtual_machines
>     return(apiclient.listVirtualMachines(cmd))
>   File "/Library/Python/2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
line 473, in listVirtualMachines
>     response = self.connection.make_request(command, response)
>   File "/Library/Python/2.7/site-packages/marvin/cloudstackConnection.py", line 174,
in make_request
>     result = self.make_request_with_auth(commandName, requests)
>   File "/Library/Python/2.7/site-packages/marvin/cloudstackConnection.py", line 88, in
make_request_with_auth
>     raise e
> HTTPError: HTTP Error 431: 431
> -------------------- >> begin captured logging << --------------------
> testclient.testcase.TestVMLifeCycle: DEBUG: Expunge VM-ID: c78f9972-07c2-4117-8e98-c420db8503df
> testclient.testengine.run: INFO: sending command: destroyVirtualMachine {'id': u'c78f9972-07c2-4117-8e98-c420db8503df'}
> testclient.testengine.run: INFO: got response: { "destroyvirtualmachineresponse" : {"jobid":"5435f360-42d3-42e4-a58d-8edb2fb5340a"},
"cloudstack-version": "4.1.0-SNAPSHOT" }
> testclient.testengine.run: INFO: sending command: queryAsyncJobResult {'jobid': u'5435f360-42d3-42e4-a58d-8edb2fb5340a'}
> testclient.testengine.run: INFO: got response: { "queryasyncjobresultresponse" : {"accountid":"a5daff59-c646-4709-8ee8-371f7f9d2348","userid":"d63dd13f-d1cb-4329-9baf-6b59447d0a3a","cmd":"org.apache.cloudstack.api.command.user.vm.DestroyVMCmd","jobstatus":0,"jobprocstatus":0,"jobresultcode":0,"created":"2013-01-03T15:15:43-0800","jobid":"5435f360-42d3-42e4-a58d-8edb2fb5340a"},
"cloudstack-version": "4.1.0-SNAPSHOT" }
> testclient.testengine.run: INFO: sending command: queryAsyncJobResult {'jobid': u'5435f360-42d3-42e4-a58d-8edb2fb5340a'}
> testclient.testengine.run: INFO: got response: { "queryasyncjobresultresponse" : {"accountid":"a5daff59-c646-4709-8ee8-371f7f9d2348","userid":"d63dd13f-d1cb-4329-9baf-6b59447d0a3a","cmd":"org.apache.cloudstack.api.command.user.vm.DestroyVMCmd","jobstatus":1,"jobprocstatus":0,"jobresultcode":0,"jobresulttype":"object","jobresult":{"virtualmachine":{"id":"c78f9972-07c2-4117-8e98-c420db8503df","name":"c78f9972-07c2-4117-8e98-c420db8503df","account":"test-1IMEO7","domainid":"9da53465-269d-4d1b-ad24-ede114e3a039","domain":"ROOT","created":"2013-01-03T15:13:47-0800","state":"Destroyed","haenable":false,"zoneid":"d32a7f4a-c5d3-4973-bb4c-e2c06876abbe","zonename":"MyZone","templateid":"bd24b5ca-6759-4956-88ff-582f440a3a87","templtename":"tiny
Linux","templatedisplaytext":"tiny Linux","passwordenabled":false,"serviceofferingid":"6de4123b-8fb3-481d-8215-e7caaebdb79d","serviceofferingname":"Small
Instance","cpunumber":1,"cpuspeed":100,"memory":256,"cpuused":"0%","networkkbsread":0,"networkkbswrite":0,"guestosid":"0e7ed9de-98d0-4858-aa45-517e35c0af91","rootdeviceid":0,"rootdevicetype":"ROOT","securitygroup":[{"id":"6f190e4b-6b2a-4a71-a523-b4a1ce60dcbf","name":"default","description":"Default
Security Group","account":"test-1IMEO7","ingressrule":[],"egressrule":[],"tags":[]}],"nic":[{"id":"d8f3bb74-6859-4040-9b29-3ca22c0482f2","networkid":"4b949baa-4e35-453c-b77a-8ecbe55a55cd","netmask":"255.255.255.0","gateway":"192.168.56.1","ipaddress":"192.168.56.240","isolationuri":"ec2://untagged","broadcasturi":"vlan://untagged","traffictype":"Guest","type":"Shared","isdefault":true,"macaddress":"06:82:dc:00:00:84"}],"hypervisor":"XenServer","instancename":"i-4-5-VM","tags":[],"jobstatus":0}},"created":"2013-01-03T15:15:43-0800","jobid":"5435f360-42d3-42e4-a58d-8edb2fb5340a"},
"cloudstack-version": "4.1.0-SNAPSHOT" }
> testclient.testengine.run: INFO: sending command: listConfigurations {'name': 'expunge.delay'}
> testclient.testengine.run: INFO: got response: { "listconfigurationsresponse" : { "count":1
,"configuration" : [  {"category":"Advanced","name":"expunge.delay","value":"60"} ] }, "cloudstack-version":
"4.1.0-SNAPSHOT" }
> testclient.testengine.run: INFO: sending command: listConfigurations {'name': 'expunge.interval'}
> testclient.testengine.run: INFO: got response: { "listconfigurationsresponse" : { "count":1
,"configuration" : [  {"category":"Advanced","name":"expunge.interval","value":"60"} ] },
"cloudstack-version": "4.1.0-SNAPSHOT" }
> testclient.testengine.run: INFO: sending command: listVirtualMachines {'id': u'c78f9972-07c2-4117-8e98-c420db8503df'}
> testclient.testengine.run: CRITICAL: server returned 431 error code
> --------------------- >> end captured logging << ---------------------
> ======================================================================
> ERROR: test suite for <class 'integration.smoke.test_vm_life_cycle.TestVMLifeCycle'>
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/Library/Python/2.7/site-packages/nose-1.2.1-py2.7.egg/nose/suite.py", line 227,
in run
>     self.tearDown()
>   File "/Library/Python/2.7/site-packages/nose-1.2.1-py2.7.egg/nose/suite.py", line 350,
in tearDown
>     self.teardownContext(ancestor)
>   File "/Library/Python/2.7/site-packages/nose-1.2.1-py2.7.egg/nose/suite.py", line 366,
in teardownContext
>     try_run(context, names)
>   File "/Library/Python/2.7/site-packages/nose-1.2.1-py2.7.egg/nose/util.py", line 478,
in try_run
>     return func()
>   File "/Bhaisaab/Work/apache-cloudstack/test/integration/smoke/test_vm_life_cycle.py",
line 325, in tearDownClass
>     cleanup_resources(cls.api_client, cls._cleanup)
>   File "/Library/Python/2.7/site-packages/marvin/integration/lib/utils.py", line 106,
in cleanup_resources
>     obj.delete(api_client)
>   File "/Library/Python/2.7/site-packages/marvin/integration/lib/base.py", line 1080,
in delete
>     apiclient.deleteServiceOffering(cmd)
>   File "/Library/Python/2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
line 653, in deleteServiceOffering
>     response = self.connection.make_request(command, response)
>   File "/Library/Python/2.7/site-packages/marvin/cloudstackConnection.py", line 174,
in make_request
>     result = self.make_request_with_auth(commandName, requests)
>   File "/Library/Python/2.7/site-packages/marvin/cloudstackConnection.py", line 88, in
make_request_with_auth
>     raise e
> HTTPError: HTTP Error 431: 431
> -------------------- >> begin captured logging << --------------------
> testclient.testengine.run: INFO: sending command: deleteServiceOffering {'id': u'6de4123b-8fb3-481d-8215-e7caaebdb79d'}
> testclient.testengine.run: CRITICAL: server returned 431 error code
> --------------------- >> end captured logging << ---------------------
> ----------------------------------------------------------------------
> Ran 7 tests in 317.374s
> FAILED (errors=2)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message