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:13:26 UTC

git commit: updated refs/heads/4.3 to 67785c2

Updated Branches:
  refs/heads/4.3 6a63fb446 -> 67785c2ad


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

Branch: refs/heads/4.3
Commit: 67785c2ad683342ebe0622db955db505b499a6c7
Parents: 6a63fb4
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:13:16 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/67785c2a/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 b74ebf1..8cfc859 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -462,11 +462,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>();