cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject git commit: updated refs/heads/4.2-forward to cb170d6
Date Mon, 09 Sep 2013 23:03:50 GMT
Updated Branches:
  refs/heads/4.2-forward 37c87a84f -> cb170d6af


CLOUDSTACK-4627: fix NPE in vm migration


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

Branch: refs/heads/4.2-forward
Commit: cb170d6afdab20bd63f17728b8f04a05f14ebcec
Parents: 37c87a8
Author: Edison Su <sudison@gmail.com>
Authored: Mon Sep 9 15:58:22 2013 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Mon Sep 9 15:58:22 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/storage/VolumeManagerImpl.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cb170d6a/server/src/com/cloud/storage/VolumeManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java b/server/src/com/cloud/storage/VolumeManagerImpl.java
index 4569202..232b640 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -2657,7 +2657,8 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager
{
     public boolean canVmRestartOnAnotherServer(long vmId) {
         List<VolumeVO> vols = _volsDao.findCreatedByInstance(vmId);
         for (VolumeVO vol : vols) {
-            if (!vol.isRecreatable() && !vol.getPoolType().isShared()) {
+            StoragePoolVO storagePoolVO = _storagePoolDao.findById(vol.getPoolId());
+            if (!vol.isRecreatable() && storagePoolVO != null && storagePoolVO.getPoolType()
!= null && !(storagePoolVO.getPoolType().isShared())) {
                 return false;
             }
         }


Mime
View raw message