yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #46109
[Bug 1468803] Re: [RFE] Create a modular L2 agent framework for linuxbridge, sriov and macvtap agents
Reviewed: https://review.openstack.org/273448
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=7d153a671b5fcc77437bc1e9b41015da1acc57f8
Submitter: Jenkins
Branch: master
commit 7d153a671b5fcc77437bc1e9b41015da1acc57f8
Author: Andreas Scheuring <andreas.scheuring@xxxxxxxxxx>
Date: Thu Jan 28 10:28:43 2016 +0100
Moving Common Agent into separate module
Moving the CommonAgent and all it's unittests into a speparate module.
Closes-Bug: #1468803
Change-Id: Ifccc6ee1a77eef3928ad326cd5857092aeef4a17
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1468803
Title:
[RFE] Create a modular L2 agent framework for linuxbridge, sriov and
macvtap agents
Status in neutron:
Fix Released
Bug description:
Problem Statement
=================
Currently, the Open vSwitch, Linux Bridge, and sriov mechanism drivers
for the ML2 plugin have their own agents. This means that when
improvements are made to one agent implementation, they have to be
ported over to the other agents to gain the improvement. This has
already happened, with patches like [1]. Much of the agent
functionality is common enough that much of the code could be shared.
Discussion on the mailing list [2]
Analysis of current agents
==========================
Currently the following agents are in the neutron tree
- openvswitch [4]
- linuxbridge [3]
- sriov [5]
- mlnx agent [6]
For Mitaka the following agent is proposed
- Macvtap agent [7]
The following agent use a classical agent loop, monitoring or new
devices to show up: linuxbridge, sriov, mlnx, macvtap
OVS uses ovsdb events (or similar things) to get notified about new
events.
Proposal
========
High level architecture
-----------------------
Today the linuxbridge agent exists of 4 classes
- NetworkSegment
- LinuxBridgeManager --> encpsulating most of the bridge specifics
- LinuxBridgeRpcCallbacks --> Class containing all the rpc callback methods
- LinuxBridgeNeutronAgentRPC --> The agent loop itself
#1 Get a clear separation between agent loop and bridge impl specifics
Move all bridge specific code from LinuxBridgeNeutronAgentRPC to LinuxBridgeManager, like config options, rpc registrations,...
#2 Modify the LinuxBridgeNeutronAgentRPC to take the manager class as
arg instead of creating it within the constructor. Manager class will
be instantiated in lb main method
#3 Merge LinuxBridgeRpcCallbacks into LinuxBridgeNeutronAgentRPC
#4 Establish a clear interface for a manager class and enforce this in
the common agent. Other manager must satisfy this interface in order
to work properly with the common agent
#5 Move common agent into a new location
Benefit
-------
Sharing agent code, getting improvements/fixes for all agents. No
needs for porting anymore.
Scope
-----
The proposal will restructure the lb agent in such a way and establish the lb agent as a first user.
NOT part of this proposal is to move over the sriov agent. However the
common agent is designed in a way to make that easily possible. I'm
just saying this is a separate effort.
This proposal will have no impact on the OVS agent.
Possible follow-up stages
-------------------------
- Implement macvtap agent as exploiter
- Move over sriov agent as exploiter
- Get shared code between the common agent and ovs agent?
- mlnx agent?
Sources
=======
[1] https://review.openstack.org/#/c/138512/
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/067605.html
[3] https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py
[4] https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py
[5] https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/mech_sriov/agent/sriov_nic_agent.py
[6] https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/mlnx/agent/eswitch_neutron_agent.py
[7] https://bugs.launchpad.net/neutron/+bug/1480979
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1468803/+subscriptions
References