cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject git commit: updated refs/heads/master to d8def3d
Date Mon, 19 Jan 2015 06:01:00 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master cecab95cc -> d8def3dc0


CLOUDSTACK-8164: Look for all host to avoid NPE

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit a1a601be5a08a42739c3ef999f551db1b7bd7749)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/master
Commit: d8def3dc0b6e0099380448d61aa44d5052128acf
Parents: cecab95
Author: Abhinandan Prateek <abhinandan.prateek@shapeblue.com>
Authored: Mon Jan 19 11:29:22 2015 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Jan 19 11:30:49 2015 +0530

----------------------------------------------------------------------
 .../org/apache/cloudstack/storage/helper/VMSnapshotHelperImpl.java | 2 +-
 server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java        | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d8def3dc/engine/storage/src/org/apache/cloudstack/storage/helper/VMSnapshotHelperImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/helper/VMSnapshotHelperImpl.java
b/engine/storage/src/org/apache/cloudstack/storage/helper/VMSnapshotHelperImpl.java
index a1bcd45..cadbad3 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/helper/VMSnapshotHelperImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/helper/VMSnapshotHelperImpl.java
@@ -82,7 +82,7 @@ public class VMSnapshotHelperImpl implements VMSnapshotHelper {
 
         // check if lastHostId is available
         if (vm.getLastHostId() != null) {
-            HostVO lastHost = hostDao.findById(vm.getLastHostId());
+            HostVO lastHost = hostDao.findByIdIncludingRemoved(vm.getLastHostId());
             if (lastHost.getStatus() == com.cloud.host.Status.Up && !lastHost.isInMaintenanceStates())
                 return lastHost.getId();
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d8def3dc/server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java b/server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
index 5ead59a..b49db9b 100644
--- a/server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
+++ b/server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
@@ -760,6 +760,8 @@ public class VMSnapshotManagerImpl extends ManagerBase implements VMSnapshotMana
             if (jobResult != null) {
                 if (jobResult instanceof ConcurrentOperationException)
                     throw (ConcurrentOperationException)jobResult;
+                else if (jobResult instanceof InvalidParameterValueException)
+                    throw (InvalidParameterValueException)jobResult;
                 else if (jobResult instanceof Throwable)
                     throw new RuntimeException("Unexpected exception", (Throwable)jobResult);
             }


Mime
View raw message