From 4e21e094017d044ad1666104f14519cf0be31949 Mon Sep 17 00:00:00 2001 From: Fei Long Wang Date: Tue, 10 Sep 2013 15:06:41 +0800 Subject: [PATCH] Drop the *.create.start notification for Neutron Based on current implement, there is no resource id assigned when *.create.start notification sending, so Ceilometer will run into KeyError. So this fix will drop the *.create.start notification because the meter can't be linked to correct resource. Besides the info can be collected by *.create.end. Fixes bug 1222737 Change-Id: I785ae1ca1383dc5f9afbf2ab072a6e1efc582606 --- ceilometer/network/notifications.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ceilometer/network/notifications.py b/ceilometer/network/notifications.py index f4be7181b..27ec6e8ac 100644 --- a/ceilometer/network/notifications.py +++ b/ceilometer/network/notifications.py @@ -45,7 +45,11 @@ class NetworkNotificationBase(plugin.NotificationBase): @property def event_types(self): return [ - '%s.create.*' % (self.resource_name), + # NOTE(flwang): When the *.create.start notification sending, + # there is no resource id assigned by Neutron yet. So we ignore + # the *.create.start notification for now and only listen the + # *.create.end to make sure the resource id is existed. + '%s.create.end' % (self.resource_name), '%s.update.*' % (self.resource_name), '%s.exists' % (self.resource_name), # FIXME(dhellmann): Neutron delete notifications do