Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E8992E7DC for ; Fri, 4 Jan 2013 01:21:11 +0000 (UTC) Received: (qmail 19402 invoked by uid 500); 4 Jan 2013 01:21:11 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 19364 invoked by uid 500); 4 Jan 2013 01:21:11 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 19347 invoked by uid 99); 4 Jan 2013 01:21:11 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jan 2013 01:21:11 +0000 Date: Fri, 4 Jan 2013 01:21:11 +0000 (UTC) From: "Rohit Yadav (JIRA)" To: cloudstack-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (CLOUDSTACK-735) Integration smoke tests: Fix expunge vm test on api_refactoring MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-735?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rohit Yadav closed CLOUDSTACK-735. ---------------------------------- Assignee: Rohit Yadav (was: Prasanna Santhanam) Discussed with Prasanna... Instead of fixing tests, we should maintain back= ward compatibility, hence an incorrect uuid is not thrown as exception but = logged and an empty response would be sent like in 4.0 and before. The fix = was applied in api_refactoring, in ApiDispatcher: commit 8cee441c52281baee69d2614a6fca9408363f484 Author: Rohit Yadav Date: Thu Jan 3 17:17:21 2013 -0800 server: Make ApiDispatcher backward compatible to not throw error on in= correct params =20 Incorrect params are silently ignored in 4.0 and before. The fix would = log the error in debug log, but will continue processing. In case of an issue with uu= id or param an empty response is sent, for ex. in case of deleted entities as well. =20 Signed-off-by: Rohit Yadav =20 > 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 defa= ult.)=20 > Reporter: Rohit Yadav > Assignee: Rohit Yadav > Fix For: 4.1.0 > > > With last test of smoke tests for devcloud on api_refactoring, when an ex= punged vm is listed, marvin raises HTTPError which was a recent change on m= aster (was done so clients like cloudmonkey can display error correctly). T= he bug is that test vm life cycle does not trap the error correctly: > 867 while expunge_cycle > 0: = =20 > 868 list_vm_response =3D list_virtual_machines( = =20 > 869 self.apiclient, = =20 > 870 id=3Dself.small_virt= ual_machine.id =20 > 871 ) = =20 > 872 if list_vm_response: = =20 > 873 time.sleep(expunge_cycle) = =20 > 874 expunge_cycle =3D 0 = =20 > 875 continue=20 > Log: > $ nosetests --with-marvin --marvin-config ../../tools/devcloud/devcloud.c= fg --load -a tags=3D"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 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > ERROR: Test destroy(expunge) Virtual Machine > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Bhaisaab/Work/apache-cloudstack/test/integration/smoke/test_vm_l= ife_cycle.py", line 870, in test_09_expunge_vm > id=3Dself.small_virtual_machine.id > File "/Library/Python/2.7/site-packages/marvin/integration/lib/common.p= y", line 368, in list_virtual_machines > return(apiclient.listVirtualMachines(cmd)) > File "/Library/Python/2.7/site-packages/marvin/cloudstackAPI/cloudstack= APIClient.py", line 473, in listVirtualMachines > response =3D self.connection.make_request(command, response) > File "/Library/Python/2.7/site-packages/marvin/cloudstackConnection.py"= , line 174, in make_request > result =3D 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: { "destroyvirtualmachinere= sponse" : {"jobid":"5435f360-42d3-42e4-a58d-8edb2fb5340a"}, "cloudstack-ver= sion": "4.1.0-SNAPSHOT" } > testclient.testengine.run: INFO: sending command: queryAsyncJobResult {'j= obid': u'5435f360-42d3-42e4-a58d-8edb2fb5340a'} > testclient.testengine.run: INFO: got response: { "queryasyncjobresultresp= onse" : {"accountid":"a5daff59-c646-4709-8ee8-371f7f9d2348","userid":"d63dd= 13f-d1cb-4329-9baf-6b59447d0a3a","cmd":"org.apache.cloudstack.api.command.u= ser.vm.DestroyVMCmd","jobstatus":0,"jobprocstatus":0,"jobresultcode":0,"cre= ated":"2013-01-03T15:15:43-0800","jobid":"5435f360-42d3-42e4-a58d-8edb2fb53= 40a"}, "cloudstack-version": "4.1.0-SNAPSHOT" } > testclient.testengine.run: INFO: sending command: queryAsyncJobResult {'j= obid': u'5435f360-42d3-42e4-a58d-8edb2fb5340a'} > testclient.testengine.run: INFO: got response: { "queryasyncjobresultresp= onse" : {"accountid":"a5daff59-c646-4709-8ee8-371f7f9d2348","userid":"d63dd= 13f-d1cb-4329-9baf-6b59447d0a3a","cmd":"org.apache.cloudstack.api.command.u= ser.vm.DestroyVMCmd","jobstatus":1,"jobprocstatus":0,"jobresultcode":0,"job= resulttype":"object","jobresult":{"virtualmachine":{"id":"c78f9972-07c2-411= 7-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 Linu= x","templatedisplaytext":"tiny Linux","passwordenabled":false,"serviceoffer= ingid":"6de4123b-8fb3-481d-8215-e7caaebdb79d","serviceofferingname":"Small = Instance","cpunumber":1,"cpuspeed":100,"memory":256,"cpuused":"0%","network= kbsread":0,"networkkbswrite":0,"guestosid":"0e7ed9de-98d0-4858-aa45-517e35c= 0af91","rootdeviceid":0,"rootdevicetype":"ROOT","securitygroup":[{"id":"6f1= 90e4b-6b2a-4a71-a523-b4a1ce60dcbf","name":"default","description":"Default = Security Group","account":"test-1IMEO7","ingressrule":[],"egressrule":[],"t= ags":[]}],"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","isd= efault":true,"macaddress":"06:82:dc:00:00:84"}],"hypervisor":"XenServer","i= nstancename":"i-4-5-VM","tags":[],"jobstatus":0}},"created":"2013-01-03T15:= 15:43-0800","jobid":"5435f360-42d3-42e4-a58d-8edb2fb5340a"}, "cloudstack-ve= rsion": "4.1.0-SNAPSHOT" } > testclient.testengine.run: INFO: sending command: listConfigurations {'na= me': 'expunge.delay'} > testclient.testengine.run: INFO: got response: { "listconfigurationsrespo= nse" : { "count":1 ,"configuration" : [ {"category":"Advanced","name":"exp= unge.delay","value":"60"} ] }, "cloudstack-version": "4.1.0-SNAPSHOT" } > testclient.testengine.run: INFO: sending command: listConfigurations {'na= me': 'expunge.interval'} > testclient.testengine.run: INFO: got response: { "listconfigurationsrespo= nse" : { "count":1 ,"configuration" : [ {"category":"Advanced","name":"exp= unge.interval","value":"60"} ] }, "cloudstack-version": "4.1.0-SNAPSHOT" } > testclient.testengine.run: INFO: sending command: listVirtualMachines {'i= d': u'c78f9972-07c2-4117-8e98-c420db8503df'} > testclient.testengine.run: CRITICAL: server returned 431 error code > --------------------- >> end captured logging << --------------------- > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > ERROR: test suite for > ---------------------------------------------------------------------- > 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_l= ife_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/cloudstack= APIClient.py", line 653, in deleteServiceOffering > response =3D self.connection.make_request(command, response) > File "/Library/Python/2.7/site-packages/marvin/cloudstackConnection.py"= , line 174, in make_request > result =3D 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=3D2) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira