the notification message payload for delete events should include all metadata

Bug #1070011 reported by Doug Hellmann
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ceilometer
Incomplete
Medium
Unassigned
neutron
Incomplete
Medium
Unassigned

Bug Description

As we discussed at the Grizzly summit last week, the notification messages generated by quantum should include all of the metadata for the resource so ceilometer can consume the information. We are currently looking for events for network, subnet, and port objects with routers coming soon.

Changed in quantum:
assignee: nobody → Mark McClain (markmcclain)
status: New → Confirmed
importance: Undecided → Medium
milestone: none → grizzly-1
Changed in ceilometer:
status: New → Triaged
importance: Undecided → High
importance: High → Medium
dan wendlandt (danwent)
Changed in quantum:
milestone: grizzly-1 → grizzly-2
Julien Danjou (jdanjou)
tags: added: effort-s
dan wendlandt (danwent)
Changed in quantum:
milestone: grizzly-2 → grizzly-3
tags: added: quantum-core
Revision history for this message
dan wendlandt (danwent) wrote :

Mark, can this be bumped to havana, or is something actually broken if we don't fix it?

Changed in quantum:
milestone: grizzly-3 → grizzly-rc1
dan wendlandt (danwent)
Changed in quantum:
milestone: grizzly-rc1 → havana-1
Changed in quantum:
milestone: havana-1 → havana-2
tags: added: neutron-core
removed: quantum-core
Changed in neutron:
milestone: havana-2 → havana-3
Changed in neutron:
milestone: havana-3 → havana-rc1
milestone: havana-rc1 → none
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
assignee: Mark McClain (markmcclain) → Ziba (z-launchpadrz)
status: Confirmed → In Progress
Revision history for this message
Ziba (z-launchpadrz) wrote :

Hi,
I wanted to share my development to fix this bug. Actually, I've only worked on this bug when a subnet is deleted. This is why you can find reference to subnetDetails in the neutron code. This would have to be changed.
I have made changed to python-neutronclient too. The method "delete_subnet" calls "show_subnet" to retrieve the tenant_id owning the subnet. Then the neutron Client sends this information to Neutron while deleting the subnet.
I have not commited my work on python-neutronclient because it does not pass the unit tests: Connection to Neutron Failed.
I guess that the call of the method "show_subnet" in the method "delete_subnet" has to be mocked but I don't know if I can change the unit tests.

I would be glad to get your point of views, comments...

Best regards,
Romain.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

@Ziba,

I think we need to share the notification API to be implemented before starting the review.
Long time goes since the initial bug report was registered and I believe it is a time to do so.

The bug description says "the notification messages generated by quantum should include all of the metadata for the resource so ceilometer can consume the information.", but according to your patch only tenant_id is notified in subnet.delete.start notification. I am not sure it addresses the issue completely.

Regarding neutronclient, I don't think we need to change neutronclient. In general, a content of notification message should not depend on a content of a request and it should be retrieved from neutron db to ensure the notification can be trusted.

Revision history for this message
Ziba (z-launchpadrz) wrote :

@Motoki,

thanks for your update. I have re-designed my code and I have changed the neutron/db/db_base_plugin.py to return the tenant_id in the delete_subnet method. I use it then in the delete method of neutron/api/base.py but only for subnet.delete.end notifications this time.
I've tested it functionnaly and Ceilometer does not complain that only tenant_id is provided. But I agree it might not work for other methods. It's the first time I contribute to Openstack so forgive me if I've done something wrong. I just want to provide my work for the community as I need to fix this bug for my own purposes.
Please tell me if you want me to git-review my new code or not.

Thanks & best regards,
Romain.

Ziba (z-launchpadrz)
Changed in neutron:
assignee: Ziba (z-launchpadrz) → nobody
Changed in neutron:
status: In Progress → Incomplete
Changed in ceilometer:
assignee: nobody → Igor Degtiarov (idegtiarov)
Revision history for this message
gordon chung (chungg) wrote :

@igor, please check with Pradeep as he originally put some code in on neutron side.

https://review.openstack.org/#/c/91474/
https://review.openstack.org/#/c/91686/

Revision history for this message
Igor Degtiarov (idegtiarov) wrote :

Thanks gordon will do.

Changed in ceilometer:
assignee: Igor Degtiarov (idegtiarov) → nobody
Revision history for this message
Nelly (nelly-smitt) wrote :

I can finish the work if no one is busy with the bug :)

Nelly (nelly-smitt)
Changed in ceilometer:
assignee: nobody → Nelly (nelly-smitt)
Changed in neutron:
assignee: nobody → Nelly (nelly-smitt)
Revision history for this message
Dina Belova (dbelova) wrote :

Nelly is new OPW intern candidate and she really needs to contribute now, so I guess nobody will have the objections here to allow her to finish this work.

Cheers!
Dina

gordon chung (chungg)
Changed in ceilometer:
assignee: Nelly (nelly-smitt) → nobody
Changed in neutron:
assignee: Nelly (nelly-smitt) → nobody
Changed in ceilometer:
status: Triaged → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.