← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1543379] [NEW] Neutron *.delete.end notification payload do not contain metadata other than id of the entity being deleted

 

Public bug reported:

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

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1543379

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

Status in neutron:
  New

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1543379/+subscriptions


Follow ups