You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by de...@apache.org on 2013/07/16 08:31:01 UTC

git commit: updated refs/heads/master to 04a8682

Updated Branches:
  refs/heads/master a67cce3d2 -> 04a868231


CLOUDSTACK-3545: NPE in listStoragePoolsForMigration api. The volume table no longer holds
the pod id, the column is null now. Made a change to get the pod id from the storage pool
on which the volume resides.


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

Branch: refs/heads/master
Commit: 04a868231311477dde8e60d4f87a0360ef681dd1
Parents: a67cce3
Author: Devdeep Singh <de...@gmail.com>
Authored: Tue Jul 16 12:01:28 2013 +0530
Committer: Devdeep Singh <de...@gmail.com>
Committed: Tue Jul 16 12:01:28 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/server/ManagementServerImpl.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a86823/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java
index cdffb16..29272dd 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -1254,11 +1254,10 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
             // Get all the pools available. Only shared pools are considered because only a volume on a shared pools
             // can be live migrated while the virtual machine stays on the same host.
             List<StoragePoolVO> storagePools = null;
-
             if (srcVolumePool.getClusterId() == null) {
                 storagePools = _poolDao.findZoneWideStoragePoolsByTags(volume.getDataCenterId(), null);
             } else {
-                storagePools = _poolDao.findPoolsByTags(volume.getDataCenterId(), volume.getPodId(), srcVolumePool.getClusterId(), null);
+                storagePools = _poolDao.findPoolsByTags(volume.getDataCenterId(), srcVolumePool.getPodId(), srcVolumePool.getClusterId(), null);
             }
 
             storagePools.remove(srcVolumePool);
@@ -1274,7 +1273,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
             avoid.addPool(srcVolumePool.getId());
 
             // Volume stays in the same cluster after migration.
-            DataCenterDeployment plan = new DataCenterDeployment(volume.getDataCenterId(), volume.getPodId(),
+            DataCenterDeployment plan = new DataCenterDeployment(volume.getDataCenterId(), srcVolumePool.getPodId(),
                     srcVolumePool.getClusterId(), null, null, null);
             VirtualMachineProfile<VMInstanceVO> profile = new VirtualMachineProfileImpl<VMInstanceVO>(vm);