[
https://issues.apache.org/jira/browse/CLOUDSTACK-3786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Likitha Shetty reassigned CLOUDSTACK-3786:
------------------------------------------
Assignee: Likitha Shetty
> [object_store_Refactor] Snapshots removed field is not set after successful
> deletion of the snapshot
> ----------------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-3786
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3786
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Snapshot, Storage Controller
> Affects Versions: 4.2.0
> Environment: Latest build from ACS 4.2 branch
> Reporter: Sanjeev N
> Assignee: Likitha Shetty
> Fix For: 4.2.0
>
>
> [object_store_Refactor] Snapshots removed field is not set after successful
> deletion of the snapshot
> After deleting snapshot from CS , snpashot's removed filed is not set in
> snapshots table.
> Steps to Reproduce:
> ================
> 1.Bring up CS with xen cluster.
> 2.Deploy guest vm with default cent of template
> 3.Take snapshot on the guest vms root disk
> 4.Set storage.cleanup.interval to a small value say 60 sec. and restart
> management server
> 5.After snapshot comes to Backedup state delete it from CS
> Observations:
> ===========
> snpashot status was set to Destroyed in snapshots table after deleting the
> snapshot. After storage gc kicked in snapshot was deleted from the secondary
> storage. However snapshot entry's removed filed is not set.
> mysql> select * from snapshots where id=20\G;
> *************************** 1. row ***************************
> id: 20
> data_center_id: 1
> account_id: 2
> domain_id: 1
> volume_id: 24
> disk_offering_id: 1
> status: Destroyed
> path: NULL
> name: storage-gc_ROOT-14_20130724122707
> uuid: ac718d38-c2b0-4dee-9172-c49ef34b2911
> snapshot_type: 0
> type_description: MANUAL
> size: 21474836480
> created: 2013-07-24 12:27:07
> removed: NULL
> backup_snap_id: NULL
> swift_id: NULL
> sechost_id: NULL
> prev_snap_id: NULL
> hypervisor_type: XenServer
> version: 2.2
> s3_id: NULL
> 1 row in set (0.00 sec)
> ERROR:
> No query specified
> At this stage snpashot state was set set to Destroyed in snapshot_store_ref
> table.
> Log snippet from management server log:
> =================================
> 2013-07-24 12:06:19,519 DEBUG [cloud.api.ApiServlet] (catalina-exec-2:null)
> ===START=== 10.101.255.43 -- GET
> command=deleteSnapshot&id=ac718d38-c2b0-4dee-9172-c49ef34b2911&response=json&sessionkey=ENi%2FuFe8GijlfDYRBxJF2oicGQ4%3D&_=1374681978746
> 2013-07-24 12:06:19,655 DEBUG [cloud.async.AsyncJobManagerImpl]
> (catalina-exec-2:null) submit async job-87 = [
> 0c3204be-9322-46f4-88e1-eed7f434ea98 ], details: AsyncJobVO {id:87, userId:
> 2, accountId: 2, sessionKey: null, instanceType: Snapshot, instanceId: 20,
> cmd: org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotCmd,
> cmdOriginator: null, cmdInfo:
> {"id":"ac718d38-c2b0-4dee-9172-c49ef34b2911","response":"json","sessionkey":"ENi/uFe8GijlfDYRBxJF2oicGQ4\u003d","cmdEventType":"SNAPSHOT.DELETE","ctxUserId":"2","httpmethod":"GET","_":"1374681978746","ctxAccountId":"2","ctxStartEventId":"349"},
> cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0,
> processStatus: 0, resultCode: 0, result: null, initMsid: 6615759585382,
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-07-24 12:06:19,659 DEBUG [cloud.api.ApiServlet] (catalina-exec-2:null)
> ===END=== 10.101.255.43 -- GET
> command=deleteSnapshot&id=ac718d38-c2b0-4dee-9172-c49ef34b2911&response=json&sessionkey=ENi%2FuFe8GijlfDYRBxJF2oicGQ4%3D&_=1374681978746
> 2013-07-24 12:06:19,668 DEBUG [cloud.async.AsyncJobManagerImpl]
> (Job-Executor-13:job-87 = [ 0c3204be-9322-46f4-88e1-eed7f434ea98 ]) Executing
> org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotCmd for job-87
> = [ 0c3204be-9322-46f4-88e1-eed7f434ea98 ]
> 2013-07-24 12:06:19,722 DEBUG [storage.snapshot.XenserverSnapshotStrategy]
> (Job-Executor-13:job-87 = [ 0c3204be-9322-46f4-88e1-eed7f434ea98 ]) delete
> snapshot chain for snapshot: 20
> 2013-07-24 12:06:19,724 DEBUG [storage.snapshot.XenserverSnapshotStrategy]
> (Job-Executor-13:job-87 = [ 0c3204be-9322-46f4-88e1-eed7f434ea98 ]) Snapshot:
> 20 doesn't have children, so it's ok to delete it and its parents
> 2013-07-24 12:06:19,777 DEBUG [agent.transport.Request]
> (Job-Executor-13:job-87 = [ 0c3204be-9322-46f4-88e1-eed7f434ea98 ]) Seq
> 3-875364584: Sending { Cmd , MgmtId: 6615759585382, via: 3, Ver: v1, Flags:
> 100011,
> [{"org.apache.cloudstack.storage.command.DeleteCommand":{"data":{"org.apache.cloudstack.storage.to.SnapshotObjectTO":{"path":"snapshots/2/24/784de669-1058-4843-8a14-cf6f4e783a4b","volume":{"uuid":"beb7a932-aa9c-45a4-ba62-ee54b284cf6d","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"c65a038a-750c-3b4f-bf26-7ce3b74e1c85","id":1,"poolType":"NetworkFilesystem","host":"10.147.28.7","path":"/export/home/sanjeev/pri_xen_os","port":2049}},"name":"ROOT-14","size":21474836480,"path":"10eb79a0-3d16-49e6-84f3-92f5767a30bd","volumeId":24,"vmName":"i-2-14-VM","accountId":2,"format":"VHD","id":24},"dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.147.28.7/export/home/sanjeev/sec_xen_os","_role":"Image"}},"vmName":"i-2-14-VM","name":"storage-gc_ROOT-14_20130724122707","hypervisorType":"XenServer","id":20}},"wait":0}}]
> }
> 2013-07-24 12:07:10,109 DEBUG [cloud.storage.StorageManagerImpl]
> (StorageManager-Scavenger-2:null) Storage pool garbage collector found 0
> templates to clean up in storage pool: pri_xen_os
> 2013-07-24 12:07:10,115 DEBUG [cloud.storage.StorageManagerImpl]
> (StorageManager-Scavenger-2:null) Storage pool garbage collector found 0
> templates to clean up in storage pool: pri_xen_os2
> 2013-07-24 12:07:10,121 DEBUG [cloud.storage.StorageManagerImpl]
> (StorageManager-Scavenger-2:null) Secondary storage garbage collector found 0
> templates to cleanup on template_store_ref for store: sec_xen_os
> 2013-07-24 12:07:10,123 DEBUG [cloud.storage.StorageManagerImpl]
> (StorageManager-Scavenger-2:null) Secondary storage garbage collector found 1
> snapshots to cleanup on snapshot_store_ref for store: sec_xen_os
> 2013-07-24 12:07:10,128 DEBUG [cloud.storage.StorageManagerImpl]
> (StorageManager-Scavenger-2:null) Deleting snapshot store DB entry:
> VolumeHost[40-20-1snapshots/2/24/784de669-1058-4843-8a14-cf6f4e783a4b]
> 2013-07-24 12:07:10,135 DEBUG [cloud.storage.StorageManagerImpl]
> (StorageManager-Scavenger-2:null) Secondary storage garbage collector found 0
> volumes to cleanup on volume_store_ref for store: sec_xen_os
> After gc kicked in snapshot entry got deleted from snapshot_store_ref table.
--
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