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

ASF GitHub Bot commented on CLOUDSTACK-8302:
--------------------------------------------

Github user kiwiflyer commented on the pull request:

    https://github.com/apache/cloudstack/pull/1230#issuecomment-208438657
  
    Lab testing of feature:
    
    Cloudstack RBD snapshot job:
    
    2016-04-11 11:26:22,955 DEBUG [c.c.a.t.Request] 
(Work-Job-Executor-1:ctx-5ac9d6c8 job-121/job-122 ctx-e3c6a9f8) 
(logid:af23718c) Seq 1-1541075497490841731: Received:  { Ans: , MgmtId: 
52239507206, via: 1(njcloudhost.dev.ena.net), Ver: v1, Flags: 10, { 
CreateObjectAnswer } }
    2016-04-11 11:26:23,025 DEBUG [o.a.c.s.m.AncientDataMotionStrategy] 
(Work-Job-Executor-1:ctx-5ac9d6c8 job-121/job-122 ctx-e3c6a9f8) 
(logid:af23718c) copyAsync inspecting src type SNAPSHOT copyAsync inspecting 
dest type SNAPSHOT
    2016-04-11 11:26:23,056 DEBUG [c.c.h.o.r.Ovm3HypervisorGuru] 
(Work-Job-Executor-1:ctx-5ac9d6c8 job-121/job-122 ctx-e3c6a9f8) 
(logid:af23718c) getCommandHostDelegation: class 
org.apache.cloudstack.storage.command.CopyCommand
    2016-04-11 11:26:23,056 DEBUG [c.c.h.XenServerGuru] 
(Work-Job-Executor-1:ctx-5ac9d6c8 job-121/job-122 ctx-e3c6a9f8) 
(logid:af23718c) getCommandHostDelegation: class 
org.apache.cloudstack.storage.command.CopyCommand
    2016-04-11 11:26:23,058 DEBUG [c.c.a.t.Request] 
(Work-Job-Executor-1:ctx-5ac9d6c8 job-121/job-122 ctx-e3c6a9f8) 
(logid:af23718c) Seq 1-1541075497490841732: Sending  { Cmd , MgmtId: 
52239507206, via: 1(njcloudhost.dev.ena.net), Ver: v1, Flags: 100111, 
[{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.SnapshotObjectTO":{"path":"rbdnjcloudhost/c656809e-ecec-47a0-875d-af297fb77fe3/938125ff-da6d-4355-b83a-e3aa8d941807","volume":{"uuid":"c656809e-ecec-47a0-875d-af297fb77fe3","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"f0dbafaa-52a3-3077-bc53-d7ad3a5ac132","id":4,"poolType":"RBD","host":"192.168.100.100","path":"rbdnjcloudhost","port":6789,"url":"RBD://192.168.100.100/rbdnjcloudhost/?ROLE=Primary&STOREUUID=f0dbafaa-52a3-3077-bc53-d7ad3a5ac132"}},"name":"ROOT-8","size":8589934592,"path":"c656809e-ecec-47a0-875d-af297fb77fe3","volumeId":8,"vmName":"i-4-8-VM","accountId":4,"format":"RAW","provisioningType":"THIN","id":8,"deviceId":0,"hypervisorType":"KVM"},"dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"f0dbafaa-52a3-3077-bc53-d7ad3a5ac132","id":4,"poolType":"RBD","host":"192.168.100.100","path":"rbdnjcloudhost","port":6789,"url":"RBD://192.168.100.100/rbdnjcloudhost/?ROLE=Primary&STOREUUID=f0dbafaa-52a3-3077-bc53-d7ad3a5ac132"}},"vmName":"i-4-8-VM","name":"test","hypervisorType":"KVM","id":1,"quiescevm":false,"physicalSize":0}},"destTO":{"org.apache.cloudstack.storage.to.SnapshotObjectTO":{"path":"snapshots/4/8","volume":{"uuid":"c656809e-ecec-47a0-875d-af297fb77fe3","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"f0dbafaa-52a3-3077-bc53-d7ad3a5ac132","id":4,"poolType":"RBD","host":"192.168.100.100","path":"rbdnjcloudhost","port":6789,"url":"RBD://192.168.100.100/rbdnjcloudhost/?ROLE=Primary&STOREUUID=f0dbafaa-52a3-3077-bc53-d7ad3a5ac132"}},"name":"ROOT-8","size":8589934592,"path":"c656809e-ecec-47a0-875d-af297fb77fe3","volumeId":8,"vmName":"i-4-8-VM","accountId":4,"format":"RAW","provisioningType":"THIN","id":8,"deviceId":0,"hypervisorType":"KVM"},"dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.103.0.42/secondary","_role":"Image"}},"vmName":"i-4-8-VM","name":"test","hypervisorType":"KVM","id":1,"quiescevm":false,"physicalSize":0}},"executeInSequence":true,"options":{"fullSnapshot":"true"},"options2":{},"wait":21600}}]
 }
    
    
    2016-04-11 11:27:41,178 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-1:ctx-80f166f9 job-121) (logid:af23718c) Done executing 
org.apache.cloudstack.api.command.user.snapshot.CreateSnapshotCmd for job-121
    2016-04-11 11:27:41,178 INFO  [o.a.c.f.j.i.AsyncJobMonitor] 
(API-Job-Executor-1:ctx-80f166f9 job-121) (logid:af23718c) Remove job-121 from 
job monitoring
    
    Ceph Log show snapshot has been created:
    
    rbd snap ls -p rbdnjcloudhost c656809e-ecec-47a0-875d-af297fb77fe3
    SNAPID NAME                                    SIZE 
        12 938125ff-da6d-4355-b83a-e3aa8d941807 8192 MB 
    
    
    Cloudstack delete RBD snashot job:
    
    2016-04-11 11:34:03,679 DEBUG [c.c.a.ApiServlet] 
(catalina-exec-5:ctx-954c6978) (logid:3f05f35f) ===START===  10.16.0.38 -- GET  
command=deleteSnapshot&id=36e2eebe-8268-4c36-b21c-b2e57cb62974&response=json&_=1460392443709
    2016-04-11 11:34:03,730 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(catalina-exec-5:ctx-954c6978 ctx-02ab09fe) (logid:3f05f35f) submit async 
job-123, details: AsyncJobVO {id:123, userId: 2, accountId: 2, instanceType: 
Snapshot, instanceId: 1, cmd: 
org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotCmd, cmdInfo: 
{"id":"36e2eebe-8268-4c36-b21c-b2e57cb62974","response":"json","ctxDetails":"{\"interface
 
com.cloud.storage.Snapshot\":\"36e2eebe-8268-4c36-b21c-b2e57cb62974\"}","cmdEventType":"SNAPSHOT.DELETE","ctxUserId":"2","httpmethod":"GET","_":"1460392443709","uuid":"36e2eebe-8268-4c36-b21c-b2e57cb62974","ctxAccountId":"2","ctxStartEventId":"284"},
 cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: 
null, initMsid: 52239507206, completeMsid: null, lastUpdated: null, lastPolled: 
null, created: null}
    2016-04-11 11:34:03,731 DEBUG [c.c.a.ApiServlet] 
(catalina-exec-5:ctx-954c6978 ctx-02ab09fe) (logid:3f05f35f) ===END===  
10.16.0.38 -- GET  
command=deleteSnapshot&id=36e2eebe-8268-4c36-b21c-b2e57cb62974&response=json&_=1460392443709
    2016-04-11 11:34:03,732 INFO  [o.a.c.f.j.i.AsyncJobMonitor] 
(API-Job-Executor-2:ctx-8c9478b9 job-123) (logid:5f0157a8) Add job-123 into job 
monitoring
    2016-04-11 11:34:03,734 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-2:ctx-8c9478b9 job-123) (logid:b6ce6bc3) Executing AsyncJobVO 
{id:123, userId: 2, accountId: 2, instanceType: Snapshot, instanceId: 1, cmd: 
org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotCmd, cmdInfo: 
{"id":"36e2eebe-8268-4c36-b21c-b2e57cb62974","response":"json","ctxDetails":"{\"interface
 
com.cloud.storage.Snapshot\":\"36e2eebe-8268-4c36-b21c-b2e57cb62974\"}","cmdEventType":"SNAPSHOT.DELETE","ctxUserId":"2","httpmethod":"GET","_":"1460392443709","uuid":"36e2eebe-8268-4c36-b21c-b2e57cb62974","ctxAccountId":"2","ctxStartEventId":"284"},
 cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: 
null, initMsid: 52239507206, completeMsid: null, lastUpdated: null, lastPolled: 
null, created: null}
    2016-04-11 11:34:03,758 DEBUG [o.a.c.s.s.XenserverSnapshotStrategy] 
(API-Job-Executor-2:ctx-8c9478b9 job-123 ctx-c230036e) (logid:b6ce6bc3) delete 
snapshot chain for snapshot: 1
    2016-04-11 11:34:03,759 DEBUG [o.a.c.s.s.XenserverSnapshotStrategy] 
(API-Job-Executor-2:ctx-8c9478b9 job-123 ctx-c230036e) (logid:b6ce6bc3) 
Snapshot: 1 doesn't have children, so it's ok to delete it and its parents
    2016-04-11 11:34:03,770 DEBUG [c.c.h.o.r.Ovm3HypervisorGuru] 
(API-Job-Executor-2:ctx-8c9478b9 job-123 ctx-c230036e) (logid:b6ce6bc3) 
getCommandHostDelegation: class 
org.apache.cloudstack.storage.command.DeleteCommand
    2016-04-11 11:34:03,770 DEBUG [c.c.h.XenServerGuru] 
(API-Job-Executor-2:ctx-8c9478b9 job-123 ctx-c230036e) (logid:b6ce6bc3) 
getCommandHostDelegation: class 
org.apache.cloudstack.storage.command.DeleteCommand
    2016-04-11 11:34:03,772 DEBUG [c.c.a.t.Request] 
(API-Job-Executor-2:ctx-8c9478b9 job-123 ctx-c230036e) (logid:b6ce6bc3) Seq 
3-826973481575907354: Sending  { Cmd , MgmtId: 52239507206, via: 3(s-1-VM), 
Ver: v1, Flags: 100011, 
[{"org.apache.cloudstack.storage.command.DeleteCommand":{"data":{"org.apache.cloudstack.storage.to.SnapshotObjectTO":{"path":"snapshots/4/8/938125ff-da6d-4355-b83a-e3aa8d941807","volume":{"uuid":"c656809e-ecec-47a0-875d-af297fb77fe3","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"f0dbafaa-52a3-3077-bc53-d7ad3a5ac132","id":4,"poolType":"RBD","host":"192.168.100.100","path":"rbdnjcloudhost","port":6789,"url":"RBD://192.168.100.100/rbdnjcloudhost/?ROLE=Primary&STOREUUID=f0dbafaa-52a3-3077-bc53-d7ad3a5ac132"}},"name":"ROOT-8","size":8589934592,"path":"c656809e-ecec-47a0-875d-af297fb77fe3","volumeId":8,"vmName":"i-4-8-VM","accountId":4,"format":"RAW","provisioningType":"THIN","id":8,"deviceId":0,"hypervisorType":"KVM"},"dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.103.0.42/secondary","_role":"Image"}},"vmName":"i-4-8-VM","name":"test","hypervisorType":"KVM","id":1,"quiescevm":false,"physicalSize":0}},"wait":0}}]
 }
    2016-04-11 11:34:04,438 DEBUG [c.c.a.t.Request] 
(AgentManager-Handler-5:null) (logid:) Seq 3-826973481575907354: Processing:  { 
Ans: , MgmtId: 52239507206, via: 3, Ver: v1, Flags: 10, 
[{"com.cloud.agent.api.Answer":{"result":true,"wait":0}}] }
    2016-04-11 11:34:04,439 DEBUG [c.c.a.t.Request] 
(API-Job-Executor-2:ctx-8c9478b9 job-123 ctx-c230036e) (logid:b6ce6bc3) Seq 
3-826973481575907354: Received:  { Ans: , MgmtId: 52239507206, via: 3(s-1-VM), 
Ver: v1, Flags: 10, { Answer } }
    2016-04-11 11:34:04,489 DEBUG [c.c.h.o.r.Ovm3HypervisorGuru] 
(API-Job-Executor-2:ctx-8c9478b9 job-123 ctx-c230036e) (logid:b6ce6bc3) 
getCommandHostDelegation: class 
org.apache.cloudstack.storage.command.DeleteCommand
    2016-04-11 11:34:04,489 DEBUG [c.c.h.XenServerGuru] 
(API-Job-Executor-2:ctx-8c9478b9 job-123 ctx-c230036e) (logid:b6ce6bc3) 
getCommandHostDelegation: class 
org.apache.cloudstack.storage.command.DeleteCommand
    2016-04-11 11:34:04,490 DEBUG [c.c.a.t.Request] 
(API-Job-Executor-2:ctx-8c9478b9 job-123 ctx-c230036e) (logid:b6ce6bc3) Seq 
1-1541075497490841823: Sending  { Cmd , MgmtId: 52239507206, via: 
1(njcloudhost.dev.ena.net), Ver: v1, Flags: 100011, 
[{"org.apache.cloudstack.storage.command.DeleteCommand":{"data":{"org.apache.cloudstack.storage.to.SnapshotObjectTO":{"path":"rbdnjcloudhost/c656809e-ecec-47a0-875d-af297fb77fe3/938125ff-da6d-4355-b83a-e3aa8d941807","volume":{"uuid":"c656809e-ecec-47a0-875d-af297fb77fe3","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"f0dbafaa-52a3-3077-bc53-d7ad3a5ac132","id":4,"poolType":"RBD","host":"192.168.100.100","path":"rbdnjcloudhost","port":6789,"url":"RBD://192.168.100.100/rbdnjcloudhost/?ROLE=Primary&STOREUUID=f0dbafaa-52a3-3077-bc53-d7ad3a5ac132"}},"name":"ROOT-8","size":8589934592,"path":"c656809e-ecec-47a0-875d-af297fb77fe3","volumeId":8,"vmName":"i-4-8-VM","accountId":4,"format":"RAW","provisioningType":"THIN","id":8,"deviceId":0,"hypervisorType":"KVM"},"dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"f0dbafaa-52a3-3077-bc53-d7ad3a5ac132","id":4,"poolType":"RBD","host":"192.168.100.100","path":"rbdnjcloudhost","port":6789,"url":"RBD://192.168.100.100/rbdnjcloudhost/?ROLE=Primary&STOREUUID=f0dbafaa-52a3-3077-bc53-d7ad3a5ac132"}},"vmName":"i-4-8-VM","name":"test","hypervisorType":"KVM","id":1,"quiescevm":false,"physicalSize":0}},"wait":0}}]
 }
    2016-04-11 11:34:04,853 DEBUG [c.c.a.t.Request] 
(AgentManager-Handler-6:null) (logid:) Seq 1-1541075497490841823: Processing:  
{ Ans: , MgmtId: 52239507206, via: 1, Ver: v1, Flags: 10, 
[{"com.cloud.agent.api.Answer":{"result":true,"details":"Snapshot 
c656809e-ecec-47a0-875d-af297fb77fe3@938125ff-da6d-4355-b83a-e3aa8d941807 
removed successfully.","wait":0}}] }
    2016-04-11 11:34:04,853 DEBUG [c.c.a.t.Request] 
(API-Job-Executor-2:ctx-8c9478b9 job-123 ctx-c230036e) (logid:b6ce6bc3) Seq 
1-1541075497490841823: Received:  { Ans: , MgmtId: 52239507206, via: 
1(njcloudhost.dev.ena.net), Ver: v1, Flags: 10, { Answer } }
    2016-04-11 11:34:04,894 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-2:ctx-8c9478b9 job-123 ctx-c230036e) (logid:b6ce6bc3) 
Complete async job-123, jobStatus: SUCCEEDED, resultCode: 0, result: 
org.apache.cloudstack.api.response.SuccessResponse/null/{"success":true}
    2016-04-11 11:34:04,894 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-2:ctx-8c9478b9 job-123 ctx-c230036e) (logid:b6ce6bc3) Publish 
async job-123 complete on message bus
    2016-04-11 11:34:04,895 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-2:ctx-8c9478b9 job-123 ctx-c230036e) (logid:b6ce6bc3) Wake up 
jobs related to job-123
    2016-04-11 11:34:04,895 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-2:ctx-8c9478b9 job-123 ctx-c230036e) (logid:b6ce6bc3) Update 
db status for job-123
    2016-04-11 11:34:04,895 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-2:ctx-8c9478b9 job-123 ctx-c230036e) (logid:b6ce6bc3) Wake up 
jobs joined with job-123 and disjoin all subjobs created from job- 123
    2016-04-11 11:34:04,899 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-2:ctx-8c9478b9 job-123) (logid:b6ce6bc3) Done executing 
org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotCmd for job-123
    2016-04-11 11:34:04,899 INFO  [o.a.c.f.j.i.AsyncJobMonitor] 
(API-Job-Executor-2:ctx-8c9478b9 job-123) (logid:b6ce6bc3) Remove job-123 from 
job monitoring
    
    
    Ceph Log show snapshot has been deleted:
    
    rbd snap ls -p rbdnjcloudhost c656809e-ecec-47a0-875d-af297fb77fe3
    <no results>



> Cleanup snapshot on KVM with RBD
> --------------------------------
>
>                 Key: CLOUDSTACK-8302
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8302
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: KVM, Snapshot, Storage Controller
>    Affects Versions: 4.4.0, 4.4.1, 4.4.2
>         Environment: CloudStack 4.4.2 + KVM on CentOS 6.6 + Ceph/RBD 0.80.8
>            Reporter: Star Guo
>            Assignee: Wido den Hollander
>            Priority: Critical
>
> I just build a lab with CloudStack 4.4.2 + CentOS 6.6 KVM + Ceph/RBD 0.80.8.
> I deploy an instance on RBD and I create the ROOT volume snapshots. When 
> delete a snapshot the UI show OK, but the snapshot of the volume in the RBD 
> pool is still exist.
> And I find the code in 
> com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java: 
> …
>     @Override
>     public Answer deleteSnapshot(DeleteCommand cmd) {
>         return new Answer(cmd);
>     }
> …
> deleteSnapshot() does not be implememented. And I also find the code:
> ...
>     @Override
>     public Answer createTemplateFromSnapshot(CopyCommand cmd) {
>         return null;  //To change body of implemented methods use File | 
> Settings | File Templates.
>     }
> ...
> So does createTenokateFromSnapshot(). I just look for it in MASTER branch but 
> not do that yet. Will CloudStack Dev Team plan to do that ? Thanks .



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to