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/4.5 to a1a601b
Date Mon, 19 Jan 2015 06:00:34 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 fd0eb6c29 -> a1a601be5


CLOUDSTACK-8164: Look for all host to avoid NPE

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

Branch: refs/heads/4.5
Commit: a1a601be5a08a42739c3ef999f551db1b7bd7749
Parents: fd0eb6c
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:29:51 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/a1a601be/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/a1a601be/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 6590a74..e7df088 100644
--- a/server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
+++ b/server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
@@ -748,6 +748,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