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

git commit: updated refs/heads/master to b084cc4

Updated Branches:
  refs/heads/master cf0a11e45 -> b084cc469


CLOUDSTACK-5283:
Not able to list snapshots when few snapshots are in "CreatedOnPrimary" state. Dont throw an exception when snapshot doesnt have an entry in the snapshot store ref for the snapshot in Image store because that fails to list all snapshots and also it can a perfect use case when the backup flag is not turned on.


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

Branch: refs/heads/master
Commit: b084cc469a0b394178c33a8b1621a97879cc9f53
Parents: cf0a11e
Author: Nitin Mehta <ni...@citrix.com>
Authored: Thu Dec 12 13:13:16 2013 -0800
Committer: Nitin Mehta <ni...@citrix.com>
Committed: Thu Dec 12 13:18:56 2013 -0800

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiResponseHelper.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b084cc46/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index a5eaf23..86f0e27 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -465,11 +465,12 @@ public class ApiResponseHelper implements ResponseGenerator {
         }
 
         if (snapshotInfo == null) {
-            throw new CloudRuntimeException("Unable to find info for image store snapshot with uuid '" + snapshot.getUuid() + "'");
+            s_logger.debug("Unable to find info for image store snapshot with uuid "+snapshot.getUuid());
+            snapshotResponse.setRevertable(false);
+        }else{
+            snapshotResponse.setRevertable(snapshotInfo.isRevertable());
         }
 
-        snapshotResponse.setRevertable(snapshotInfo.isRevertable());
-
         // set tag information
         List<? extends ResourceTag> tags = ApiDBUtils.listByResourceTypeAndId(ResourceObjectType.Snapshot, snapshot.getId());
         List<ResourceTagResponse> tagResponses = new ArrayList<ResourceTagResponse>();