ML2: Take exception on delete_xxx_postcommit failure

Bug #1266570 reported by Rich Curran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Expired
Medium
Unassigned

Bug Description

Calls to the ML2 mechanism driver delete_network/subnet/port_postcommit() methods do not take an exception on failures.
Currently the only action is to LOG.error the failure.

Tags: ml2
Rich Curran (rcurran)
summary: - ML2: Take exception on delete_xxx_postcommit
+ ML2: Take exception on delete_xxx_postcommit failure
Revision history for this message
Romil Gupta (romilg) wrote :

Hi Rich,

Could please explain in which scenario it fails.

Changed in neutron:
assignee: nobody → Romil Gupta (romilg)
Revision history for this message
Rich Curran (rcurran) wrote :

Hi Romil -
There are many places in delete_xxx_postcommit() mechanism drivers where exceptions are taken. Today all the MD exceptions get mapped to the ML2 common exception MechasnismDriverError and in the case of delete_xxx_postcommit() methods these exceptions are only logged (see plugin.py: delete_network,subnet,port methods).

There's been other investigations in this general area (i.e. error reporting inside of ML2, specifically for MDs):
https://etherpad.openstack.org/p/ML2_Juno_Roadmap
- See "ML2 Driver Error handling and recovery - ML2 Sync:" section
- https://review.openstack.org/#/c/69748/6
   During this review (see comments) it was recommended that an approach similar to Nova be implemented:
   https://wiki.openstack.org/wiki/NovaInstanceActions

I don't think that you could work on this bug without finding out the current status of how the overall ML2 error reporting design may be changed.

Thanks, Rich

Revision history for this message
Romil Gupta (romilg) wrote :

Thanks Rich for providing the pointers , I will try my best to work on this, I am a beginner. Feel free to assign yourself if you are already working on it.

tags: added: ml2
Romil Gupta (romilg)
Changed in neutron:
assignee: Romil Gupta (romilg) → nobody
Revision history for this message
Eugene Nikanorov (enikanorov) wrote :

I'm not sure throwing exceptions from postcommit is a good idea.
Exception returned to a user indicate that operation has failed.
For delete operation it then indicates that object still exist in the database, which is not true, that's why IMO exceptions in postcommit are only logged and not exposed to a user.

Marking as incomplete to let others comment on this.

Changed in neutron:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Shiv Haris (shh) wrote :

So does that mean that the actions of postcommit should be handled before removal from db...

... which twists the entire pre and post commit backwards.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
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.