[
https://issues.apache.org/jira/browse/CLOUDSTACK-5113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13872274#comment-13872274
]
Rayees Namathponnan commented on CLOUDSTACK-5113:
-------------------------------------------------
test case integration/component/test_non_contiguous_vlan.py failing after this
change
"listtemplatesresponse" : { "count":1 ,"template" : [
{"id":"8d8c9f32-7d7a-11e3-9c62-52b2d980df8a","name":"CentOS 5.3(64-bit) no GUI
(vSphere)","displaytext":"CentOS 5.3(64-bit) no GUI
(vSphere)","ispublic":true,"created":"2014-01-14T16:48:12-0800","isready":true,"passwordenabled":false,"format":"OVA","isfeatured":true,"crossZones":true,"ostypeid":"8d931a60-7d7a-11e3-9c62-52b2d980df8a","ostypename":"CentOS
5.3
(64-bit)","account":"system","zoneid":"cd9dab8b-c842-489c-8007-395b723f4b30","zonename":"Adv-VMware-Zone1","status":"Download
Complete","size":2147483648,"templatetype":"BUILTIN","hypervisor":"VMware","domain":"ROOT","domainid":"8d888582-7d7a-11e3-9c62-52b2d980df8a","isextractable":true,"checksum":"855be0d95c60e7abcd73e54a7ac38038","tags":[],"sshkeyenabled":false,"isdynamicallyscalable":false}
] } }
CSLog: CRITICAL: EXCEPTION: None: Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/nose/suite.py", line 208, in run
self.setUp()
File "/usr/local/lib/python2.7/site-packages/nose/suite.py", line 291, in
setUp
self.setupContext(ancestor)
File "/usr/local/lib/python2.7/site-packages/nose/suite.py", line 314, in
setupContext
try_run(context, names)
File "/usr/local/lib/python2.7/site-packages/nose/util.py", line 469, in
try_run
return func()
File
"/data/Repo2/qa/cloudstack/test/integration/component/test_non_contiguous_vlan.py",
line 107, in setUpClass
cls.services["ostype"]
File
"/usr/local/lib/python2.7/site-packages/marvin/integration/lib/common.py", line
244, in get_template
"ready state: %s" %(templatetype, ostypeid))
Exception: Exception: Failed to find template of type BUILTIN with OSTypeID and
which is in ready state: 8dbbe486-7d7a-11e3-9c62-52b2d980df8a
--------------------- >> end captured logging << ---------------------
Stacktrace
File "/usr/local/lib/python2.7/site-packages/nose/suite.py", line 208, in run
self.setUp()
File "/usr/local/lib/python2.7/site-packages/nose/suite.py", line 291, in
setUp
self.setupContext(ancestor)
File "/usr/local/lib/python2.7/site-packages/nose/suite.py", line 314, in
setupContext
try_run(context, names)
File "/usr/local/lib/python2.7/site-packages/nose/util.py", line 469, in
try_run
return func()
File
"/data/Repo2/qa/cloudstack/test/integration/component/test_non_contiguous_vlan.py",
line 107, in setUpClass
cls.services["ostype"]
File
"/usr/local/lib/python2.7/site-packages/marvin/integration/lib/common.py", line
244, in get_template
"ready state: %s" %(templatetype, ostypeid))
Exception: Failed to find template of type BUILTIN with OSTypeID and which is
in ready state: 8dbbe486-7d7a-11e3-9c62-52b2d980df8a
-------------------- >> begin captured logging << --------------------
CSLog: DEBUG: sending GET request: listZones {}
CSLog: DEBUG: Computed Signature by Marvin: BxXRkFQO++Eq4M5bLaOSTxUOgu8=
> [Automation] "get_template" function in command should return default
> templates
> --------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-5113
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5113
> Project: CloudStack
> Issue Type: Test
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: marvin
> Affects Versions: 4.2.1
> Environment: Automation
> Reporter: Rayees Namathponnan
> Assignee: Srikanteswararao Talluri
> Fix For: 4.3.0
>
>
> I observed couple of vm deployment failures during automation runs; test
> cases trying to deploy with vm with template which already deleted by other
> account
> In below code in common.py we are getting template
> "apiclient.listTemplates(cmd)", eg :
> 1) testcase1 trying to deploy a new VM
> 2) Same time testcase 2 register a template (temp2)
> 3) apiclient.listTemplates(cmd) will returns template ID (temp2)
> 4) testcase1 deploy vm wilt template temp2, same time (testcase 2) may
> delete its account, then obviously temp2 also gets deleted
> 5) test case 1 deployment fails since temp2 no available
> Solution
> get_template() should return only default template; there is no property API
> to list only default template; so we should find with starting name of
> template ie "CentOS" and in test case we should not register template with
> name "CentOS 5.5"
> def get_template(apiclient, zoneid, ostype, services=None):
> "Returns a template"
> cmd = listOsTypes.listOsTypesCmd()
> cmd.description = ostype
> ostypes = apiclient.listOsTypes(cmd)
> if isinstance(ostypes, list):
> ostypeid = ostypes[0].id
> else:
> raise Exception(
> "Failed to find OS type with description: %s" % ostype)
> cmd = listTemplates.listTemplatesCmd()
> cmd.templatefilter = 'featured'
> cmd.zoneid = zoneid
> if services:
> if "template" in services:
> cmd.id = services["template"]
> list_templates = apiclient.listTemplates(cmd)
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)