Skip to content

Commit 5ec03de

Browse files
changes
1 parent 9071c47 commit 5ec03de

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,17 +388,16 @@ public DeployDestination planDeployment(VirtualMachineProfile vmProfile, Deploym
388388
HostVO host = _hostDao.findById(vm.getLastHostId());
389389
if (host == null) {
390390
if (Boolean.TRUE.toString().equalsIgnoreCase(considerLastHostStr)) {
391-
throw new CloudRuntimeException("Failed to deploy VM, last host doesn't exists");
391+
throw new CloudRuntimeException("Failed to deploy VM, last host doesn't exist");
392392
}
393393
} else {
394+
logger.debug("VM's last host is {}, trying to choose the same host if it is not in maintenance state", host);
394395
if (host.isInMaintenanceStates()) {
395396
if (Boolean.TRUE.toString().equalsIgnoreCase(considerLastHostStr)) {
396397
throw new CloudRuntimeException("Failed to deploy VM, last host is in maintenance state");
397398
}
398399
} else {
399-
logger.debug("VM's last {}, trying to choose the same host", host);
400400
lastHost = host;
401-
402401
DeployDestination deployDestination = deployInVmLastHost(vmProfile, plan, avoids, planner, vm, dc, offering, cpuRequested, ramRequested, volumesRequireEncryption);
403402
if (deployDestination != null) {
404403
return deployDestination;

0 commit comments

Comments
 (0)