cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-4008) any operation on a snapshot of a delete volume is failing
Date Thu, 01 Aug 2013 21:01:48 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-4008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13726889#comment-13726889
] 

ASF subversion and git services commented on CLOUDSTACK-4008:
-------------------------------------------------------------

Commit 239c6cef45b9655a1373f3c472965cbbc6001b4b in branch refs/heads/master from [~edison]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=239c6ce ]

CLOUDSTACK-4008: fix snapshot npe if its volume is deleted

                
> any operation on a snapshot of a delete volume is failing
> ---------------------------------------------------------
>
>                 Key: CLOUDSTACK-4008
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4008
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Snapshot
>    Affects Versions: 4.2.0
>         Environment: KVM
>            Reporter: Srikanteswararao Talluri
>            Assignee: edison su
>            Priority: Blocker
>             Fix For: 4.2.0
>
>
> Steps to reproduce:
> ==============
> 1. create a volume and attach it to a VM.
> 2. take some snapshots(say 3 snapshots) of the  volume
> 3. detach and delete the volume created in step1.
> 4. try to delete one of the snapshot created in step 2.( results in NPE)
> 5. try to create a template from the snapshot created in step2 ( this is causing NPE)
> Observation: it is causing NPE but deleting the db entry.
> ===START===  10.101.255.7 -- GET  command=deleteSnapshot&id=aae5135d-3098-4f8a-9d7e-f8ab24217041&response=json&sessionkey=%2Ffgph8eXl%2BeIzsdyOBQZp9jAEBQ%3D&_=1375352221449
> 2013-08-01 21:11:32,696 DEBUG [cloud.async.AsyncJobManagerImpl] (catalina-exec-6:null)
submit async job-88 = [ bc793db0-5b35-4996-b615-ca00dc6e3669 ], details: AsyncJobVO {id:88,
userId: 2, accountId: 2, sessionKey: null, instanceType: Snapshot, instanceId: 5, cmd: org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotCmd,
cmdOriginator: null, cmdInfo: {"response":"json","id":"aae5135d-3098-4f8a-9d7e-f8ab24217041","sessionkey":"/fgph8eXl+eIzsdyOBQZp9jAEBQ\u003d","cmdEventType":"SNAPSHOT.DELETE","ctxUserId":"2","httpmethod":"GET","_":"1375352221449","ctxAccountId":"2","ctxStartEventId":"329"},
cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, processStatus: 0, resultCode:
0, result: null, initMsid: 7541090156566, completeMsid: null, lastUpdated: null, lastPolled:
null, created: null}
> 2013-08-01 21:11:32,700 DEBUG [cloud.api.ApiServlet] (catalina-exec-6:null) ===END===
 10.101.255.7 -- GET  command=deleteSnapshot&id=aae5135d-3098-4f8a-9d7e-f8ab24217041&response=json&sessionkey=%2Ffgph8eXl%2BeIzsdyOBQZp9jAEBQ%3D&_=1375352221449
> 2013-08-01 21:11:32,704 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-88:job-88
= [ bc793db0-5b35-4996-b615-ca00dc6e3669 ]) Executing org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotCmd
for job-88 = [ bc793db0-5b35-4996-b615-ca00dc6e3669 ]
> 2013-08-01 21:11:32,748 DEBUG [storage.snapshot.XenserverSnapshotStrategy] (Job-Executor-88:job-88
= [ bc793db0-5b35-4996-b615-ca00dc6e3669 ]) delete snapshot chain for snapshot: 5
> 2013-08-01 21:11:32,752 DEBUG [storage.snapshot.XenserverSnapshotStrategy] (Job-Executor-88:job-88
= [ bc793db0-5b35-4996-b615-ca00dc6e3669 ]) Snapshot: 5 doesn't have children, so it's ok
to delete it and its parents
> 2013-08-01 21:11:32,775 DEBUG [storage.image.BaseImageStoreDriverImpl] (Job-Executor-88:job-88
= [ bc793db0-5b35-4996-b615-ca00dc6e3669 ]) Unable to destoy SNAPSHOT: 5
> java.lang.NullPointerException
> 	at org.apache.cloudstack.storage.volume.VolumeDataFactoryImpl.getVolume(VolumeDataFactoryImpl.java:78)
> 	at org.apache.cloudstack.storage.snapshot.SnapshotObject.getBaseVolume(SnapshotObject.java:121)
> 	at org.apache.cloudstack.storage.to.SnapshotObjectTO.<init>(SnapshotObjectTO.java:43)
> 	at org.apache.cloudstack.storage.snapshot.SnapshotObject.getTO(SnapshotObject.java:244)
> 	at org.apache.cloudstack.storage.image.BaseImageStoreDriverImpl.deleteAsync(BaseImageStoreDriverImpl.java:236)
> 	at org.apache.cloudstack.storage.snapshot.SnapshotServiceImpl.deleteSnapshot(SnapshotServiceImpl.java:369)
> 	at org.apache.cloudstack.storage.snapshot.XenserverSnapshotStrategy.deleteSnapshotChain(XenserverSnapshotStrategy.java:161)
> 	at org.apache.cloudstack.storage.snapshot.XenserverSnapshotStrategy.deleteSnapshot(XenserverSnapshotStrategy.java:213)
> 	at com.cloud.storage.snapshot.SnapshotManagerImpl.deleteSnapshot(SnapshotManagerImpl.java:494)
> 	at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> 	at org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotCmd.execute(DeleteSnapshotCmd.java:96)
> 	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:679)
> 2013-08-01 21:11:32,776 DEBUG [storage.snapshot.SnapshotServiceImpl] (Job-Executor-88:job-88
= [ bc793db0-5b35-4996-b615-ca00dc6e3669 ]) delete snapshot failedjava.lang.NullPointerException
> 2013-08-01 21:11:32,804 DEBUG [storage.snapshot.XenserverSnapshotStrategy] (Job-Executor-88:job-88
= [ bc793db0-5b35-4996-b615-ca00dc6e3669 ]) delete snapshot failed: 
> com.cloud.utils.exception.CloudRuntimeException: java.lang.NullPointerException
> 	at org.apache.cloudstack.storage.snapshot.SnapshotServiceImpl.deleteSnapshot(SnapshotServiceImpl.java:375)
> 	at org.apache.cloudstack.storage.snapshot.XenserverSnapshotStrategy.deleteSnapshotChain(XenserverSnapshotStrategy.java:161)
> 	at org.apache.cloudstack.storage.snapshot.XenserverSnapshotStrategy.deleteSnapshot(XenserverSnapshotStrategy.java:213)
> 	at com.cloud.storage.snapshot.SnapshotManagerImpl.deleteSnapshot(SnapshotManagerImpl.java:494)
> 	at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> 	at org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotCmd.execute(DeleteSnapshotCmd.java:96)
> 	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:679)
> 2013-08-01 21:11:32,874 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-88:job-88
= [ bc793db0-5b35-4996-b615-ca00dc6e3669 ]) Complete async job-88 = [ bc793db0-5b35-4996-b615-ca00dc6e3669
], jobStatus: 1, resultCode: 0, result: org.apache.cloudstack.api.response.SuccessResponse@25ca9a9a
> 2013-08-01 21:11:32,886 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-88:job-88
= [ bc793db0-5b35-4996-b615-ca00dc6e3669 ]) Done executing org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotCmd
for job-88 = [ bc793db0-5b35-4996-b615-ca00dc6e3669 ]
> 2013-08-01 21:11:34,951 DEBUG [agent.manager.AgentManagerImpl] (AgentManager-Handler-13:null)
SeqA 3-1482: Processing Seq 3-1482:  { Cmd , MgmtId: -1, via: 3, Ver: v1, Flags: 11, [{"com.cloud.agent.api.ConsoleProxyLoadReportCommand":{"_proxyVmId":2,"_loadInfo":"{\n
 \"connections\": []\n}","wait":0}}] }
> 2013-08-01 21:11:34,964 DEBUG [agent.manager.AgentManagerImpl] (AgentManager-Handler-13:null)
SeqA 3-1482: Sending Seq 3-1482:  { Ans: , MgmtId: 7541090156566, via: 3, Ver: v1, Flags:
100010, [{"com.cloud.agent.api.AgentControlAnswer":{"result":true,"wait":0}}] }
> 2013-08-01 21:11:39,951 DEBUG [agent.manager.AgentManagerImpl] (AgentManager-Handler-15:null)
SeqA 3-1483: Processing Seq 3-1483:  { Cmd , MgmtId: -1, via: 3, Ver: v1, Flags: 11, [{"com.cloud.agent.api.ConsoleProxyLoadReportCommand":{"_proxyVmId":2,"_loadInfo":"{\n
 \"connections\": []\n}","wait":0}}] }
> 2013-08-01 21:11:39,963 DEBUG [agent.manager.AgentManagerImpl] (AgentManager-Handler-15:null)
SeqA 3-1483: Sending Seq 3-1483:  { Ans: , MgmtId: 7541090156566, via: 3, Ver: v1, Flags:
100010, [{"com.cloud.agent.api.AgentControlAnswer":{"result":true,"wait":0}}] }
> 2013-08-01 21:11:42,398 DEBUG [agent.manager.AgentManagerImpl] (AgentManager-Handler-1:null)
Ping from 2
> ) ===START===  10.101.255.7 -- GET  command=createTemplate&response=json&sessionkey=%2Ffgph8eXl%2BeIzsdyOBQZp9jAEBQ%3D&snapshotid=e5e9be89-ed31-423b-a8ce-21d3cfac7895&name=ttt&displayText=ttt&osTypeId=b7b4dab6-faa0-11e2-85e6-06dbcc000016&isPublic=true&passwordEnabled=false&isdynamicallyscalable=false&_=1375352485561
> 2013-08-01 21:15:56,916 DEBUG [cloud.async.AsyncJobManagerImpl] (catalina-exec-12:null)
submit async job-90 = [ 710f94db-ee6d-48a2-ae1a-3a07173e76df ], details: AsyncJobVO {id:90,
userId: 2, accountId: 2, sessionKey: null, instanceType: Template, instanceId: 204, cmd: org.apache.cloudstack.api.command.user.template.CreateTemplateCmd,
cmdOriginator: null, cmdInfo: {"sessionkey":"/fgph8eXl+eIzsdyOBQZp9jAEBQ\u003d","cmdEventType":"TEMPLATE.CREATE","ctxUserId":"2","httpmethod":"GET","osTypeId":"b7b4dab6-faa0-11e2-85e6-06dbcc000016","isPublic":"true","isdynamicallyscalable":"false","response":"json","id":"204","displayText":"ttt","snapshotid":"e5e9be89-ed31-423b-a8ce-21d3cfac7895","passwordEnabled":"false","name":"ttt","_":"1375352485561","ctxAccountId":"2","ctxStartEventId":"337"},
cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, processStatus: 0, resultCode:
0, result: null, initMsid: 7541090156566, completeMsid: null, lastUpdated: null, lastPolled:
null, created: null}
> 2013-08-01 21:15:56,920 DEBUG [cloud.api.ApiServlet] (catalina-exec-12:null) ===END===
 10.101.255.7 -- GET  command=createTemplate&response=json&sessionkey=%2Ffgph8eXl%2BeIzsdyOBQZp9jAEBQ%3D&snapshotid=e5e9be89-ed31-423b-a8ce-21d3cfac7895&name=ttt&displayText=ttt&osTypeId=b7b4dab6-faa0-11e2-85e6-06dbcc000016&isPublic=true&passwordEnabled=false&isdynamicallyscalable=false&_=1375352485561
> 2013-08-01 21:15:56,930 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-90:job-90
= [ 710f94db-ee6d-48a2-ae1a-3a07173e76df ]) Executing org.apache.cloudstack.api.command.user.template.CreateTemplateCmd
for job-90 = [ 710f94db-ee6d-48a2-ae1a-3a07173e76df ]
> 2013-08-01 21:15:57,001 DEBUG [storage.image.TemplateDataFactoryImpl] (Job-Executor-90:job-90
= [ 710f94db-ee6d-48a2-ae1a-3a07173e76df ]) template 204 is already in store:1, type:Image
> 2013-08-01 21:15:57,128 DEBUG [storage.motion.AncientDataMotionStrategy] (Job-Executor-90:job-90
= [ 710f94db-ee6d-48a2-ae1a-3a07173e76df ]) copyAsync inspecting src type SNAPSHOT copyAsync
inspecting dest type TEMPLATE
> 2013-08-01 21:15:57,135 DEBUG [storage.motion.AncientDataMotionStrategy] (Job-Executor-90:job-90
= [ 710f94db-ee6d-48a2-ae1a-3a07173e76df ]) copy failed
> java.lang.NullPointerException
> 	at org.apache.cloudstack.storage.volume.VolumeDataFactoryImpl.getVolume(VolumeDataFactoryImpl.java:78)
> 	at org.apache.cloudstack.storage.snapshot.SnapshotObject.getBaseVolume(SnapshotObject.java:121)
> 	at org.apache.cloudstack.storage.to.SnapshotObjectTO.<init>(SnapshotObjectTO.java:43)
> 	at org.apache.cloudstack.storage.snapshot.SnapshotObject.getTO(SnapshotObject.java:244)
> 	at org.apache.cloudstack.storage.motion.AncientDataMotionStrategy.needCacheStorage(AncientDataMotionStrategy.java:135)
> 	at org.apache.cloudstack.storage.motion.AncientDataMotionStrategy.createTemplateFromSnapshot(AncientDataMotionStrategy.java:409)
> 	at org.apache.cloudstack.storage.motion.AncientDataMotionStrategy.copyAsync(AncientDataMotionStrategy.java:371)
> 	at org.apache.cloudstack.storage.motion.DataMotionServiceImpl.copyAsync(DataMotionServiceImpl.java:55)
> 	at org.apache.cloudstack.storage.image.TemplateServiceImpl.copyAsync(TemplateServiceImpl.java:549)
> 	at org.apache.cloudstack.storage.image.TemplateServiceImpl.createTemplateFromSnapshotAsync(TemplateServiceImpl.java:556)
> 	at com.cloud.template.TemplateManagerImpl.createPrivateTemplate(TemplateManagerImpl.java:1358)
> 	at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> 	at org.apache.cloudstack.api.command.user.template.CreateTemplateCmd.execute(CreateTemplateCmd.java:263)
> 	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:679)
> 2013-08-01 21:15:57,169 DEBUG [cloud.template.TemplateManagerImpl] (Job-Executor-90:job-90
= [ 710f94db-ee6d-48a2-ae1a-3a07173e76df ]) Failed to create templatejava.lang.NullPointerException
> 2013-08-01 21:15:57,275 ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-90:job-90
= [ 710f94db-ee6d-48a2-ae1a-3a07173e76df ]) Unexpected exception while executing org.apache.cloudstack.api.command.user.template.CreateTemplateCmd
> com.cloud.utils.exception.CloudRuntimeException: Failed to create templatejava.lang.NullPointerException
> 	at com.cloud.template.TemplateManagerImpl.createPrivateTemplate(TemplateManagerImpl.java:1372)
> 	at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> 	at org.apache.cloudstack.api.command.user.template.CreateTemplateCmd.execute(CreateTemplateCmd.java:263)
> 	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:679)
> 2013-08-01 21:15:57,280 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-90:job-90
= [ 710f94db-ee6d-48a2-ae1a-3a07173e76df ]) Complete async job-90 = [ 710f94db-ee6d-48a2-ae1a-3a07173e76df
], jobStatus: 2, resultCode: 530, result: Error Code: 530 Error text: Failed to create templatejava.lang.NullPointerException
> 2013-08-01 21:15:57,638 DEBUG [cloud.server.StatsCollector] (StatsCollector-1:null) HostStatsCollector
is running...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message