cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koushik Das (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-4136) [upgraded ENV]Deleting Snapshot which was created before upgrade is throwing NPE.
Date Thu, 08 Aug 2013 06:57:48 GMT

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

Koushik Das commented on CLOUDSTACK-4136:
-----------------------------------------

The code has some issue and I have fixed that.
Also as can be seen from the db dumps before and after upgrade the 'snapshot_store_ref' table
is not appropriately populated from entries in the 'snapshots' table. I looked at the Upgrade410to420.java
upgrade logic and based on that the following should have run and populated the snapshot_store_ref.
Please upload the management server logs as well during upgrade.

INSERT INTO `cloud`.`snapshot_store_ref` (store_id,  snapshot_id, created, size, parent_snapshot_id,
install_path, volume_id, update_count, ref_cnt, store_role, state) select sechost_id, id,
created, size, prev_snap_id, CONCAT('snapshots', '/', account_id, '/', volume_id, '/', backup_snap_id),
volume_id, 0, 0, 'Image', 'Ready' from `cloud`.`snapshots` where status = 'BackedUp' and sechost_id
is not null and removed is null;

 
                
> [upgraded ENV]Deleting Snapshot which was created before upgrade is throwing NPE.
> ---------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-4136
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4136
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Storage Controller, Upgrade
>    Affects Versions: 4.2.0
>         Environment: upgraded from 3.0.7 to 4.2
>            Reporter: manasaveloori
>            Assignee: Koushik Das
>            Priority: Critical
>             Fix For: 4.2.0
>
>         Attachments: management-server.log.2013-08-06.zip, management-server.zip, mysqldumpAfterUpnew.dmp,
mysqldumpBeforeUp.dmp
>
>
> Steps:
> 1.	Have CS with 3.0.7 build with VMware and Xen hypervisor.
> 2.	Deploy a VM.
> 3.	Create a snapshot of root volume.
> 4.	Upgrade the build to 4.2.
> 5.	Try to delete the snapshot now.
> Observing NPE while deleting the snapshot for the 1st time
> Tried to delete the same snapshot again deletes it. Verified the state of snapshot in
DB also.
> 2013-08-07 20:29:19,535 DEBUG [cloud.api.ApiServlet] (catalina-exec-1:null) ===END===
 10.252.192.69 -- GET  command=deleteSnapshot&id=acf6d258-99fa-4832-8499-a81a631627ce&response=json&sessionkey=uKcUJCauPB9Gj8yRMfQdmpPpTAE%3D&_=1375868166341
> 2013-08-07 20:29:19,539 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-43:job-215
= [ 055cd377-272a-4ee6-a9c9-5b57fbbf6536 ]) Executing org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotCmd
for job-215 = [ 055cd377-272a-4ee6-a9c9-5b57fbbf6536 ]
> 2013-08-07 20:29:19,573 DEBUG [storage.snapshot.XenserverSnapshotStrategy] (Job-Executor-43:job-215
= [ 055cd377-272a-4ee6-a9c9-5b57fbbf6536 ]) Can't find snapshot on backup storage, delete
it in db
> 2013-08-07 20:29:19,582 DEBUG [storage.snapshot.SnapshotManagerImpl] (Job-Executor-43:job-215
= [ 055cd377-272a-4ee6-a9c9-5b57fbbf6536 ]) Failed to delete snapshot: 1:java.lang.NullPointerException
> 2013-08-07 20:29:19,596 ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-43:job-215
= [ 055cd377-272a-4ee6-a9c9-5b57fbbf6536 ]) Unexpected exception while executing org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotCmd
> com.cloud.utils.exception.CloudRuntimeException: Failed to delete snapshot:java.lang.NullPointerException
>         at com.cloud.storage.snapshot.SnapshotManagerImpl.deleteSnapshot(SnapshotManagerImpl.java:508)
>         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:1110)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:679)
> 2013-08-07 20:29:19,600 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-43:job-215
= [ 055cd377-272a-4ee6-a9c9-5b57fbbf6536 ]) Complete async job-215 = [ 055cd377-272a-4ee6-a9c9-5b57fbbf6536
], jobStatus: 2, resultCode: 530, result: Error Code: 530 Error text: Failed to delete snapshot:java.lang.NullPointerException
> 2013-08-07 20:29:20,718 DEBUG [cloud.server.StatsCollector] (StatsCollector-2:null) VmStatsCollector
is running...
> Attaching the MS logs.

--
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