mirror of https://github.com/apache/cloudstack.git
Fix vm.getPodId issue
This commit is contained in:
parent
6618440202
commit
741a19c944
|
|
@ -192,7 +192,7 @@ public class FirstFitPlanner extends PlannerBase implements DeploymentPlanner {
|
|||
|
||||
Pair<Host, Map<Volume, StoragePool>> potentialResources = findPotentialDeploymentResources(suitableHosts, suitableVolumeStoragePools);
|
||||
if(potentialResources != null){
|
||||
Pod pod = _podDao.findById(vm.getPodId());
|
||||
Pod pod = _podDao.findById(host.getPodId());
|
||||
Cluster cluster = _clusterDao.findById(host.getClusterId());
|
||||
Map<Volume, StoragePool> storageVolMap = potentialResources.second();
|
||||
// remove the reused vol<->pool from destination, since we don't have to prepare this volume.
|
||||
|
|
|
|||
|
|
@ -1268,12 +1268,12 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene
|
|||
T rebootedVm = null;
|
||||
|
||||
DataCenter dc = _configMgr.getZone(vm.getDataCenterId());
|
||||
HostPodVO pod = _configMgr.getPod(vm.getPodId());
|
||||
Host host = _hostDao.findById(vm.getHostId());
|
||||
Cluster cluster = null;
|
||||
if (host != null) {
|
||||
cluster = _configMgr.getCluster(host.getClusterId());
|
||||
}
|
||||
HostPodVO pod = _configMgr.getPod(host.getPodId());
|
||||
DeployDestination dest = new DeployDestination(dc, pod, cluster, host);
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue