[rfe] Implement l2pop driver functionality in l2 agent

Bug #1630981 reported by venkata anil
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Won't Fix

Bug Description

We can implement l2pop driver functionality in l2 agent. Then we don't need a separate l2pop driver(we can still maintain it for backward compatibility)
L2 agents(in master code base) already has all the information(some changes needed) to create flows on its own without l2pop driver.

Existing functionality of l2pop:
L2pop driver on server side -
1) when port binding or status or ip_address(or mac) is updated, notify this port's FDB(i.e port's ip address, mac, hosting agent's tunnel ip) to all agents
2) also checks if it is the first or last port on the hosting agent's network, if so
   a) notifies all agents to create/delete tunnels and flood flows to hosting agent
   b) notifies hosting agent about all the existing network ports on other agents(so that hosting agent can create tunnels, flood and unicast flows to these ports).
L2pop on agent side, after receiving notification from l2pop driver, creates/deletes tunnel endpoints, flood, unicast and ARP ovs flows to other agent's ports.

New Implementation:
But the same functionality can be achieved without l2pop. Whenever a port is created/updated/deleted, l2 agents get that port(ip, mac and host_id) through port_update and port_delete RPC notifications. Agents can get get hostname[1] and tunnel_ip of other agents through tunnel_update(and agents can locally save this mapping).
As we are getting port's FDB trough these API, we can build the ovs flows without l2pop FDB.

L2pop driver uses port context's original_port and new_port, to identify changes to port's FDB. In the new implementation, agent can save port's FDB(only required fields), so that new port update can be always compared with saved FDB, and then identify changes to port's FDB.
We can use port's revision_number to maintain order of port's updates.

When l2 agent adds first port on a network(i.e Provisions a local VLAN for the network), it can request server with a new RPC call to provide all network port's FDB on other agents. Then it can create flows to all these existing ports.

DVR - Currently when DVR router port is bound, it notifies all agents[2]. But server will set port's host_id to ''[3]. Need to change it to calling host and check the implications.

HA - Port's host_id will always be set to master host. This allows other agents to create flows to master host only. Need to update HA to use existing DVR multiple portbinding approach, to allow other agents to create flows to all HA agents.

Other TODO:
1) In existing implementation, port status updates(update_port_status) won't notify agent. Need to enhance it.

1) Existing l2pop driver code to identify 'active port count' on agent with multiple servers can be buggy[4].
2) L2pop driver identifies first port on a agent and notifies it other port's FDB through RPC. If this RPC is not reaching the agent for any reason(example, that rpc worker dead),then agents can never establish tunnels and flows to other agents.
3) We can remove additional l2pop mechanism driver on the server. Also can avoid separate l2pop RPC consumer threads on agent and related concurrency issues[5].

[1] need to patch type_tunnel.py to send hostname as argument for tunnel_update.
[2] https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L1564
[3] https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L542
[4] Got stabilized with https://review.openstack.org/#/c/300539/
[5] https://bugs.launchpad.net/neutron/+bug/1611308

tags: added: l2-pop linuxbridge ovs
description: updated
description: updated
Doug Wiegley (dougwig)
summary: - Implement l2pop driver functionality in l2 agent
+ [rfe] Implement l2pop driver functionality in l2 agent
Changed in neutron:
importance: Undecided → Wishlist
status: New → Confirmed
tags: added: rfe
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Kevin wanted to do it, let's see if we can agree on the way forward.

Changed in neutron:
status: Confirmed → Triaged
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

This will need a spec, but we generally reached an agreement at the last drivers meeting:


Changed in neutron:
milestone: none → pike-1
assignee: nobody → venkata anil (anil-venkata)
tags: added: rfe-approved
removed: rfe
Revision history for this message
venkata anil (anil-venkata) wrote :

I am busy with OVN, so not getting time to work on this. Can someone please take care of this?

Changed in neutron:
assignee: venkata anil (anil-venkata) → nobody
Changed in neutron:
milestone: pike-1 → pike-2
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Bug closed due to lack of activity, please feel free to reopen if needed.

Changed in neutron:
status: Triaged → Won't Fix
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.