cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sate...@apache.org
Subject git commit: updated refs/heads/master to 7e08764
Date Thu, 18 Jul 2013 18:00:47 GMT
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 <sateesh@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 <sateesh@apache.org>
Authored: Thu Jul 18 00:51:07 2013 +0530
Committer: Sateesh Chodapuneedi <sateesh@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);


Mime
View raw message