yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #76650
[Bug 1806316] Re: [RFE] Add RPC query API to l2pop for FDB resync
Thanks for the update and submission
** Tags removed: rfe
** Changed in: neutron
Status: New => Won't Fix
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1806316
Title:
[RFE] Add RPC query API to l2pop for FDB resync
Status in neutron:
Won't Fix
Bug description:
Problem Description
=======================================
Layer 2 population (l2pop) provides L2populationRpcCallBackMixin(in /neutron/plugins/ml2/drivers/l2pop/rpc_manager/l2population_rpc.py) as a general mixin class of l2pop RPC callback. The following methods are called through RPC: add_fdb_entries(), remove_fdb_entries(), update_fdb_entries(). And the following methods are used in an agent as internal methods: fdb_add(), fdb_remove(), fdb_update().
For now L2 agent (OVS agent and Linuxbridge agent) inherits the class
L2populationRpcCallBackMixin and implement their own fdb_add(),
fdb_remove() and fdb_update(). However, some agents in other
subprojects (e.g. dynamic-routing agent) can also inherit the class
L2populationRpcCallBackMixin to enable l2pop in their networks. These
agents only need to register the l2pop related topics and implement
the add_fdb_entries(), remove_fdb_entries(), update_fdb_entries(),
fdb_add(), fdb_remove() and fdb_update().
However, in some scenarios, the agent needs to get the full FDB from
Neutron. For example: agent restart and adding a new agent. To address
the above scenarios, l2pop mechanism driver will check the port number
on the agent or agent uptime after updating a port. If the number
equals 1 or agent uptime less than agent_boot_time, l2pop mechanism
driver will send the full FDB to the agent. This mechanism works fine
with l2 agent. However, if other agents which try to implement l2pop
don’t have ports, then the l2pop mechanism driver won’t be triggered
to check the port number on the agent or agent uptime. As a result of
that, no FDB will be sent to the agent in the scenarios that the agent
restarts and adding a new agent.
Based on the above analysis, we proposed to add a new mechanism to
cover the scenario (agent restart and adding new agent) for other
agents that may implement l2pop.
Proposed Change
=======================================
The idea is to extend the l2pop RPC handlers to allow an agent to query the full FDB for a list of network_id values. Class L2populationRpcQueryMixin should be used by the agent to query the full FDB. The agent should inherit the class L2populationRpcQueryMixin and calling the following method:
get_fdb_entries(self, context, network_ids, host=None, source=None)
This method will send an RPC request to topic “q-plugin-l2population-query”. This method should be used to retrieve the FDB entries required to populate the FDB on a given host. If “source” is specified as a requestor then no records from that source are included in the results. If host is not supplied then the full set of FDB entries for the network is returned.
Listeners should be created in l2pop mechanism driver to consume the topic “q-plugin-l2population-query”. The RPC request to the topic “q-plugin-l2population-query” should be processed by these listeners. The following method in the mech_driver.py will be called:
get_fdb_entries(self, context, network_ids, host=None, source=None)
Finally full FDB entries can be returned to the agent.
All changes can be viewed through the link below:
https://review.openstack.org/#/c/620929/
Data Model Impact
=======================================
None
REST API Impact
=======================================
None
Command Line Client Impact
=======================================
None
Other Impact
=======================================
None
Other Deployer Impact
=======================================
None
Performance Impact
=======================================
None
Implementation
=======================================
Assignee(s)
Work Items
=======================================
• Add class L2populationRpcCallBackMixin to neutron\plugins\ml2\drivers\l2pop\rpc_manager\l2population_rpc.py.
• Add class L2populationServerQueryAPI to neutron\plugins\ml2\drivers\l2pop\rpc.py
• Add L2populationServer, method get_fdb_entries and _get_fdb_entries to L2populationMechanismDriver in neutron\plugins\ml2\drivers\l2pop\mech_driver.py
• Add related tests.
Dependencies
=======================================
None
Testing
=======================================
Unit tests are necessary.
Documentation Impact
=======================================
None.
References
=======================================
None
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1806316/+subscriptions
References