[
https://issues.apache.org/jira/browse/CLOUDSTACK-8651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14638621#comment-14638621
]
ASF GitHub Bot commented on CLOUDSTACK-8651:
--------------------------------------------
Github user karuturi commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/607#discussion_r35308653
--- Diff: test/integration/component/test_browse_templates.py ---
@@ -1674,6 +1674,42 @@ def
test_09_Browser_Upload_Volume_secondary_storage_resource_limits_after_deleti
return
+ @attr(tags = ["advanced", "advancedns", "smoke", "basic"],
required_hardware="false")
+ def test_browser_upload_template_incomplete(self):
+ """
+ Test browser based incomplete template upload, followed by SSVM
destroy. Template should go to UploadAbandoned state and get cleaned up.
+ """
+ try:
+ self.debug("========================= Test browser based
incomplete template upload ========================")
+
+ #Only register template, without uploading
+ cmd =
getUploadParamsForTemplate.getUploadParamsForTemplateCmd()
+ cmd.zoneid = self.zone.id
+ cmd.format = self.uploadtemplateformat
+
cmd.name=self.templatename+self.account.name+(random.choice(string.ascii_uppercase))
+ cmd.account=self.account.name
+ cmd.domainid=self.domain.id
+ cmd.displaytext=cmd.name
+ cmd.hypervisor=self.templatehypervisor
+ cmd.ostypeid=self.templateostypeid
+
template_response=self.apiclient.getUploadParamsForTemplate(cmd)
+
+ #Destroy SSVM, and wait for new one to start
+ self.destroy_ssvm()
+
+ #Verify that the template is cleaned up as part of sync-up
during new SSVM start
+ list_template_response=Template.list(
+ self.apiclient,
+ id=template_response.id,
+ templatefilter="all",
+ zoneid=self.zone.id)
+ self.assertEqual(list_template_response, None, "Template is
not cleaned up, some issue with template sync-up")
+
--- End diff --
ok
> [Browser Based Upload Template] Partially uploaded templates doesn't get
> cleaned up after the SSVM handling it is destroyed
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-8651
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8651
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Management Server
> Affects Versions: 4.6.0
> Reporter: Koushik Das
> Assignee: Koushik Das
> Fix For: 4.6.0
>
>
> Repro steps:
> 1. Make a call to getuploadparamsfortemplate, don't start actual upload to
> SSVM or make sure that the upload is in partially completed state.
> 2. Destroy SSVM (when template state is NotUploaded or UploadInProgress).
> 3. After a new SSVM comes up, these templates continue to remain in the same
> state and cannot be removed/cleaned-up.
> The issue is happening as the original SSVM is destroyed and no longer able
> to monitor the template. The fix is to clean-up the partially uploaded
> templates as part of template sync-up when the new SSVM comes up.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)