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

Chris Suich commented on CLOUDSTACK-5825:
-----------------------------------------

So, during "orchestrateTakeVolumeSnapshot(work.getVolumeId(), 
work.getPolicyId(), work.getSnapshotId(), account, work.isQuiesceVm());” if an 
exception is thrown, it is caught and ignored by 
VolumeServiceImpl.takeSnapshot(VolumeInfo):

@Override
public SnapshotInfo takeSnapshot(VolumeInfo volume) {
    SnapshotInfo snapshot = null;
    try {
        snapshot = snapshotMgr.takeSnapshot(volume);
    } catch (Exception e) {
        s_logger.debug("Take snapshot: " + volume.getId() + " failed", e);
    }

    return snapshot;
}

So, "return new Pair<JobInfo.Status, String>(JobInfo.Status.SUCCEEDED,  
_jobMgr.marshallResultObject(work.getSnapshotId()));” will return 
JobInfo.Status.SUCCEEDED even when an exception was thrown.

That said, I’m now getting a warning that 
VolumeApiServiceImpl.orchestrateTakeVolumeSnapshot(VmWorkTakeVolumeSnapshot) is 
never called, so I’m not sure if this method trace has changed since I reported 
the issue.

> Create snapshot API always returns success
> ------------------------------------------
>
>                 Key: CLOUDSTACK-5825
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5825
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: API
>    Affects Versions: 4.3.0
>            Reporter: Chris Suich
>            Assignee: Alex Hitchins
>            Priority: Critical
>              Labels: api, create, snapshot
>         Attachments: Snapshot_Logs.txt, snapshot_failure.JPG
>
>
> VolumeApiServiceImpl.orchestrateTakeVolumeSnapshot() to
> VolumeServiceImpl.takeSnapshot(), you’ll notice that ANY exception that is 
> thrown inside of SnapshotManager.takeSnapshot() is simply caught and ignored.
> Back up in VolumeApiServiceImpl.orchestrateTakeVolumeSnapshot(), 
> JobInfo.Status.SUCCEEDED is ALWAYS returned, regardless of the snapshot 
> result.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to