SlideShare a Scribd company logo
1 of 40
Download to read offline
Deep Dive into Neutron
by Yong Sheng Gong
caveats
●

developers oriented
–

●

many codes and UML diagrams

the snapshot of current neutron code
–

evolution of neutron codes will obsolete some
contents of this presentation
Coming sessions about Neutron
●

Load balancing in neutron

Thursday November 7, 2013 4:30pm - 5:10pm, SkyCity Grand Ballroom C (SkyCity Marriott Hotel)

●

How to Write a Neutron Plugin, If You Really Need to

Thursday November 7, 2013 5:20pm - 6:00pm ,SkyCity Grand Ballroom C (SkyCity Marriott Hotel)

●

OpenStack Neutron Modular Layer 2 Plugin Deep Dive

Friday November 8, 2013 11:00am - 11:40am, Expo Breakout Room 2 (AsiaWorld-Expo)

●

Neutron Hybrid Deployment and Performance Analysis

Friday November 8, 2013 1:30pm - 2:10pm, Expo Breakout Room 2 (AsiaWorld-Expo)

●

Neutron Network Namespaces and IPtables: Technical Deep Dive

Friday November 8, 2013 4:10pm - 4:50pm, Expo Breakout Room 2 (AsiaWorld-Expo)
Contents
●

the process of neutron start

●

the normal steps to process a request

●

Start ML2 plugin

●

message queues in Neutron

●

interaction with nova compute

●

To debug the Neutron
related skills
●

WSGI

WSGI is the Web Server Gateway Interface. It is a specification for web servers and
application servers to communicate with web applications.
●

paste deploy

Paste Deployment is a system for finding and configuring WSGI applications and servers. The primary
interaction with Paste Deploy is through its configuration files.
●

Python Routes

Routes is a Python re-implementation of the Rails routes system for mapping URLs to
application actions, and conversely to generate URLs. Routes makes it easy to create pretty
and concise URLs that are RESTful with little effort.
●

peCan

Will we change to pecan? see design summit session Neutron API Framework Replacement
Layer diagram of Neutron server
Core REST API

Extension A REST
API

Extension … REST
API

AuthN/AuthZ/Input Validation/Output view
Core Plugin Interface

Core Plugin
(Vendor
specific)

Service A Plugin
Interface

Service A Plugin

Service … Plugin
Interface

Service … Plugin

agents
paste application and filters
[composite:neutron]
use = egg:Paste#urlmap
/: neutronversions
/v2.0: neutronapi_v2_0
[composite:neutronapi_v2_0]
use = call:neutron.auth:pipeline_factory
keystone = authtoken keystonecontext extensions neutronapiapp_v2_0
[filter:keystonecontext]
paste.filter_factory = neutron.auth:NeutronKeystoneContext.factory
[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
[filter:extensions]
paste.filter_factory =
neutron.api.extensions:plugin_aware_extension_middleware_factory
[app:neutronversions]
paste.app_factory = neutron.api.versions:Versions.factory
[app:neutronapiapp_v2_0]
paste.app_factory = neutron.api.v2.router:APIRouter.factory
main entry point
neutron/server/__init__.py: main()
1.config.parse(sys.argv[1:])

--config-file neutron.conf --config-file xxx.ini

2.neutron/common/config.py:load_paste_app(“neutron”)
2.1 neutron/auth.py:pipeline_factory()
2.1.1 neutron/api/v2/router.py:APIRouter.factory()
2.1.2 neutron/api/extensions.py:
plugin_aware_extension_middleware_factory()
2.1.3 neutron.auth:NeutronKeystoneContext.factory()
2.1.4 keystoneclient.middleware.auth_token:filter_factory()
filters and application pipeline
extensions
URL is
declared here?

URL
request

Process

authtoken

No

neutronapiapp_v2_0

keystonecontext

No, return
HTTPNotFound

URL is
declared here?

Response

Process
neutronapiapp_v2_0: load plugins
neutron/api/v2/router.py:APIRouter.factory()
1. __init__()
1.1 plugin = manager.NeutronManager.get_plugin()
1.1.1 neutron/manager.py:__init__()
A 1.1.1.1 create core plugin instance
B 1.1.1.2

neutron/manager.py:_load_service_plugins()

neutron.conf:
service_plugins = ...
core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin
NeutronManager
:service_plugins =
{“CORE”: ml2_plugin,
"LOADBALANCER":xxx,
...}
what are plugins and extensions
●

extensions are about resources and the actions
on them
@classmethod
def get_resources(cls):
for resource_name in ['router', 'floatingip']:
...
controller = base.create_resource(
collection_name, resource_name, plugin...)

ex = ResourceExtension(collection_name, controller,
member_actions...)
●

plugins are used to support the resources
supported_extension_aliases = ["router", "ext-gw-mode",
"extraroute",
"l3_agent_scheduler"]
def update_router(self, context, id, router):
def get_router(self, context, id, fields=None):
neutronapiapp_v2_0: load extensions
neutron/api/v2/router.py:APIRouter.factory()
1. __init__()
1.1 plugin = manager.NeutronManager.get_plugin()
1.2 extensions.PluginAwareExtensionManager.get_instance()
1.2.1 extensions.py:get_extensions_path()
1.2.2 PluginAwareExtensionManager.__init__(paths, plugins)
1.2.2.1 _load_all_extensions()
for each path in paths
_load_all_extensions_from_path(path A
)
add_extension(ext)

neutron standard
extension plus ones
specified by
api_extensions_path= in
neutron.conf

_check_extension(ext)
B
check each python module name
under the path, and capitalize the
first letter of the module name to
find the class in it, excluding the
1. check if the potential extension has implemented the
modules starting with "_".
needed functions
2. check if one of plugins supports it. plugin's
supported_extension_aliases attribute defines what
extensions it supports.
neutronapiapp_v2_0: install core resources
neutron/api/v2/router.py:APIRouter.factory()
1. __init__()
1.1 plugin = manager.NeutronManager.get_plugin()
1.2 PluginAwareExtensionManager.get_instance()
1.3 install core resources

neutron/api/v2/router.py:
RESOURCES = {'network': 'networks',
'subnet': 'subnets',
'port': 'ports'}

After it, core resources URLs, i.e. Core
Resource API, are installed and exposed.
extension filter: assemble extensions
2.1.2 neutron/api/extensions.py:plugin_aware_extension_middleware_factory()

ext_mgr = PluginAwareExtensionManager.get_instance()
return ExtensionMiddleware(app, ext_mgr=ext_mgr)

After it, all extension URLs, or
extensions on core resources are
installed and exposed
Contents
●

the process of neutron start

●

the normal steps to process a request

●

Start ML2 plugin

●

message queues in Neutron

●

interaction with nova compute

●

To debug the Neutron
Layer diagram
Core REST API

Extension A REST
API

Extension … REST
API

AuthN/AuthZ/Input Validation/Output view
Core Plugin Interface

Core Plugin
(Vendor
specific)

Service A Plugin
Interface

Service A Plugin

Service … Plugin
Interface

Service … Plugin

agents
URL processing (major steps)
URL processing continued
notification to ceilometer
also happens here
action is link create,
update, show, index or delete

handler_fun is like create_net,
list_nets function of plugins
Contents
●

the process of neutron start

●

the normal steps to process a request

●

Start ML2 plugin

●

message queues in Neutron

●

interaction with nova compute

●

To debug the Neutron
ML2 Plugin
●

●

●

●

simultaneously utilize the variety of layer 2
networking technologies found in complex real-world
data centers
It currently works with the existing openvswitch,
linuxbridge, and hyperv L2 agents
The ml2 framework is also intended to greatly
simplify adding support for new L2 networking
technologies
consists of network types and mechanisms

https://wiki.openstack.org/wiki/Neutron/ML2#ML2_Drivers
Type and mechanism drivers in setup.cfg
neutron.ml2.type_drivers =
flat = neutron.plugins.ml2.drivers.type_flat:FlatTypeDriver
local = neutron.plugins.ml2.drivers.type_local:LocalTypeDriver
vlan = neutron.plugins.ml2.drivers.type_vlan:VlanTypeDriver
gre = neutron.plugins.ml2.drivers.type_gre:GreTypeDriver
vxlan = neutron.plugins.ml2.drivers.type_vxlan:VxlanTypeDriver
neutron.ml2.mechanism_drivers =
linuxbridge = neutron.plugins.ml2.drivers.mech_linuxbridge:LinuxbridgeMechanismDriver
openvswitch = neutron.plugins.ml2.drivers.mech_openvswitch:OpenvswitchMechanismDriver
hyperv = neutron.plugins.ml2.drivers.mech_hyperv:HypervMechanismDriver
ncs = neutron.plugins.ml2.drivers.mechanism_ncs:NCSMechanismDriver
arista = neutron.plugins.ml2.drivers.mech_arista.mechanism_arista:AristaDriver
cisco_nexus = neutron.plugins.ml2.drivers.cisco.mech_cisco_nexus:CiscoNexusMechanismDriver
l2population = neutron.plugins.ml2.drivers.l2pop.mech_driver:L2populationMechanismDriver
Configuration for types in ml2.ini
neutron-server --config-file /etc/neutron/neutron.conf --config-file
/etc/neutron/ml2.ini
[ml2]
type_drivers = local,flat,vlan,gre,vxlan
mechanism_drivers = openvswitch,linuxbridge
tenant_network_types = vlan,gre,vxlan
[ml2_type_flat]
flat_networks = physnet1,physnet2
[ml2_type_vlan]
network_vlan_ranges = physnet1:1000:2999,physnet2
[ml2_type_gre]
tunnel_id_ranges = 1:1000
[ml2_type_vxlan]
vni_ranges = 1001:2000
__init__ of ML2
neutron/manager.py:__init__()
create core plugin instance [core_plugin=]

which will read
configuration in ml2.ini
Contents
●

the process of neutron start

●

the normal steps to process a request

●

Start ML2 plugin

●

message queues in Neutron

●

interaction with nova compute

●

To debug the Neutron
RPC structure of ML2

deal with RPC
from agents,
include DHCP agent

notify the L2 agents
callbacks:
receive the message
from plugins

communicate
with plugin

RPC of L2 agent:
ovs neutron agent
messages:
Plugin to agent
Plugins

Exchanges

Queues

L2 Agents
L2 Agents

Exchanges

Queues

Plugins

RPC messages
L2 Agent to Plugin
RPC structure of DHCP agent
Neutron
Server

Exchanges

Queues

DHCP
Agents

Messages from Neutron
server to DHCP agent
RPC messages
DHCP Agent to Plugin
DHCP
Agents

Exchanges

Queues

Plugin
Contents
●

the process of neutron start

●

the normal steps to process a request

●

Start ML2 plugin

●

message queues in Neutron

●

interaction with nova compute

●

To debug the Neutron
Some Neutron options in Nova.conf
●

network_api_class = nova.network.neutronv2.api.API

●

neutron_url = http://172.16.108.1:9696

●

neutron_region_name = RegionOne

●

neutron_admin_tenant_name = service

●

neutron_auth_strategy = keystone

●

neutron_admin_auth_url = http://172.16.108.1:35357/v2.0

●

neutron_admin_password = password

●

neutron_admin_username = neutron

●

libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver
interaction to boot VM (OVS bridge)
Contents
●

the process of neutron start

●

the normal steps to process a request

●

Start ML2 plugin

●

message queues in Neutron

●

interaction with nova compute

●

To debug the Neutron
debug Neutron
https://wiki.openstack.org/wiki/NeutronDevelopment
● Eclipse pydev to debug neutron server
●

neutron/server/__init__.py:
●
change eventlet.monkey_patch() To:
eventlet.monkey_patch(os=False, thread=False)
– and then create a python run/debug configuration with the
correct parameter such as "--config-file
/etc/neutron/neutron.conf --config-file
/etc/neutron/plugins/ml2/ml2_conf.ini"
–
ipdb

●

add the following line to the
neutron/server/__init__.py:

import ipdb; ipdb.set_trace()
●

start the neutron server
ipdb debug
Thanks

More Related Content

What's hot

오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기영우 김
 
「Neutronになって理解するOpenStack Network」~Neutron/Open vSwitchなどNeutronと周辺技術の解説~ - ...
「Neutronになって理解するOpenStack Network」~Neutron/Open vSwitchなどNeutronと周辺技術の解説~  - ...「Neutronになって理解するOpenStack Network」~Neutron/Open vSwitchなどNeutronと周辺技術の解説~  - ...
「Neutronになって理解するOpenStack Network」~Neutron/Open vSwitchなどNeutronと周辺技術の解説~ - ...VirtualTech Japan Inc.
 
Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack UpPushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack UpJames Denton
 
OVN 設定サンプル | OVN config example 2015/12/27
OVN 設定サンプル | OVN config example 2015/12/27OVN 設定サンプル | OVN config example 2015/12/27
OVN 設定サンプル | OVN config example 2015/12/27Kentaro Ebisawa
 
Interconnecting Neutron and Network Operators' BGP VPNs
Interconnecting Neutron and Network Operators' BGP VPNsInterconnecting Neutron and Network Operators' BGP VPNs
Interconnecting Neutron and Network Operators' BGP VPNsThomas Morin
 
OpenStack Quantum Intro (OS Meetup 3-26-12)
OpenStack Quantum Intro (OS Meetup 3-26-12)OpenStack Quantum Intro (OS Meetup 3-26-12)
OpenStack Quantum Intro (OS Meetup 3-26-12)Dan Wendlandt
 
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDNOpenStack Korea Community
 
OpenStack Networking
OpenStack NetworkingOpenStack Networking
OpenStack NetworkingIlya Shakhat
 
OpenStack超入門シリーズ いまさら聞けないNeutronの使い方
OpenStack超入門シリーズ いまさら聞けないNeutronの使い方OpenStack超入門シリーズ いまさら聞けないNeutronの使い方
OpenStack超入門シリーズ いまさら聞けないNeutronの使い方Toru Makabe
 
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-RegionJi-Woong Choi
 
Open vSwitch Offload: Conntrack and the Upstream Kernel
Open vSwitch Offload: Conntrack and the Upstream KernelOpen vSwitch Offload: Conntrack and the Upstream Kernel
Open vSwitch Offload: Conntrack and the Upstream KernelNetronome
 
ONIC-Japan-2019-OVN public
ONIC-Japan-2019-OVN publicONIC-Japan-2019-OVN public
ONIC-Japan-2019-OVN publicManabu Ori
 
Docker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversDocker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversBrent Salisbury
 
SDN Architecture & Ecosystem
SDN Architecture & EcosystemSDN Architecture & Ecosystem
SDN Architecture & EcosystemKingston Smiler
 
OpenStackアップストリーム活動実践 中級
OpenStackアップストリーム活動実践 中級OpenStackアップストリーム活動実践 中級
OpenStackアップストリーム活動実践 中級Takashi Natsume
 
OpenStack DevStack Configuration localrc local.conf Tutorial
OpenStack DevStack Configuration localrc local.conf TutorialOpenStack DevStack Configuration localrc local.conf Tutorial
OpenStack DevStack Configuration localrc local.conf TutorialSaju Madhavan
 
Ceilometer to Gnocchi
Ceilometer to GnocchiCeilometer to Gnocchi
Ceilometer to GnocchiGordon Chung
 

What's hot (20)

오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기
 
「Neutronになって理解するOpenStack Network」~Neutron/Open vSwitchなどNeutronと周辺技術の解説~ - ...
「Neutronになって理解するOpenStack Network」~Neutron/Open vSwitchなどNeutronと周辺技術の解説~  - ...「Neutronになって理解するOpenStack Network」~Neutron/Open vSwitchなどNeutronと周辺技術の解説~  - ...
「Neutronになって理解するOpenStack Network」~Neutron/Open vSwitchなどNeutronと周辺技術の解説~ - ...
 
Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack UpPushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
 
OVN 設定サンプル | OVN config example 2015/12/27
OVN 設定サンプル | OVN config example 2015/12/27OVN 設定サンプル | OVN config example 2015/12/27
OVN 設定サンプル | OVN config example 2015/12/27
 
Interconnecting Neutron and Network Operators' BGP VPNs
Interconnecting Neutron and Network Operators' BGP VPNsInterconnecting Neutron and Network Operators' BGP VPNs
Interconnecting Neutron and Network Operators' BGP VPNs
 
OpenStack Quantum Intro (OS Meetup 3-26-12)
OpenStack Quantum Intro (OS Meetup 3-26-12)OpenStack Quantum Intro (OS Meetup 3-26-12)
OpenStack Quantum Intro (OS Meetup 3-26-12)
 
KubeVirt 101
KubeVirt 101KubeVirt 101
KubeVirt 101
 
Keystone at openstack multi sites
Keystone at openstack multi sitesKeystone at openstack multi sites
Keystone at openstack multi sites
 
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
 
OpenStack Networking
OpenStack NetworkingOpenStack Networking
OpenStack Networking
 
OpenStack超入門シリーズ いまさら聞けないNeutronの使い方
OpenStack超入門シリーズ いまさら聞けないNeutronの使い方OpenStack超入門シリーズ いまさら聞けないNeutronの使い方
OpenStack超入門シリーズ いまさら聞けないNeutronの使い方
 
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
 
Open vSwitch Offload: Conntrack and the Upstream Kernel
Open vSwitch Offload: Conntrack and the Upstream KernelOpen vSwitch Offload: Conntrack and the Upstream Kernel
Open vSwitch Offload: Conntrack and the Upstream Kernel
 
ONIC-Japan-2019-OVN public
ONIC-Japan-2019-OVN publicONIC-Japan-2019-OVN public
ONIC-Japan-2019-OVN public
 
Docker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversDocker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan Drivers
 
SDN Architecture & Ecosystem
SDN Architecture & EcosystemSDN Architecture & Ecosystem
SDN Architecture & Ecosystem
 
OpenStackアップストリーム活動実践 中級
OpenStackアップストリーム活動実践 中級OpenStackアップストリーム活動実践 中級
OpenStackアップストリーム活動実践 中級
 
Challenges of Kubernetes On-premise Deployment
Challenges of Kubernetes On-premise DeploymentChallenges of Kubernetes On-premise Deployment
Challenges of Kubernetes On-premise Deployment
 
OpenStack DevStack Configuration localrc local.conf Tutorial
OpenStack DevStack Configuration localrc local.conf TutorialOpenStack DevStack Configuration localrc local.conf Tutorial
OpenStack DevStack Configuration localrc local.conf Tutorial
 
Ceilometer to Gnocchi
Ceilometer to GnocchiCeilometer to Gnocchi
Ceilometer to Gnocchi
 

Viewers also liked

Modular Layer 2 In OpenStack Neutron
Modular Layer 2 In OpenStack NeutronModular Layer 2 In OpenStack Neutron
Modular Layer 2 In OpenStack Neutronmestery
 
Networking in OpenStack for non-networking people: Neutron, Open vSwitch and ...
Networking in OpenStack for non-networking people: Neutron, Open vSwitch and ...Networking in OpenStack for non-networking people: Neutron, Open vSwitch and ...
Networking in OpenStack for non-networking people: Neutron, Open vSwitch and ...Dave Neary
 
Inside Architecture of Neutron
Inside Architecture of NeutronInside Architecture of Neutron
Inside Architecture of Neutronmarkmcclain
 
EnGenius Europe Sales presentation Neutron-series
EnGenius Europe Sales presentation Neutron-seriesEnGenius Europe Sales presentation Neutron-series
EnGenius Europe Sales presentation Neutron-seriesEnGenius Europe
 
Shared networks to support VNF high availability across OpenStack multi-regio...
Shared networks to support VNF high availability across OpenStack multi-regio...Shared networks to support VNF high availability across OpenStack multi-regio...
Shared networks to support VNF high availability across OpenStack multi-regio...Joe Huang
 
Openstack Neutron and SDN
Openstack Neutron and SDNOpenstack Neutron and SDN
Openstack Neutron and SDNinakipascual
 

Viewers also liked (6)

Modular Layer 2 In OpenStack Neutron
Modular Layer 2 In OpenStack NeutronModular Layer 2 In OpenStack Neutron
Modular Layer 2 In OpenStack Neutron
 
Networking in OpenStack for non-networking people: Neutron, Open vSwitch and ...
Networking in OpenStack for non-networking people: Neutron, Open vSwitch and ...Networking in OpenStack for non-networking people: Neutron, Open vSwitch and ...
Networking in OpenStack for non-networking people: Neutron, Open vSwitch and ...
 
Inside Architecture of Neutron
Inside Architecture of NeutronInside Architecture of Neutron
Inside Architecture of Neutron
 
EnGenius Europe Sales presentation Neutron-series
EnGenius Europe Sales presentation Neutron-seriesEnGenius Europe Sales presentation Neutron-series
EnGenius Europe Sales presentation Neutron-series
 
Shared networks to support VNF high availability across OpenStack multi-regio...
Shared networks to support VNF high availability across OpenStack multi-regio...Shared networks to support VNF high availability across OpenStack multi-regio...
Shared networks to support VNF high availability across OpenStack multi-regio...
 
Openstack Neutron and SDN
Openstack Neutron and SDNOpenstack Neutron and SDN
Openstack Neutron and SDN
 

Similar to Inside neutron 2

Magento NodeJS Microservices — Yegor Shytikov | Magento Meetup Online #11
Magento NodeJS Microservices — Yegor Shytikov | Magento Meetup Online #11Magento NodeJS Microservices — Yegor Shytikov | Magento Meetup Online #11
Magento NodeJS Microservices — Yegor Shytikov | Magento Meetup Online #11Magecom UK Limited
 
How to install and use Kubernetes
How to install and use KubernetesHow to install and use Kubernetes
How to install and use KubernetesLuke Marsden
 
Monitoring Cloud Native Applications with Prometheus
Monitoring Cloud Native Applications with PrometheusMonitoring Cloud Native Applications with Prometheus
Monitoring Cloud Native Applications with PrometheusJacopo Nardiello
 
What's new and what's next in Rudder
What's new and what's next in RudderWhat's new and what's next in Rudder
What's new and what's next in RudderRUDDER
 
PHP QA Tools
PHP QA ToolsPHP QA Tools
PHP QA Toolsrjsmelo
 
How to Install and Use Kubernetes by Weaveworks
How to Install and Use Kubernetes by Weaveworks How to Install and Use Kubernetes by Weaveworks
How to Install and Use Kubernetes by Weaveworks Weaveworks
 
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)DECK36
 
[iOS] Multiple Background Threads
[iOS] Multiple Background Threads[iOS] Multiple Background Threads
[iOS] Multiple Background ThreadsNikmesoft Ltd
 
Observability and Orchestration of your GitOps Deployments with Keptn
Observability and Orchestration of your GitOps Deployments with KeptnObservability and Orchestration of your GitOps Deployments with Keptn
Observability and Orchestration of your GitOps Deployments with KeptnAndreas Grabner
 
Surekha_haoop_exp
Surekha_haoop_expSurekha_haoop_exp
Surekha_haoop_expsurekhakadi
 
Getting started with Azure Functions in Isolated Mode
Getting started with Azure Functions in Isolated ModeGetting started with Azure Functions in Isolated Mode
Getting started with Azure Functions in Isolated ModeCallon Campbell
 
Orchestrating Microservices with Kubernetes
Orchestrating Microservices with Kubernetes Orchestrating Microservices with Kubernetes
Orchestrating Microservices with Kubernetes Weaveworks
 
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD StoryLondon Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD StoryApigee | Google Cloud
 
Distributed tracing 101
Distributed tracing 101Distributed tracing 101
Distributed tracing 101Itiel Shwartz
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosVictor Morales
 
SDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center NetworkingSDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center NetworkingThomas Graf
 

Similar to Inside neutron 2 (20)

Internship Report
Internship ReportInternship Report
Internship Report
 
Magento NodeJS Microservices — Yegor Shytikov | Magento Meetup Online #11
Magento NodeJS Microservices — Yegor Shytikov | Magento Meetup Online #11Magento NodeJS Microservices — Yegor Shytikov | Magento Meetup Online #11
Magento NodeJS Microservices — Yegor Shytikov | Magento Meetup Online #11
 
Nareshkumar_CV
Nareshkumar_CVNareshkumar_CV
Nareshkumar_CV
 
How to install and use Kubernetes
How to install and use KubernetesHow to install and use Kubernetes
How to install and use Kubernetes
 
Monitoring Cloud Native Applications with Prometheus
Monitoring Cloud Native Applications with PrometheusMonitoring Cloud Native Applications with Prometheus
Monitoring Cloud Native Applications with Prometheus
 
What's new and what's next in Rudder
What's new and what's next in RudderWhat's new and what's next in Rudder
What's new and what's next in Rudder
 
PHP QA Tools
PHP QA ToolsPHP QA Tools
PHP QA Tools
 
How to Install and Use Kubernetes by Weaveworks
How to Install and Use Kubernetes by Weaveworks How to Install and Use Kubernetes by Weaveworks
How to Install and Use Kubernetes by Weaveworks
 
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
 
[iOS] Multiple Background Threads
[iOS] Multiple Background Threads[iOS] Multiple Background Threads
[iOS] Multiple Background Threads
 
Observability and Orchestration of your GitOps Deployments with Keptn
Observability and Orchestration of your GitOps Deployments with KeptnObservability and Orchestration of your GitOps Deployments with Keptn
Observability and Orchestration of your GitOps Deployments with Keptn
 
Surekha_haoop_exp
Surekha_haoop_expSurekha_haoop_exp
Surekha_haoop_exp
 
Struts2
Struts2Struts2
Struts2
 
Distributed Tracing
Distributed TracingDistributed Tracing
Distributed Tracing
 
Getting started with Azure Functions in Isolated Mode
Getting started with Azure Functions in Isolated ModeGetting started with Azure Functions in Isolated Mode
Getting started with Azure Functions in Isolated Mode
 
Orchestrating Microservices with Kubernetes
Orchestrating Microservices with Kubernetes Orchestrating Microservices with Kubernetes
Orchestrating Microservices with Kubernetes
 
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD StoryLondon Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
 
Distributed tracing 101
Distributed tracing 101Distributed tracing 101
Distributed tracing 101
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitos
 
SDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center NetworkingSDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center Networking
 

Recently uploaded

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Recently uploaded (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Inside neutron 2

  • 1. Deep Dive into Neutron by Yong Sheng Gong
  • 2. caveats ● developers oriented – ● many codes and UML diagrams the snapshot of current neutron code – evolution of neutron codes will obsolete some contents of this presentation
  • 3. Coming sessions about Neutron ● Load balancing in neutron Thursday November 7, 2013 4:30pm - 5:10pm, SkyCity Grand Ballroom C (SkyCity Marriott Hotel) ● How to Write a Neutron Plugin, If You Really Need to Thursday November 7, 2013 5:20pm - 6:00pm ,SkyCity Grand Ballroom C (SkyCity Marriott Hotel) ● OpenStack Neutron Modular Layer 2 Plugin Deep Dive Friday November 8, 2013 11:00am - 11:40am, Expo Breakout Room 2 (AsiaWorld-Expo) ● Neutron Hybrid Deployment and Performance Analysis Friday November 8, 2013 1:30pm - 2:10pm, Expo Breakout Room 2 (AsiaWorld-Expo) ● Neutron Network Namespaces and IPtables: Technical Deep Dive Friday November 8, 2013 4:10pm - 4:50pm, Expo Breakout Room 2 (AsiaWorld-Expo)
  • 4. Contents ● the process of neutron start ● the normal steps to process a request ● Start ML2 plugin ● message queues in Neutron ● interaction with nova compute ● To debug the Neutron
  • 5. related skills ● WSGI WSGI is the Web Server Gateway Interface. It is a specification for web servers and application servers to communicate with web applications. ● paste deploy Paste Deployment is a system for finding and configuring WSGI applications and servers. The primary interaction with Paste Deploy is through its configuration files. ● Python Routes Routes is a Python re-implementation of the Rails routes system for mapping URLs to application actions, and conversely to generate URLs. Routes makes it easy to create pretty and concise URLs that are RESTful with little effort. ● peCan Will we change to pecan? see design summit session Neutron API Framework Replacement
  • 6. Layer diagram of Neutron server Core REST API Extension A REST API Extension … REST API AuthN/AuthZ/Input Validation/Output view Core Plugin Interface Core Plugin (Vendor specific) Service A Plugin Interface Service A Plugin Service … Plugin Interface Service … Plugin agents
  • 7. paste application and filters [composite:neutron] use = egg:Paste#urlmap /: neutronversions /v2.0: neutronapi_v2_0 [composite:neutronapi_v2_0] use = call:neutron.auth:pipeline_factory keystone = authtoken keystonecontext extensions neutronapiapp_v2_0 [filter:keystonecontext] paste.filter_factory = neutron.auth:NeutronKeystoneContext.factory [filter:authtoken] paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory [filter:extensions] paste.filter_factory = neutron.api.extensions:plugin_aware_extension_middleware_factory [app:neutronversions] paste.app_factory = neutron.api.versions:Versions.factory [app:neutronapiapp_v2_0] paste.app_factory = neutron.api.v2.router:APIRouter.factory
  • 8. main entry point neutron/server/__init__.py: main() 1.config.parse(sys.argv[1:]) --config-file neutron.conf --config-file xxx.ini 2.neutron/common/config.py:load_paste_app(“neutron”) 2.1 neutron/auth.py:pipeline_factory() 2.1.1 neutron/api/v2/router.py:APIRouter.factory() 2.1.2 neutron/api/extensions.py: plugin_aware_extension_middleware_factory() 2.1.3 neutron.auth:NeutronKeystoneContext.factory() 2.1.4 keystoneclient.middleware.auth_token:filter_factory()
  • 9. filters and application pipeline extensions URL is declared here? URL request Process authtoken No neutronapiapp_v2_0 keystonecontext No, return HTTPNotFound URL is declared here? Response Process
  • 10. neutronapiapp_v2_0: load plugins neutron/api/v2/router.py:APIRouter.factory() 1. __init__() 1.1 plugin = manager.NeutronManager.get_plugin() 1.1.1 neutron/manager.py:__init__() A 1.1.1.1 create core plugin instance B 1.1.1.2 neutron/manager.py:_load_service_plugins() neutron.conf: service_plugins = ... core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin NeutronManager :service_plugins = {“CORE”: ml2_plugin, "LOADBALANCER":xxx, ...}
  • 11. what are plugins and extensions ● extensions are about resources and the actions on them @classmethod def get_resources(cls): for resource_name in ['router', 'floatingip']: ... controller = base.create_resource( collection_name, resource_name, plugin...) ex = ResourceExtension(collection_name, controller, member_actions...) ● plugins are used to support the resources supported_extension_aliases = ["router", "ext-gw-mode", "extraroute", "l3_agent_scheduler"] def update_router(self, context, id, router): def get_router(self, context, id, fields=None):
  • 12. neutronapiapp_v2_0: load extensions neutron/api/v2/router.py:APIRouter.factory() 1. __init__() 1.1 plugin = manager.NeutronManager.get_plugin() 1.2 extensions.PluginAwareExtensionManager.get_instance() 1.2.1 extensions.py:get_extensions_path() 1.2.2 PluginAwareExtensionManager.__init__(paths, plugins) 1.2.2.1 _load_all_extensions() for each path in paths _load_all_extensions_from_path(path A ) add_extension(ext) neutron standard extension plus ones specified by api_extensions_path= in neutron.conf _check_extension(ext) B check each python module name under the path, and capitalize the first letter of the module name to find the class in it, excluding the 1. check if the potential extension has implemented the modules starting with "_". needed functions 2. check if one of plugins supports it. plugin's supported_extension_aliases attribute defines what extensions it supports.
  • 13. neutronapiapp_v2_0: install core resources neutron/api/v2/router.py:APIRouter.factory() 1. __init__() 1.1 plugin = manager.NeutronManager.get_plugin() 1.2 PluginAwareExtensionManager.get_instance() 1.3 install core resources neutron/api/v2/router.py: RESOURCES = {'network': 'networks', 'subnet': 'subnets', 'port': 'ports'} After it, core resources URLs, i.e. Core Resource API, are installed and exposed.
  • 14. extension filter: assemble extensions 2.1.2 neutron/api/extensions.py:plugin_aware_extension_middleware_factory() ext_mgr = PluginAwareExtensionManager.get_instance() return ExtensionMiddleware(app, ext_mgr=ext_mgr) After it, all extension URLs, or extensions on core resources are installed and exposed
  • 15. Contents ● the process of neutron start ● the normal steps to process a request ● Start ML2 plugin ● message queues in Neutron ● interaction with nova compute ● To debug the Neutron
  • 16. Layer diagram Core REST API Extension A REST API Extension … REST API AuthN/AuthZ/Input Validation/Output view Core Plugin Interface Core Plugin (Vendor specific) Service A Plugin Interface Service A Plugin Service … Plugin Interface Service … Plugin agents
  • 18. URL processing continued notification to ceilometer also happens here action is link create, update, show, index or delete handler_fun is like create_net, list_nets function of plugins
  • 19. Contents ● the process of neutron start ● the normal steps to process a request ● Start ML2 plugin ● message queues in Neutron ● interaction with nova compute ● To debug the Neutron
  • 20. ML2 Plugin ● ● ● ● simultaneously utilize the variety of layer 2 networking technologies found in complex real-world data centers It currently works with the existing openvswitch, linuxbridge, and hyperv L2 agents The ml2 framework is also intended to greatly simplify adding support for new L2 networking technologies consists of network types and mechanisms https://wiki.openstack.org/wiki/Neutron/ML2#ML2_Drivers
  • 21. Type and mechanism drivers in setup.cfg neutron.ml2.type_drivers = flat = neutron.plugins.ml2.drivers.type_flat:FlatTypeDriver local = neutron.plugins.ml2.drivers.type_local:LocalTypeDriver vlan = neutron.plugins.ml2.drivers.type_vlan:VlanTypeDriver gre = neutron.plugins.ml2.drivers.type_gre:GreTypeDriver vxlan = neutron.plugins.ml2.drivers.type_vxlan:VxlanTypeDriver neutron.ml2.mechanism_drivers = linuxbridge = neutron.plugins.ml2.drivers.mech_linuxbridge:LinuxbridgeMechanismDriver openvswitch = neutron.plugins.ml2.drivers.mech_openvswitch:OpenvswitchMechanismDriver hyperv = neutron.plugins.ml2.drivers.mech_hyperv:HypervMechanismDriver ncs = neutron.plugins.ml2.drivers.mechanism_ncs:NCSMechanismDriver arista = neutron.plugins.ml2.drivers.mech_arista.mechanism_arista:AristaDriver cisco_nexus = neutron.plugins.ml2.drivers.cisco.mech_cisco_nexus:CiscoNexusMechanismDriver l2population = neutron.plugins.ml2.drivers.l2pop.mech_driver:L2populationMechanismDriver
  • 22. Configuration for types in ml2.ini neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/ml2.ini [ml2] type_drivers = local,flat,vlan,gre,vxlan mechanism_drivers = openvswitch,linuxbridge tenant_network_types = vlan,gre,vxlan [ml2_type_flat] flat_networks = physnet1,physnet2 [ml2_type_vlan] network_vlan_ranges = physnet1:1000:2999,physnet2 [ml2_type_gre] tunnel_id_ranges = 1:1000 [ml2_type_vxlan] vni_ranges = 1001:2000
  • 23. __init__ of ML2 neutron/manager.py:__init__() create core plugin instance [core_plugin=] which will read configuration in ml2.ini
  • 24. Contents ● the process of neutron start ● the normal steps to process a request ● Start ML2 plugin ● message queues in Neutron ● interaction with nova compute ● To debug the Neutron
  • 25. RPC structure of ML2 deal with RPC from agents, include DHCP agent notify the L2 agents
  • 26. callbacks: receive the message from plugins communicate with plugin RPC of L2 agent: ovs neutron agent
  • 29. RPC structure of DHCP agent
  • 31. RPC messages DHCP Agent to Plugin DHCP Agents Exchanges Queues Plugin
  • 32. Contents ● the process of neutron start ● the normal steps to process a request ● Start ML2 plugin ● message queues in Neutron ● interaction with nova compute ● To debug the Neutron
  • 33. Some Neutron options in Nova.conf ● network_api_class = nova.network.neutronv2.api.API ● neutron_url = http://172.16.108.1:9696 ● neutron_region_name = RegionOne ● neutron_admin_tenant_name = service ● neutron_auth_strategy = keystone ● neutron_admin_auth_url = http://172.16.108.1:35357/v2.0 ● neutron_admin_password = password ● neutron_admin_username = neutron ● libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver
  • 34. interaction to boot VM (OVS bridge)
  • 35. Contents ● the process of neutron start ● the normal steps to process a request ● Start ML2 plugin ● message queues in Neutron ● interaction with nova compute ● To debug the Neutron
  • 36. debug Neutron https://wiki.openstack.org/wiki/NeutronDevelopment ● Eclipse pydev to debug neutron server ● neutron/server/__init__.py: ● change eventlet.monkey_patch() To: eventlet.monkey_patch(os=False, thread=False) – and then create a python run/debug configuration with the correct parameter such as "--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini" –
  • 37.
  • 38. ipdb ● add the following line to the neutron/server/__init__.py: import ipdb; ipdb.set_trace() ● start the neutron server