You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by an...@apache.org on 2014/02/03 23:17:31 UTC

git commit: updated refs/heads/4.3 to 8f63c2c

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 <an...@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 <mi...@citrix.com>
Authored: Mon Feb 3 12:16:19 2014 -0800
Committer: Animesh Chaturvedi <an...@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);
                 }