Updated Branches: refs/heads/master 7a5efcc2e -> 829acf6e2
CS-15551 : if 'xen.check.hvm' is false, don't check template hvm in allocator Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/829acf6e Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/829acf6e Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/829acf6e Branch: refs/heads/master Commit: 829acf6e27b6f000d72715fedd69e885a1537501 Parents: 7a5efcc Author: anthony <[email protected]> Authored: Thu Jul 12 11:16:03 2012 -0700 Committer: anthony <[email protected]> Committed: Fri Jul 13 16:45:57 2012 -0700 ---------------------------------------------------------------------- .../manager/allocator/impl/FirstFitAllocator.java | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/829acf6e/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 2789231..ac2e92b 100755 --- a/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java +++ b/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java @@ -81,6 +81,7 @@ public class FirstFitAllocator implements HostAllocator { @Inject VMInstanceDao _vmInstanceDao = null; @Inject ResourceManager _resourceMgr; float _factor = 1; + boolean _checkHvm = true; protected String _allocationAlgorithm = "random"; @Inject CapacityManager _capacityMgr; @@ -343,6 +344,9 @@ public class FirstFitAllocator implements HostAllocator { } protected boolean hostSupportsHVM(HostVO host) { + if ( !_checkHvm ) { + return true; + } // Determine host capabilities String caps = host.getCapabilities(); @@ -411,6 +415,8 @@ public class FirstFitAllocator implements HostAllocator { if (allocationAlgorithm != null) { _allocationAlgorithm = allocationAlgorithm; } + String value = configs.get("xen.check.hvm"); + _checkHvm = value == null ? true : Boolean.parseBoolean(value); } return true; }
