Skip to content

Commit 6aa828b

Browse files
changes
1 parent 9071c47 commit 6aa828b

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
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;

server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,8 +843,6 @@ public Long migrate(final HaWorkVO work) {
843843
logger.info(String.format("VM %s is running on a different host %s, skipping migration", vm, vm.getHostId()));
844844
return null;
845845
}
846-
logger.info("Migration attempt: for VM " + vm.getUuid() + " from host id " + srcHostId +
847-
". Starting attempt: " + (1 + work.getTimesTried()) + "/" + _maxRetries + " times.");
848846

849847
try {
850848
work.setStep(Step.Migrating);

0 commit comments

Comments
 (0)