[rfe] Implement l2pop driver functionality in l2 agent

Bug #1630981 reported by venkata anil on 2016-10-06
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Wishlist
venkata anil

Bug Description

Summary
=======
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.

Implications:
============
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.

Advantages:
==========
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) on 2016-10-06
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

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

Changed in neutron:
status: Confirmed → Triaged

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

http://eavesdrop.openstack.org/meetings/neutron_drivers/2017/neutron_drivers.2017-03-16-22.02.log.html

Changed in neutron:
milestone: none → pike-1
assignee: nobody → venkata anil (anil-venkata)
tags: added: rfe-approved
removed: rfe
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers