[openstack-dev] [ceilometer] Follow up for nova_notifier discussion

Doug Hellmann doug.hellmann at dreamhost.com
Sun Nov 18 13:42:02 UTC 2012


On Sun, Nov 18, 2012 at 5:07 AM, Jiang, Yunhong <yunhong.jiang at intel.com>wrote:

> Hi, Doug
>         As a follow-up for the discussion on nova_notifier yesterday. I
> checked nova code, seems it support extra information as followed
> declaration.
>     def _notify_about_instance_usage(self, context, instance, event_suffix,
>                                      network_info=None,
> system_metadata=None,
>                                      extra_usage_info=None):
>
> So after we have the option #5 library in nova, we can pass the metering
> result as extra information to the listener in
> compute.instance.delete.start event. With this changes, I think we don't
> need the nova_notifier anymore.
>

We would need to make the change everywhere instance-related events are
generated in nova so that the metadata for those events is always the same.
I think it would be better to change info_from_instance() in
nova/notifications.py so that the callers don't have to be updated, but I
don't know if that module would have the information it needs to collect
the appropriate stats from the hypervisor. For events generated when the
instance doesn't exist we would want to substitute suitable constants
(probably zero).


>
>         Background: currently ceilometer provide a nova notification
> plugin to notify ceilometer when instance being deleted, see more
> information at https://bugs.launchpad.net/ceilometer/+bug/1005944.
> Discussed with Doug and possibly we can remove it if nova provides the
> metering information in the compute.instance.delete.start event
> notification.
>

The notification plugin generates meter messages about usage right before
the instance is deleted to avoid a race condition between the time the
delete notification is sent and when the ceilometer agent can poll for
those values itself. We process the regular notification as a separate
event.

Doug


>
> Thanks
> --jyh
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20121118/6a1dd1ee/attachment.html>


More information about the OpenStack-dev mailing list