mirror of https://github.com/apache/cloudstack.git
CS-15560 : Improve HVM logging of hosts
When a host is not considered for deployment because it has disabled HVM, then call that out in the logs for debugging. Signed-off-by: Nitin Mehta<nitin.mehta@citrix.com>
This commit is contained in:
parent
50373b99d6
commit
3d7f6a35ad
|
|
@ -285,6 +285,7 @@ public class FirstFitAllocator implements HostAllocator {
|
|||
String templateGuestOSCategory = getTemplateGuestOSCategory(template);
|
||||
|
||||
List<HostVO> prioritizedHosts = new ArrayList<HostVO>();
|
||||
List<HostVO> noHvmHosts = new ArrayList<HostVO>();
|
||||
|
||||
// If a template requires HVM and a host doesn't support HVM, remove it from consideration
|
||||
List<HostVO> hostsToCheck = new ArrayList<HostVO>();
|
||||
|
|
@ -292,12 +293,19 @@ public class FirstFitAllocator implements HostAllocator {
|
|||
for (HostVO host : hosts) {
|
||||
if (hostSupportsHVM(host)) {
|
||||
hostsToCheck.add(host);
|
||||
} else {
|
||||
noHvmHosts.add(host);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
hostsToCheck.addAll(hosts);
|
||||
}
|
||||
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
if (noHvmHosts.size() > 0) {
|
||||
s_logger.debug("Not considering hosts: " + noHvmHosts + " to deploy template: " + template +" as they are not HVM enabled");
|
||||
}
|
||||
}
|
||||
// If a host is tagged with the same guest OS category as the template, move it to a high priority list
|
||||
// If a host is tagged with a different guest OS category than the template, move it to a low priority list
|
||||
List<HostVO> highPriorityHosts = new ArrayList<HostVO>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue