From 8fc42c6ce1d0543b63cea5a1cb1c2fdf487c0447 Mon Sep 17 00:00:00 2001 From: gtt116 Date: Thu, 23 May 2013 03:15:47 +0000 Subject: More detailed log in failing aggregate extra filter. For easier debuging. Report more detailed log when aggregate_instance_extra_specs failed. Change-Id: I9e285fc55ca4dfa75688bb0645b8d1b71a0b55bd --- nova/scheduler/filters/aggregate_instance_extra_specs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nova/scheduler/filters/aggregate_instance_extra_specs.py b/nova/scheduler/filters/aggregate_instance_extra_specs.py index 904da25ef..3cb74573a 100644 --- a/nova/scheduler/filters/aggregate_instance_extra_specs.py +++ b/nova/scheduler/filters/aggregate_instance_extra_specs.py @@ -47,13 +47,17 @@ class AggregateInstanceExtraSpecsFilter(filters.BaseHostFilter): aggregate_vals = metadata.get(key, None) if not aggregate_vals: LOG.debug(_("%(host_state)s fails instance_type extra_specs " - "requirements"), {'host_state': host_state}) + "requirements. Extra_spec %(key)s is not in aggregate."), + {'host_state': host_state, 'key': key}) return False for aggregate_val in aggregate_vals: if extra_specs_ops.match(aggregate_val, req): break else: LOG.debug(_("%(host_state)s fails instance_type extra_specs " - "requirements"), {'host_state': host_state}) + "requirements. '%(aggregate_vals)s' do not " + "match '%(req)s'"), + {'host_state': host_state, 'req': req, + 'aggregate_vals': aggregate_vals}) return False return True -- cgit