From 0eb41b75a5b6a1037e9bbe565d4cf0a7cb9e8340 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 8 Dec 2015 14:29:01 +0000 Subject: [PATCH] trivial: Add additional logs for NUMA scheduling Expand logs to provide operators with future information on why NUMA scheduling may have failed for a given host. Change-Id: I57e639d5e25485e3fa1112adf48a35ff847e20f9 --- nova/virt/hardware.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/nova/virt/hardware.py b/nova/virt/hardware.py index 2a8d49fb7e0c..53d53e252c5f 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