Yes. For ISO that is not successfully downloaded, in db
template_store_ref, that iso install_path has only up to the directory
template/tmpl/<account_id>/<template_id>. In our delete logic, we always
assume that the install_path is up to the template file, which is not true
for those unsuccessfully installed ISO/template, thus the bug. In 4.2, UI
will not show those non-successfully downloaded ISO/template, and
therefore this is not an issue. In 4.2.1, code is changed to show failed
template/ISO, thus the bug surfaces.

Thanks
-min

On 1/17/14 3:33 PM, "Francois Gaudreault" <fgaudrea...@cloudops.com> wrote:

>Looks like it :) I just opened a ticket:
>CLOUDSTACK-5900
>
>Also, I would like to point out that my template was ID 203, and it was
>trying to delete the file/folder 204, which is not the proper directory...
>
>Thanks!
>
>FG
>
>On 1/17/2014, 6:23 PM, Min Chen wrote:
>> This is a bug in deleting an ISO that is not successfully downloaded.
>>
>> Thanks
>> -min
>>
>> On 1/17/14 1:12 PM, "Francois Gaudreault" <fgaudrea...@cloudops.com>
>>wrote:
>>
>>> We have a fresh 4.2.1 install, and apparently we cannot delete ISO that
>>> failed to download? We are using XenServer hypervisors.
>>>
>>> 2014-01-17 16:06:41,833 INFO [cloud.template.HypervisorTemplateAdapter]
>>> (Job-Executor-21:job-54 = [ 934ed1bf-c382-42f4-b5fe-3bcd0284dfb8 ])
>>> Delete template from image store: Prod-SecStor
>>> 2014-01-17 16:06:41,836 DEBUG [storage.image.TemplateDataFactoryImpl]
>>> (Job-Executor-21:job-54 = [ 934ed1bf-c382-42f4-b5fe-3bcd0284dfb8 ])
>>> template 203 is already in store:1, type:Image
>>> 2014-01-17 16:06:41,956 DEBUG [agent.transport.Request]
>>> (Job-Executor-21:job-54 = [ 934ed1bf-c382-42f4-b5fe-3bcd0284dfb8 ]) Seq
>>> 5-2088570903: Sending  { Cmd , MgmtId: 99433950741773, via: 5, Ver: v1,
>>> Flags: 100011,
>>> 
>>>[{"org.apache.cloudstack.storage.command.DeleteCommand":{"data":{"org.ap
>>>ac
>>> 
>>>he.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/5/203"
>>>,"
>>> 
>>>origUrl":"http://cloudstack.ixxxxxxx.com/iso/WinServer_2008_R2_x64_ENG.I
>>>SO
>>> 
>>>","uuid":"94e4ee85-c1af-4eac-b695-d5912a6c9c41","id":203,"format":"ISO",
>>>"a
>>> ccountId":5,"hvm":true,"displayText":"Test
>>> 
>>>2nd","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.
>>>10
>>> 
>>>0.x.xxx/data/prod_zone","_role":"Image"}},"name":"203-5-7cca35bd-0eaa-37
>>>fe
>>> -a45a-418bcc5d9b96","hypervisorType":"None"}},"wait":0}}]
>>> }
>>> 2014-01-17 16:06:42,054 DEBUG [agent.transport.Request]
>>> (AgentManager-Handler-6:null) Seq 5-2088570903: Processing:  { Ans: ,
>>> MgmtId: 99433950741773, via: 5, Ver: v1, Flags: 10,
>>> [{"com.cloud.agent.api.Answer":{"result":false,"details":"Unable to
>>> delete file 204 under Template path template/tmpl/5/203","wait":0}}] }
>>> 2014-01-17 16:06:42,054 DEBUG [agent.transport.Request]
>>> (Job-Executor-21:job-54 = [ 934ed1bf-c382-42f4-b5fe-3bcd0284dfb8 ]) Seq
>>> 5-2088570903: Received:  { Ans: , MgmtId: 99433950741773, via: 5, Ver:
>>> v1, Flags: 10, { Answer } }
>>> 2014-01-17 16:06:42,125 WARN [cloud.template.HypervisorTemplateAdapter]
>>> (Job-Executor-21:job-54 = [ 934ed1bf-c382-42f4-b5fe-3bcd0284dfb8 ])
>>> Failed to delete the template
>>> Tmpl[203-ISO-203-5-7cca35bd-0eaa-37fe-a45a-418bcc5d9b96 from the image
>>> store: Prod-SecStor due to: Unable to delete file 204 under Template
>>> path template/tmpl/5/203
>>> 2014-01-17 16:06:42,206 ERROR [cloud.async.AsyncJobManagerImpl]
>>> (Job-Executor-21:job-54 = [ 934ed1bf-c382-42f4-b5fe-3bcd0284dfb8 ])
>>> Unexpected exception while executing
>>> org.apache.cloudstack.api.command.user.iso.DeleteIsoCmd
>>> com.cloud.utils.exception.CloudRuntimeException: Failed to delete ISO
>>>      at
>>> 
>>>com.cloud.template.TemplateManagerImpl.deleteIso(TemplateManagerImpl.jav
>>>a:
>>> 1120)
>>>      at
>>> 
>>>com.cloud.utils.component.ComponentInstantiationPostProcessor$Intercepto
>>>rD
>>> ispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
>>>      at
>>> 
>>>org.apache.cloudstack.api.command.user.iso.DeleteIsoCmd.execute(DeleteIs
>>>oC
>>> md.java:110)
>>>      at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:158)
>>>      at
>>> com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:531)
>>>      at
>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>>>      at 
>>>java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>>>      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>>>      at
>>> 
>>>java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.jav
>>>a:
>>> 1146)
>>>      at
>>> 
>>>java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
>>>va
>>> :615)
>>>      at java.lang.Thread.run(Thread.java:701)
>>>
>>> -- 
>>> Francois Gaudreault
>>> Architecte de Solution Cloud | Cloud Solutions Architect
>>> fgaudrea...@cloudops.com
>>> 514-629-6775
>>> - - -
>>> CloudOps
>>> 420 rue Guy
>>> Montréal QC  H3J 1S6
>>> www.cloudops.com
>>> @CloudOps_
>>>
>>
>>
>
>
>-- 
>Francois Gaudreault
>Architecte de Solution Cloud | Cloud Solutions Architect
>fgaudrea...@cloudops.com
>514-629-6775
>- - -
>CloudOps
>420 rue Guy
>Montréal QC  H3J 1S6
>www.cloudops.com
>@CloudOps_
>

Reply via email to