incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject git commit: CS-15560 : Improve HVM logging of hosts
Date Fri, 13 Jul 2012 17:55:38 GMT
Updated Branches:
  refs/heads/master 50373b99d -> 3d7f6a35a


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>


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/3d7f6a35
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/3d7f6a35
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/3d7f6a35

Branch: refs/heads/master
Commit: 3d7f6a35ad2ab1e335b3beeb52d278bfd355a791
Parents: 50373b9
Author: Prasanna Santhanam <Prasanna.Santhanam@citrix.com>
Authored: Fri Jul 13 10:49:49 2012 -0700
Committer: U-nitin-PC\nitin <nitin@nitin-PC.(none)>
Committed: Fri Jul 13 10:51:56 2012 -0700

----------------------------------------------------------------------
 .../manager/allocator/impl/FirstFitAllocator.java  |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3d7f6a35/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java b/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java
index 0f163cc..2789231 100755
--- a/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java
+++ b/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java
@@ -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>();


Mime
View raw message