Neutron *.delete.end notification payload do not contain metadata other than id of the entity being deleted

Bug #1543379 reported by Rohit Jaiswal on 2016-02-09
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Wishlist
Unassigned

Bug Description

When Neutron emits notification for objects like subnet, port, router and network being deleted, the notification payload only contain the id of the entity being deleted.

Eg - RECEIVED MESSAGE: {u'_context_domain': None, u'_context_request_id': u'req-82232bf3-5032-4351-b8d6-71028cfe24eb', u'event_type': u'port.delete.end', u'_context_auth_token': u'682e4fec9d584d29b1f3a1a803a2560c', u'_context_resource_uuid': None, u'_context_tenant_name': u'admin', u'_context_user_id': u'a0934b6ddd264d619a6aba59b978cabc', u'payload':
{u'port_id': u'ce56ff00-5af0-45a0-af33-061c2d8a64c5'}

, u'_context_show_deleted': False, u'priority': u'INFO', u'_context_is_admin': True, u'_context_project_domain': None, u'_context_user': u'a0934b6ddd264d619a6aba59b978cabc', u'publisher_id': u'network.padawan-ccp-c1-m1-mgmt', u'message_id': u'2b8a5fa3-968c-4808-a235-bf06ecdba412', u'_context_roles': [u'monasca-user', u'admin', u'key-manager:admin', u'key-manager:service-admin'], u'timestamp': u'2016-02-08 20:47:02.026986', u'_context_timestamp': u'2016-02-08 20:47:01.178041', u'_unique_id': u'1248f6703a0f41bfb40d0f7cd6407371', u'_context_tenant_id': u'a5b63ca418bf45bc9f2cfc14c0c3c59e', u'_context_project_name': u'admin', u'_context_user_identity': u'a0934b6ddd264d619a6aba59b978cabc a5b63ca418bf45bc9f2cfc14c0c3c59e - - -', u'_context_tenant': u'a5b63ca418bf45bc9f2cfc14c0c3c59e', u'_context_project_id': u'a5b63ca418bf45bc9f2cfc14c0c3c59e', u'_context_read_only': False, u'_context_user_domain': None, u'_context_user_name': u'admin'}

Compare that to the metadata obtained when a port is created:

RECEIVED MESSAGE: {u'_context_domain': None, u'_context_request_id': u'req-89234e73-0294-4a29-bada-d0daa1e66b70', u'event_type': u'port.create.end', u'_context_auth_token': u'318cca31e08d4ecc8cf48e33f3c661f6', u'_context_resource_uuid': None, u'_context_tenant_name': u'admin', u'_context_user_id': u'a0934b6ddd264d619a6aba59b978cabc',
u'payload': {u'port': {u'status': u'DOWN', u'binding:host_id': u'', u'name': u'', u'allowed_address_pairs': [], u'admin_state_up': True, u'network_id': u'ecbcd2ac-e066-4bc7-8f65-d4cf182677b9', u'dns_name': u'', u'binding:vif_details': {}, u'mac_address': u'fa:16:3e:8e:df:e9', u'dns_assignment': [
{u'hostname': u'host-192-168-1-6', u'ip_address': u'192.168.1.6', u'fqdn': u'host-192-168-1-6.openstacklocal.'}

], u'binding:vnic_type': u'normal', u'binding:vif_type': u'unbound', u'device_owner': u'', u'tenant_id': u'a5b63ca418bf45bc9f2cfc14c0c3c59e', u'binding:profile': {}, u'fixed_ips': [
{u'subnet_id': u'a650342c-5db4-4f37-aecb-4eb723355176', u'ip_address': u'192.168.1.6'}

], u'id': u'4adbe0de-6f27-4745-9c36-e56ee43a6ea3', u'security_groups': [u'02d614cd-053d-485f-aadf-83fc5409d111'], u'device_id': u''}},
u'_context_show_deleted': False, u'priority': u'INFO', u'_context_is_admin': True, u'_context_project_domain': None, u'_context_user': u'a0934b6ddd264d619a6aba59b978cabc', u'publisher_id': u'network.padawan-ccp-c1-m3-mgmt', u'message_id': u'f418fa6c-5059-450b-9e0b-f7bf6970a24c', u'_context_roles': [u'monasca-user', u'admin', u'key-manager:admin', u'key-manager:service-admin'], u'timestamp': u'2016-02-08 20:48:00.589837', u'_context_timestamp': u'2016-02-08 20:48:00.069004', u'_unique_id': u'bc1cf24aed20440c8d80f09914eaabf2', u'_context_tenant_id': u'a5b63ca418bf45bc9f2cfc14c0c3c59e', u'_context_project_name': u'admin', u'_context_user_identity': u'a0934b6ddd264d619a6aba59b978cabc a5b63ca418bf45bc9f2cfc14c0c3c59e - - -', u'_context_tenant': u'a5b63ca418bf45bc9f2cfc14c0c3c59e', u'_context_project_id': u'a5b63ca418bf45bc9f2cfc14c0c3c59e', u'_context_read_only': False, u'_context_user_domain': None, u'_context_user_name': u'admin'}

The metadata is much richer for a *.create.end event compared to the *.delete.end event above. Ceilometer needs the metadata for the *.delete.end events.

For accurate billing, Ceilometer needs to handle the network related *.delete.end events, so this change is needed for accurate billing use cases.
Refer: https://github.com/openstack/ceilometer/blob/master/ceilometer/network/notifications.py#L50

Changed in neutron:
importance: Undecided → Wishlist
tags: added: rfe

What do you need exactly? When resources are deleted (and notification emitted) you may no longer have access to the data you're looking for.

Changed in neutron:
status: New → Confirmed

No response since last solicitation, having said that I'd argue that this could be handled as a regular bug fix. If there's more we can provide to make ceilometer's life easier we should.

tags: added: metering
removed: rfe
tags: added: low-hanging-fruit
Darren Shaw (dronshaw) on 2016-02-21
Changed in neutron:
assignee: nobody → Darren Shaw (ds354m)

Fix proposed to branch: master
Review: https://review.openstack.org/289050

Changed in neutron:
assignee: Darren Shaw (dronshaw) → Gabriele Cerami (gcerami)
status: Confirmed → In Progress

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/289050
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Changed in neutron:
status: In Progress → Confirmed
assignee: Gabriele Cerami (gcerami) → nobody
yanpuqing (ycx) on 2018-05-21
Changed in neutron:
assignee: nobody → yanpuqing (ycx)
yanpuqing (ycx) wrote :

The pecan wsgi has replaced of "app + wigi" framework in the latest code. And the pecan wsgi notifies contain metadata for the *.delete.end events. So I think the bug shouldn't be fixed.

Changed in neutron:
assignee: yanpuqing (ycx) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers