yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #76063
[Bug 1806316] [NEW] [RFE] Add RPC query API to l2pop for FDB resync
Public bug reported:
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
can also inherits 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().
But in some scenarios, the agent needs to get full FDB from Neutron. For
example: agent restart and adding new agent. To address the above
scenarios, l2pop mechanism driver will check the port number on the
agent or agent uptime after updating some port. If the number equals 1
or agent uptime less than agent_boot_time, l2pop mechanism driver will
send full FDBs to the agent. This mechanism works fine with l2 agent.
However if other agents which try to implement l2pop don’t have ports,
then l2pop mechanism driver won’t be triggered to check 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 agent restart and adding 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 handles to allow an agent to query the full FDB for a list of network_id values. Class L2populationRpcQueryMixin should be used by 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 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
** Affects: neutron
Importance: Undecided
Assignee: ChenjieXu (midone)
Status: New
** Changed in: neutron
Assignee: (unassigned) => ChenjieXu (midone)
--
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:
New
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 can also inherits 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().
But in some scenarios, the agent needs to get full FDB from Neutron.
For example: agent restart and adding new agent. To address the above
scenarios, l2pop mechanism driver will check the port number on the
agent or agent uptime after updating some port. If the number equals 1
or agent uptime less than agent_boot_time, l2pop mechanism driver will
send full FDBs to the agent. This mechanism works fine with l2 agent.
However if other agents which try to implement l2pop don’t have ports,
then l2pop mechanism driver won’t be triggered to check 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 agent restart and adding 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 handles to allow an agent to query the full FDB for a list of network_id values. Class L2populationRpcQueryMixin should be used by 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 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
Follow ups