cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [25/34] git commit: updated refs/heads/ui-restyle to 23093ed
Date Thu, 26 Sep 2013 18:03:26 GMT
 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/7d8a7f85
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7d8a7f85
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7d8a7f85

Branch: refs/heads/ui-restyle
Commit: 7d8a7f855df47c645746d1ab35dd379ec1ed60e4
Parents: 4fb4593
Author: Edison Su <sudison@gmail.com>
Authored: Wed Sep 25 16:32:40 2013 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Wed Sep 25 16:32:40 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/engine/orchestration/VolumeOrchestrator.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7d8a7f85/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
index 088c943..7258e25 100644
--- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
@@ -1084,7 +1084,8 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
     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