mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3595 Backup snapshot successful but CopyCmdAnswer received is failure.
Send success answer of type CopyCmdAnswer with full snapshot backup path in secondary store (image store role) Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
This commit is contained in:
parent
598a647105
commit
7e087645c6
|
|
@ -725,14 +725,16 @@ public class VmwareStorageProcessor implements StorageProcessor {
|
|||
hostService.getWorkerName(context, cmd, 1));
|
||||
|
||||
success = (snapshotBackupUuid != null);
|
||||
if (success) {
|
||||
details = "Successfully backedUp the snapshotUuid: " + snapshotUuid + " to secondary storage.";
|
||||
return new CopyCmdAnswer(details);
|
||||
} else {
|
||||
SnapshotObjectTO newSnapshot = new SnapshotObjectTO();
|
||||
newSnapshot.setPath(snapshotBackupUuid);
|
||||
return new CopyCmdAnswer(newSnapshot);
|
||||
}
|
||||
|
||||
if (!success) {
|
||||
details = "Failed to backUp the snapshot with uuid: " + snapshotUuid + " to secondary storage.";
|
||||
return new CopyCmdAnswer(details);
|
||||
} else {
|
||||
details = "Successfully backedUp the snapshot with Uuid: " + snapshotUuid + " to secondary storage.";
|
||||
SnapshotObjectTO newSnapshot = new SnapshotObjectTO();
|
||||
newSnapshot.setPath(destSnapshot.getPath() + "/" + snapshotBackupUuid);
|
||||
return new CopyCmdAnswer(newSnapshot);
|
||||
}
|
||||
} finally {
|
||||
if(vmMo != null){
|
||||
ManagedObjectReference snapshotMor = vmMo.getSnapshotMor(snapshotUuid);
|
||||
|
|
|
|||
Loading…
Reference in New Issue