Lookup meter definition fields correctly
Change-Id: I9db77b9bc196c06c409fcfe252c172230fee4274 Closes-Bug: #1536699
This commit is contained in:
@@ -184,7 +184,7 @@ class ProcessMeterNotifications(plugin_base.NotificationBase):
|
||||
|
||||
definitions = []
|
||||
for meter_cfg in reversed(meters_cfg['metric']):
|
||||
if (meter_cfg['volume'] != 1
|
||||
if (meter_cfg.get('volume') != 1
|
||||
or not cfg.CONF.notification.disable_non_metric_meters):
|
||||
try:
|
||||
md = MeterDefinition(meter_cfg, plugin_manager)
|
||||
|
@@ -0,0 +1,8 @@
|
||||
---
|
||||
fixes:
|
||||
- >
|
||||
[`bug 1536699 <https://bugs.launchpad.net/ceilometer/+bug/1536699>`_]
|
||||
Patch to fix volume field lookup in meter definition file. In case
|
||||
the field is missing in the definition, it raises a keyerror and
|
||||
aborts. Instead we should skip the missing field meter and continue
|
||||
with the rest of the definitions.
|
Reference in New Issue
Block a user