add logging to deployment planners (#5859)

Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>

Co-authored-by: Daan Hoogland <dahn@onecht.net>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>
This commit is contained in:
dahn 2022-02-04 17:02:32 +01:00 committed by GitHub
parent 966b32c234
commit 0f1cd6009d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 29 additions and 6 deletions

View File

@ -355,7 +355,7 @@ public abstract class BaseCmd {
if (roleIsAllowed) {
validFields.add(field);
} else {
s_logger.debug("Ignoring paremeter " + parameterAnnotation.name() + " as the caller is not authorized to pass it in");
s_logger.debug("Ignoring parameter " + parameterAnnotation.name() + " as the caller is not authorized to pass it in");
}
}

View File

@ -221,7 +221,7 @@ public class VMEntityManagerImpl implements VMEntityManager {
// call retry it.
return UUID.randomUUID().toString();
} else {
throw new InsufficientServerCapacityException("Unable to create a deployment for " + vmProfile, DataCenter.class, plan.getDataCenterId(),
throw new InsufficientServerCapacityException("No destination found for a deployment for " + vmProfile, DataCenter.class, plan.getDataCenterId(),
areAffinityGroupsAssociated(vmProfile));
}
}

View File

@ -305,6 +305,9 @@ public class ExplicitDedicationProcessor extends AffinityProcessorBase implement
for (HostPodVO pod : podList) {
DedicatedResourceVO dPod = _dedicatedDao.findByPodId(pod.getId());
if (dPod != null && !dedicatedResources.contains(dPod)) {
if (s_logger.isDebugEnabled()) {
s_logger.debug(String.format("Avoiding POD %s [%s] because it is not dedicated.", pod.getName(), pod.getUuid()));
}
avoidList.addPod(pod.getId());
} else {
includeList.addPod(pod.getId());
@ -343,6 +346,9 @@ public class ExplicitDedicationProcessor extends AffinityProcessorBase implement
for (HostPodVO pod : pods) {
if (podsInIncludeList != null && !podsInIncludeList.contains(pod.getId())) {
if (s_logger.isDebugEnabled()) {
s_logger.debug(String.format("Avoiding POD %s [%s], as it is not in include list.", pod.getName(), pod.getUuid()));
}
avoidList.addPod(pod.getId());
}
}

View File

@ -107,7 +107,7 @@ public class ImplicitDedicationPlanner extends FirstFitPlanner implements Deploy
}
}
// Hosts running vms of other accounts created by ab implicit planner in strict mode should always be avoided.
// Hosts running vms of other accounts created by an implicit planner in strict mode should always be avoided.
avoid.addHostList(hostRunningStrictImplicitVmsOfOtherAccounts);
if (!hostRunningVmsOfAccount.isEmpty() && (hostsToAvoid == null || !hostsToAvoid.containsAll(hostRunningVmsOfAccount))) {

View File

@ -754,9 +754,17 @@ StateListener<State, VirtualMachine.Event, VirtualMachine>, Configurable {
//Only when the type is instance VM and not explicitly dedicated.
if (vm.getType() == VirtualMachine.Type.User && !isExplicit) {
//add explicitly dedicated resources in avoidList
if (s_logger.isDebugEnabled()) {
s_logger.debug("Adding pods to avoid lists for non-explicit VM deployment: " + allPodsInDc);
}
avoids.addPodList(allPodsInDc);
if (s_logger.isDebugEnabled()) {
s_logger.debug("Adding clusters to avoid lists for non-explicit VM deployment: " + allClustersInDc);
}
avoids.addClusterList(allClustersInDc);
if (s_logger.isDebugEnabled()) {
s_logger.debug("Adding hosts to avoid lists for non-explicit VM deployment: " + allHostsInDc);
}
avoids.addHostList(allHostsInDc);
}
@ -835,8 +843,17 @@ StateListener<State, VirtualMachine.Event, VirtualMachine>, Configurable {
}
//Add in avoid list or no addition if no dedication
if (s_logger.isDebugEnabled()) {
s_logger.debug("Adding pods to avoid lists: " + allPodsInDc);
}
avoids.addPodList(allPodsInDc);
if (s_logger.isDebugEnabled()) {
s_logger.debug("Adding clusters to avoid lists: " + allClustersInDc);
}
avoids.addClusterList(allClustersInDc);
if (s_logger.isDebugEnabled()) {
s_logger.debug("Adding hosts to avoid lists: " + allHostsInDc);
}
avoids.addHostList(allHostsInDc);
}
}

View File

@ -1674,7 +1674,7 @@
"label.powerflex.gateway.username": "Gateway Username",
"label.powerflex.storage.pool": "Storage Pool",
"label.powerstate": "Power State",
"label.preferred": "Prefered",
"label.preferred": "Preferred",
"label.presetup": "PreSetup",
"label.prev": "Prev",
"label.previous": "Previous",

View File

@ -394,7 +394,7 @@
<a-radio-button value="strict">
{{ $t('label.strict') }}
</a-radio-button>
<a-radio-button value="preferred">
<a-radio-button value="Preferred">
{{ $t('label.preferred') }}
</a-radio-button>
</a-radio-group>