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

git commit: updated refs/heads/master to 7e08764

Updated Branches:
  refs/heads/master 598a64710 -> 7e087645c


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/7e087645
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7e087645
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7e087645

Branch: refs/heads/master
Commit: 7e087645c6a1b5fb26738f97a7eff655a604e6c3
Parents: 598a647
Author: Sateesh Chodapuneedi <sa...@apache.org>
Authored: Thu Jul 18 00:51:07 2013 +0530
Committer: Sateesh Chodapuneedi <sa...@apache.org>
Committed: Thu Jul 18 23:29:54 2013 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e087645/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);