]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Improve logging to debug invalid "extra_specs" entries
authorEric Harney <eharney@redhat.com>
Wed, 3 Feb 2016 19:54:38 +0000 (14:54 -0500)
committerEric Harney <eharney@redhat.com>
Mon, 8 Feb 2016 15:16:11 +0000 (10:16 -0500)
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 <sgotliv@redhat.com>
Change-Id: I921a8df18684221c424570882e7b932fc648acb1

cinder/scheduler/filters/capabilities_filter.py

index fe88caae7292a76214cfff74297c82063383225a..1646ad85d61cd327401baaa5c13dd38e723633f9 100644 (file)
@@ -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' "