You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ed...@apache.org on 2013/07/18 19:32:22 UTC

git commit: updated refs/heads/4.2 to 7186473

Updated Branches:
  refs/heads/4.2 b50060be0 -> 7186473e3


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 <sa...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7186473e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7186473e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7186473e

Branch: refs/heads/4.2
Commit: 7186473e33958903d27bf7764b1c6933d829e5dd
Parents: b50060b
Author: Sateesh Chodapuneedi <sa...@apache.org>
Authored: Thu Jul 18 00:51:07 2013 +0530
Committer: Edison Su <su...@gmail.com>
Committed: Thu Jul 18 10:31:52 2013 -0700

----------------------------------------------------------------------
 .../storage/resource/VmwareStorageProcessor.java  | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7186473e/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
index 3436c5b..2b9949b 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
@@ -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);