Merge "trivial: Add additional logs for NUMA scheduling"

This commit is contained in:
Jenkins 2016-01-22 03:54:15 +00:00 committed by Gerrit Code Review
commit fab87a2a86

View File

@ -1200,8 +1200,16 @@ def numa_fit_instance_to_host(
InstanceNUMATopology with it's cell ids set to host cell id's of InstanceNUMATopology with it's cell ids set to host cell id's of
the first successful permutation, or None. the first successful permutation, or None.
""" """
if (not (host_topology and instance_topology) or if not (host_topology and instance_topology):
len(host_topology) < len(instance_topology)): LOG.debug("Require both a host and instance NUMA topology to "
"fit instance on host.")
return
elif len(host_topology) < len(instance_topology):
LOG.debug("There are not enough free cores on the system to schedule "
"the instance correctly. Required: %(required)s, actual: "
"%(actual)s",
{'required': len(instance_topology),
'actual': len(host_topology)})
return return
else: else:
# TODO(ndipanov): We may want to sort permutations differently # TODO(ndipanov): We may want to sort permutations differently