Updated Branches: refs/heads/4.2 2f85c8065 -> c59c736f9
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/c59c736f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c59c736f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c59c736f Branch: refs/heads/4.2 Commit: c59c736f985762d5d5fb991731c19ce1e69e0098 Parents: 2f85c80 Author: Devdeep Singh <[email protected]> Authored: Tue Jul 16 12:01:28 2013 +0530 Committer: Devdeep Singh <[email protected]> Committed: Tue Jul 16 12:04:36 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/c59c736f/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);
