Francois Gaudreault created CLOUDSTACK-5900:
-----------------------------------------------

             Summary: Failed to delete ISO that failed to download
                 Key: CLOUDSTACK-5900
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5900
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: SystemVM
    Affects Versions: 4.2.1
            Reporter: Francois Gaudreault


If the ISO failed to download, you cannot delete it. You will get a Failed to 
Delete ISO error. I had 3 failed ISO, and here is some interesting behavior:

- There was a template.properties file in each directory even if the template 
failed to download
- When I was trying to delete template id 203, it was complaining about a file 
in the 204 directory, which doesn't make sense.

Trace:
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.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/5/203","origUrl":"http://cloudstack.ixxxxxxx.com/iso/WinServer_2008_R2_x64_ENG.ISO","uuid":"94e4ee85-c1af-4eac-b695-d5912a6c9c41","id":203,"format":"ISO","accountId":5,"hvm":true,"displayText":"Test
 
2nd","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.100.x.xxx/data/prod_zone","_role":"Image"}},"name":"203-5-7cca35bd-0eaa-37fe-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.java:1120)
    at 
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
    at 
org.apache.cloudstack.api.command.user.iso.DeleteIsoCmd.execute(DeleteIsoCmd.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.java:1146)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:701) 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to