From: Eric Harney Date: Wed, 3 Feb 2016 19:54:38 +0000 (-0500) Subject: Improve logging to debug invalid "extra_specs" entries X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=d36762fcf98774560fe82b32b2d64d2eba1ec72b;p=openstack-build%2Fcinder-build.git Improve logging to debug invalid "extra_specs" entries When volume creation fails due to invalid extra_specs entry, it's hard to find a mismatch between extra_specs and capabilities exposed by multiple hosts. This additional log printing will help to detect a root cause of the failure. See-Also: Ibca56c8ad4cc473ad35f1c79e9892acbf08bf5f1 Co-Authored-By: Sergey Gotliv Change-Id: I921a8df18684221c424570882e7b932fc648acb1 --- diff --git a/cinder/scheduler/filters/capabilities_filter.py b/cinder/scheduler/filters/capabilities_filter.py index fe88caae7..1646ad85d 100644 --- a/cinder/scheduler/filters/capabilities_filter.py +++ b/cinder/scheduler/filters/capabilities_filter.py @@ -51,6 +51,8 @@ class CapabilitiesFilter(filters.BaseHostFilter): except AttributeError: return False if cap is None: + LOG.debug("Host doesn't provide capability '%(cap)s' " % + {'cap': scope[index]}) return False if not extra_specs_ops.match(cap, req): LOG.debug("extra_spec requirement '%(req)s' "