diff --git a/nova/virt/hardware.py b/nova/virt/hardware.py index 5e51d50de0df..98ad15419a7f 100644 --- a/nova/virt/hardware.py +++ b/nova/virt/hardware.py @@ -1200,8 +1200,16 @@ def numa_fit_instance_to_host( InstanceNUMATopology with it's cell ids set to host cell id's of the first successful permutation, or None. """ - if (not (host_topology and instance_topology) or - len(host_topology) < len(instance_topology)): + if not (host_topology and 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 else: # TODO(ndipanov): We may want to sort permutations differently