[ https://issues.apache.org/jira/browse/CLOUDSTACK-3756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chandan Purushothama updated CLOUDSTACK-3756: --------------------------------------------- Summary: Object_Store_Refactor - [KVM] Deletion of Scheduled Snapshot Fails - Affects Snapshot Retention Policy. (was: Object_Store_Refactor - [KVM] Snapshot Retention Policy Fails.) > Object_Store_Refactor - [KVM] Deletion of Scheduled Snapshot Fails - Affects > Snapshot Retention Policy. > ------------------------------------------------------------------------------------------------------- > > Key: CLOUDSTACK-3756 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3756 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Snapshot > Affects Versions: 4.2.0 > Reporter: Chandan Purushothama > Assignee: edison su > Priority: Critical > Fix For: 4.2.0 > > > ============================================ > During the creation of a Hourly Snapshot - NPE is thrown: > ============================================ > 2013-07-23 14:51:47,359 DEBUG [agent.transport.Request] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Seq > 1-710935896: Sending { Cmd , MgmtId: 7471666038533, via: 1, Ver: v1, Flags: > 100011, > [{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.SnapshotObjectTO":{"path":"/mnt/ef3dea99-0a1b-35b9-87ec-d8cabe7ed9c1/906ec8f4-e625-4943-aedd-aff3444150b9/d3b4dcd2-ae74-45cc-bf43-a61d13309e72","volume":{"uuid":"031802d8-c10a-4038-9acf-b86eba54b647","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"ef3dea99-0a1b-35b9-87ec-d8cabe7ed9c1","id":1,"poolType":"NetworkFilesystem","host":"10.223.110.232","path":"/export/home/chandan/campocr-195-103/primarykvm","port":2049}},"name":"ROOT-6","size":147456,"path":"906ec8f4-e625-4943-aedd-aff3444150b9","volumeId":6,"vmName":"i-3-6-JULYLAST","accountId":3,"format":"QCOW2","id":6},"parentSnapshotPath":"/mnt/ef3dea99-0a1b-35b9-87ec-d8cabe7ed9c1/906ec8f4-e625-4943-aedd-aff3444150b9/d9190a5c-84a8-4928-be9f-6755e1b0d1e6","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"ef3dea99-0a1b-35b9-87ec-d8cabe7ed9c1","id":1,"poolType":"NetworkFilesystem","host":"10.223.110.232","path":"/export/home/chandan/campocr-195-103/primarykvm","port":2049}},"vmName":"i-3-6-JULYLAST","name":"Atoms-VM-1_ROOT-6_20130723215146","hypervisorType":"KVM","id":11}},"destTO":{"org.apache.cloudstack.storage.to.SnapshotObjectTO":{"path":"snapshots/3/6","volume":{"uuid":"031802d8-c10a-4038-9acf-b86eba54b647","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"ef3dea99-0a1b-35b9-87ec-d8cabe7ed9c1","id":1,"poolType":"NetworkFilesystem","host":"10.223.110.232","path":"/export/home/chandan/campocr-195-103/primarykvm","port":2049}},"name":"ROOT-6","size":147456,"path":"906ec8f4-e625-4943-aedd-aff3444150b9","volumeId":6,"vmName":"i-3-6-JULYLAST","accountId":3,"format":"QCOW2","id":6},"parentSnapshotPath":"snapshots/3/6/d9190a5c-84a8-4928-be9f-6755e1b0d1e6","dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.223.110.232/export/home/chandan/campocr-195-103/secondary/","_role":"Image"}},"vmName":"i-3-6-JULYLAST","name":"Atoms-VM-1_ROOT-6_20130723215146","hypervisorType":"KVM","id":11}},"executeInSequence":false,"wait":21600}}] > } > 2013-07-23 14:52:50,158 DEBUG [agent.transport.Request] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Seq > 1-710935896: Received: { Ans: , MgmtId: 7471666038533, via: 1, Ver: v1, > Flags: 10, { CopyCmdAnswer } } > 2013-07-23 14:52:50,232 DEBUG [storage.snapshot.SnapshotManagerImpl] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Max > snaps: 2 exceeded for snapshot policy with Id: 3. Deleting oldest snapshot: 5 > 2013-07-23 14:52:50,277 DEBUG [cloud.user.AccountManagerImpl] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Access to > com.cloud.storage.SnapshotVO$$EnhancerByCGLIB$$59847169@f1779fa granted to > Acct[3-atoms] by DomainChecker_EnhancerByCloudStack_ccb7a71 > 2013-07-23 14:52:50,315 DEBUG [storage.snapshot.SnapshotManagerImpl] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Max > snaps: 2 exceeded for snapshot policy with Id: 3. Deleting oldest snapshot: 7 > 2013-07-23 14:52:50,321 DEBUG [cloud.user.AccountManagerImpl] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Access to > com.cloud.storage.SnapshotVO$$EnhancerByCGLIB$$59847169@1db4492d granted to > Acct[3-atoms] by DomainChecker_EnhancerByCloudStack_ccb7a71 > 2013-07-23 14:52:50,346 DEBUG [storage.snapshot.SnapshotManagerImpl] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Max > snaps: 2 exceeded for snapshot policy with Id: 3. Deleting oldest snapshot: 8 > 2013-07-23 14:52:50,353 DEBUG [cloud.user.AccountManagerImpl] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Access to > com.cloud.storage.SnapshotVO$$EnhancerByCGLIB$$59847169@7bca0fdb granted to > Acct[3-atoms] by DomainChecker_EnhancerByCloudStack_ccb7a71 > 2013-07-23 14:52:50,361 DEBUG [storage.snapshot.XenserverSnapshotStrategy] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) delete > snapshot chain for snapshot: 8 > 2013-07-23 14:52:50,363 DEBUG [storage.snapshot.XenserverSnapshotStrategy] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Snapshot: > 8 doesn't have children, so it's ok to delete it and its parents > 2013-07-23 14:52:50,383 DEBUG [agent.manager.AgentAttache] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Request > seq: 1039532322 > 2013-07-23 14:52:50,383 DEBUG [agent.manager.AgentAttache] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) waiting > to send 1039532322 > 2013-07-23 14:52:50,383 DEBUG [agent.manager.AgentAttache] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) entering > synchronize block for sending 1039532322 > 2013-07-23 14:52:50,383 DEBUG [agent.transport.Request] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Seq > 3-1039532322: Sending { Cmd , MgmtId: 7471666038533, via: 3, Ver: v1, Flags: > 100011, > [{"org.apache.cloudstack.storage.command.DeleteCommand":{"data":{"org.apache.cloudstack.storage.to.SnapshotObjectTO":{"path":"snapshots/3/6/99b5f9f3-9c6d-4db7-af19-05106fe6e1cc","volume":{"uuid":"031802d8-c10a-4038-9acf-b86eba54b647","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"ef3dea99-0a1b-35b9-87ec-d8cabe7ed9c1","id":1,"poolType":"NetworkFilesystem","host":"10.223.110.232","path":"/export/home/chandan/campocr-195-103/primarykvm","port":2049}},"name":"ROOT-6","size":147456,"path":"906ec8f4-e625-4943-aedd-aff3444150b9","volumeId":6,"vmName":"i-3-6-JULYLAST","accountId":3,"format":"QCOW2","id":6},"dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.223.110.232/export/home/chandan/campocr-195-103/secondary/","_role":"Image"}},"vmName":"i-3-6-JULYLAST","name":"Atoms-VM-1_ROOT-6_20130723195146","hypervisorType":"KVM","id":8}},"wait":0}}] > } > 2013-07-23 14:52:56,181 DEBUG [agent.transport.Request] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Seq > 3-1039532322: Received: { Ans: , MgmtId: 7471666038533, via: 3, Ver: v1, > Flags: 10, { Answer } } > 2013-07-23 14:52:56,195 DEBUG [storage.snapshot.XenserverSnapshotStrategy] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Failed to > delete snapshot: > java.lang.NullPointerException > at > org.apache.cloudstack.storage.snapshot.XenserverSnapshotStrategy.deleteSnapshot(XenserverSnapshotStrategy.java:192) > at > com.cloud.storage.snapshot.SnapshotManagerImpl.deleteSnapshot(SnapshotManagerImpl.java:496) > at > com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125) > at > com.cloud.storage.snapshot.SnapshotManagerImpl.postCreateRecurringSnapshotForPolicy(SnapshotManagerImpl.java:467) > at > com.cloud.storage.snapshot.SnapshotManagerImpl.postCreateSnapshot(SnapshotManagerImpl.java:448) > at > com.cloud.storage.snapshot.SnapshotManagerImpl.takeSnapshot(SnapshotManagerImpl.java:999) > at > org.apache.cloudstack.storage.volume.VolumeServiceImpl.takeSnapshot(VolumeServiceImpl.java:1185) > at > com.cloud.storage.VolumeManagerImpl.takeSnapshot(VolumeManagerImpl.java:2654) > at > org.apache.cloudstack.api.command.user.snapshot.CreateSnapshotCmd.execute(CreateSnapshotCmd.java:170) > 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:1110) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:679) > 2013-07-23 14:52:56,195 DEBUG [storage.snapshot.XenserverSnapshotStrategy] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Failed to > change snapshot state: java.lang.NullPointerException > 2013-07-23 14:52:56,292 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Complete > async job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ], jobStatus: 1, > resultCode: 0, result: > org.apache.cloudstack.api.response.SnapshotResponse@1b581772 > 2013-07-23 14:52:56,297 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-26:job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ]) Done > executing org.apache.cloudstack.api.command.user.snapshot.CreateSnapshotCmd > for job-55 = [ 70344d23-f8f7-49c2-8046-e3511ba2ee56 ] -- 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