[
https://issues.apache.org/jira/browse/CLOUDSTACK-5113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13880744#comment-13880744
]
Srikanteswararao Talluri commented on CLOUDSTACK-5113:
------------------------------------------------------
listOsTypes is getting 'CentOS 5.6(64-bit)' and In listTemplates you are
getting 'CentOS 5.5(6.4-bit), Hence the failure. Please check your test what is
it passing for get_template().
DEBUG: "GET
/client/api?apiKey=DW-0-7WEDK-ORgGS-cgsBZvQ0v3YACOLGL85Qz9su5r3bKDrbRvf-3Ly3DY8cU1RVFXXNY1db-Nmfdn02kmT_Q&description=CentOS+5.6+%2864-bit%29&command=listOsTypes&signature=6J7DraRivM%2BWkCyn%2F8Y%2BL6m4e%2Fw%3D&response=json
HTTP/1.1" 200 194
CSLog: DEBUG: Request:
http://10.223.49.195:8080/client/api?apiKey=DW-0-7WEDK-ORgGS-cgsBZvQ0v3YACOLGL85Qz9su5r3bKDrbRvf-3Ly3DY8cU1RVFXXNY1db-Nmfdn02kmT_Q&description=CentOS+5.6+%2864-bit%29&command=listOsTypes&signature=6J7DraRivM%2BWkCyn%2F8Y%2BL6m4e%2Fw%3D&response=json
Response: { "listostypesresponse" : { "count":1 ,"ostype" : [
{"id":"0f0b1b8e-8478-11e3-a447-1a6f7bb0d0a8","oscategoryid":"0edb4b70-8478-11e3-a447-1a6f7bb0d0a8","description":"CentOS
5.6 (64-bit)"} ] } }
CSLog: DEBUG: sending GET request: listTemplates {'templatefilter': 'featured',
'zoneid': u'2c097285-8abb-4d53-b078-4f54c5c38e83'}
CSLog: DEBUG: Computed Signature by Marvin: bFaTogDTMPcP3n+kyvCzOXN+vFg=
requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection
(1): 10.223.49.195
requests.packages.urllib3.connectionpool: DEBUG: "GET
/client/api?apiKey=DW-0-7WEDK-ORgGS-cgsBZvQ0v3YACOLGL85Qz9su5r3bKDrbRvf-3Ly3DY8cU1RVFXXNY1db-Nmfdn02kmT_Q&templatefilter=featured&command=listTemplates&signature=bFaTogDTMPcP3n%2BkyvCzOXN%2BvFg%3D&zoneid=2c097285-8abb-4d53-b078-4f54c5c38e83&response=json
HTTP/1.1" 200 807
CSLog: DEBUG: Request:
http://10.223.49.195:8080/client/api?apiKey=DW-0-7WEDK-ORgGS-cgsBZvQ0v3YACOLGL85Qz9su5r3bKDrbRvf-3Ly3DY8cU1RVFXXNY1db-Nmfdn02kmT_Q&templatefilter=featured&command=listTemplates&signature=bFaTogDTMPcP3n%2BkyvCzOXN%2BvFg%3D&zoneid=2c097285-8abb-4d53-b078-4f54c5c38e83&response=json
Response: { "listtemplatesresponse" : { "count":1 ,"template" : [
{"id":"0ed9febe-8478-11e3-a447-1a6f7bb0d0a8","name":"CentOS 5.5(64-bit) no GUI
(KVM)","displaytext":"CentOS 5.5(64-bit) no GUI
(KVM)","ispublic":true,"created":"2014-01-23T14:10:20-0800","isready":true,"passwordenabled":false,"format":"QCOW2","isfeatured":true,"crossZones":true,"ostypeid":"0f03e99a-8478-11e3-a447-1a6f7bb0d0a8","ostypename":"CentOS
5.5
(64-bit)","account":"system","zoneid":"2c097285-8abb-4d53-b078-4f54c5c38e83","zonename":"Adv-KVM-Zone1","status":"Download
Complete","size":8589934592,"templatetype":"BUILTIN","hypervisor":"KVM","domain":"ROOT","domainid":"0ed5bc14-8478-11e3-a447-1a6f7bb0d0a8","isextractable":true,"checksum":"06e57d2beefc101867ad3ce74d4d100c","tags":[],"sshkeyenabled":false,"isdynamicallyscalable":false}
] } }
> [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)