Add logging to capabilities filter
The capabilities filter gets incorrectly blamed for a lot of deployment failures because on a retry of a node deployment the filter has to fail because there is only one node that can match when using predictable placement. However, we don't have any logging to help determine why the filter fails. This adds logging to explain why nodes fell through, which will hopefully help with debugging these problems. Change-Id: I702209e9b5a1e546bf8cb784eec8bdc3c97c63eb Closes-Bug: 1718502
This commit is contained in:
parent
b46a35a40e
commit
e5d1615536
|
@ -13,6 +13,10 @@
|
|||
# under the License.
|
||||
|
||||
from nova.scheduler import filters
|
||||
from oslo_log import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TripleOCapabilitiesFilter(filters.BaseHostFilter):
|
||||
|
@ -31,5 +35,13 @@ class TripleOCapabilitiesFilter(filters.BaseHostFilter):
|
|||
instance_node = spec_obj.scheduler_hints.get('capabilities:node')
|
||||
# The instance didn't request a specific node
|
||||
if not instance_node:
|
||||
LOG.debug('No specific node requested')
|
||||
return True
|
||||
return host_node == instance_node[0]
|
||||
if host_node == instance_node[0]:
|
||||
LOG.debug('Node tagged %s matches requested node %s', host_node,
|
||||
instance_node[0])
|
||||
return True
|
||||
else:
|
||||
LOG.debug('Node tagged %s does not match requested node %s',
|
||||
host_node, instance_node[0])
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue