cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anim...@apache.org
Subject git commit: updated refs/heads/4.3 to 8f63c2c
Date Mon, 03 Feb 2014 22:17:31 GMT
Updated Branches:
  refs/heads/4.3 91ec548fc -> 8f63c2cf9


CLOUDSTACK-6017: NPE while creating snapshot multiple times on same Root
volume with S3 as secondary storage.
(cherry picked from commit 402254337c8f29e5bdef4996953284d36043f8ea)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>


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

Branch: refs/heads/4.3
Commit: 8f63c2cf9c463373d774cb563e63fc56828e1418
Parents: 91ec548
Author: Min Chen <min.chen@citrix.com>
Authored: Mon Feb 3 12:16:19 2014 -0800
Committer: Animesh Chaturvedi <animesh@apache.org>
Committed: Mon Feb 3 14:05:20 2014 -0800

----------------------------------------------------------------------
 .../org/apache/cloudstack/storage/snapshot/SnapshotObject.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f63c2cf/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java
----------------------------------------------------------------------
diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java
b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java
index 314ce8e..a69b2d7 100644
--- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java
+++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java
@@ -288,7 +288,10 @@ public class SnapshotObject implements SnapshotInfo {
             } else if (answer instanceof CopyCmdAnswer) {
                 SnapshotObjectTO snapshotTO = (SnapshotObjectTO) ((CopyCmdAnswer) answer).getNewData();
                 snapshotStore.setInstallPath(snapshotTO.getPath());
-                snapshotStore.setSize(snapshotTO.getPhysicalSize());
+                if (snapshotTO.getPhysicalSize() != null) {
+                    // For S3 delta snapshot, physical size is currently not set
+                    snapshotStore.setSize(snapshotTO.getPhysicalSize());
+                }
                 if (snapshotTO.getParentSnapshotPath() == null) {
                     snapshotStore.setParentSnapshotId(0L);
                 }


Mime
View raw message