L2 extensions flows lost on openvswitch restart
Bug #1646526 reported by
Thomas Morin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
High
|
Thomas Morin |
Bug Description
(taking networking-bgpvpn as an example)
On an openvswitch restart (desired restart or after a crash), neutron openvswitch agent detects the restart, and sets up br-int and br-tun again. However, the base setup for br-tun/
Changed in bgpvpn: | |
status: | New → Confirmed |
importance: | Medium → High |
Changed in bgpvpn: | |
assignee: | nobody → Thomas Morin (tmmorin-orange) |
milestone: | none → 6.0.0 |
tags: | added: neutron-proactive-backport-potential |
tags: | removed: neutron-proactive-backport-potential |
To post a comment you must log in.
Indeed we don't call ext_manager. initialize( ) on OVS restart detection, hence flows not set. I believe it's to be fixed on neutron side, so changing the component accordingly.
A logical fix could be moving .initialize() call under rpc_loop, but since .initialize() usually registers consumers, and this should happen before we call to consume_ in_threads( ) [and this happens on agent __init__], it probably won't work.
An alternative to that could be making note of all flow operations made by each extension on OVSCookieBridge and replay those on OVS restart. There is a problem with it though: it may be very wasteful (most entries in the journal could be irrelevant), and even unsafe (we may expose the node to a state from the journal past).
To avoid that problem, we could try to keep the latest flow state in-memory and dumb just that. I am not sure if mere interception of [add|mod| delete] _flow gives enough information to maintain that state though. (That's another case where we suffer from lack of proper flow manager in neutron.)
If nothing works, we can add an 'OVS restarted' event that extensions could intercept (or entry point to be called by agent in such scenario). Of course, the extension would need to implement it, which will require from it to maintain the in-memory map of its flows.