From d36762fcf98774560fe82b32b2d64d2eba1ec72b Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Wed, 3 Feb 2016 14:54:38 -0500 Subject: [PATCH] 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 --- cinder/scheduler/filters/capabilities_filter.py | 2 ++ 1 file changed, 2 insertions(+) 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' " -- 2.45.2