mirror of https://github.com/apache/cloudstack.git
Merge remote-tracking branch 'origin/4.13' into 4.14
This commit is contained in:
commit
b141b8e256
|
|
@ -16,6 +16,7 @@
|
||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.deploy;
|
package com.cloud.deploy;
|
||||||
|
|
||||||
|
import com.cloud.dc.DataCenter;
|
||||||
import com.cloud.deploy.DeploymentPlanner.ExcludeList;
|
import com.cloud.deploy.DeploymentPlanner.ExcludeList;
|
||||||
import com.cloud.exception.AffinityConflictException;
|
import com.cloud.exception.AffinityConflictException;
|
||||||
import com.cloud.exception.InsufficientServerCapacityException;
|
import com.cloud.exception.InsufficientServerCapacityException;
|
||||||
|
|
@ -49,4 +50,6 @@ public interface DeploymentPlanningManager extends Manager {
|
||||||
void cleanupVMReservations();
|
void cleanupVMReservations();
|
||||||
|
|
||||||
DeploymentPlanner getDeploymentPlannerByName(String plannerName);
|
DeploymentPlanner getDeploymentPlannerByName(String plannerName);
|
||||||
|
|
||||||
|
void checkForNonDedicatedResources(VirtualMachineProfile vmProfile, DataCenter dc, ExcludeList avoids);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -362,9 +362,6 @@ StateListener<State, VirtualMachine.Event, VirtualMachine> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm.getType() == VirtualMachine.Type.User) {
|
|
||||||
checkForNonDedicatedResources(vmProfile, dc, avoids);
|
|
||||||
}
|
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Deploy avoids pods: " + avoids.getPodsToAvoid() + ", clusters: " + avoids.getClustersToAvoid() + ", hosts: " + avoids.getHostsToAvoid());
|
s_logger.debug("Deploy avoids pods: " + avoids.getPodsToAvoid() + ", clusters: " + avoids.getClustersToAvoid() + ", hosts: " + avoids.getHostsToAvoid());
|
||||||
}
|
}
|
||||||
|
|
@ -572,7 +569,8 @@ StateListener<State, VirtualMachine.Event, VirtualMachine> {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkForNonDedicatedResources(VirtualMachineProfile vmProfile, DataCenter dc, ExcludeList avoids) {
|
@Override
|
||||||
|
public void checkForNonDedicatedResources(VirtualMachineProfile vmProfile, DataCenter dc, ExcludeList avoids) {
|
||||||
boolean isExplicit = false;
|
boolean isExplicit = false;
|
||||||
VirtualMachine vm = vmProfile.getVirtualMachine();
|
VirtualMachine vm = vmProfile.getVirtualMachine();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1343,6 +1343,11 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vm.getType() == VirtualMachine.Type.User || vm.getType() == VirtualMachine.Type.DomainRouter) {
|
||||||
|
final DataCenterVO dc = _dcDao.findById(srcHost.getDataCenterId());
|
||||||
|
_dpMgr.checkForNonDedicatedResources(vmProfile, dc, excludes);
|
||||||
|
}
|
||||||
|
|
||||||
for (final HostAllocator allocator : hostAllocators) {
|
for (final HostAllocator allocator : hostAllocators) {
|
||||||
if (canMigrateWithStorage) {
|
if (canMigrateWithStorage) {
|
||||||
suitableHosts = allocator.allocateTo(vmProfile, plan, Host.Type.Routing, excludes, allHosts, HostAllocator.RETURN_UPTO_ALL, false);
|
suitableHosts = allocator.allocateTo(vmProfile, plan, Host.Type.Routing, excludes, allHosts, HostAllocator.RETURN_UPTO_ALL, false);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue