Look beyond - to talk about ML2 plugin such thing as child

Look beyond - to talk about ML2 plugin such thing as child

Keywords: OpenStack, Neutron Plugin, Neutron Agent, Core Plugin, ML2 plug, ML2 architecture, Driver, tight coupling, decoupling.

Foreword

In OpenStack, it controls and manages the computing, storage, networking the three major resources. To understand is if OpenStack compute, storage and network resources management, you need to clear OpenStack architecture, modules and their respective division of tasks and so on.

The network is one of the most OpenStack as the core, but also relative to other most complex one, requiring fine chemicals -

Today to see beyond the surface, to talk about plug-ML2 such thing as children ~

Neutron Plugin is what the hell?

Plugin-- plug-ins, according to the results of Baidu search, its introduction is: One follows certain standard application program interface written by the program. So what is the Neutron plug it? I do not think too much, in fact, about the network plug-in, you can make Neutron provide a complete service.

We know that in OpenStack, the general effect plug-ins can be understood as:

  • Neutron Server process requests sent;

  • OpenStack maintenance status in the network;

  • Agent call processing request;

It can also understand, in OpenStack Neutron projects, plug-ins and agency services are corresponding, and plugin solution is to store the network information in the database, need to be addressed is the question of what needs to configure the network request, and the agent to solve how specific network configuration issues, and agent dealing with the need to provide a virtual or physical network (Linux Bridge or OVS or other physical switch) by Neutron provider (network provider), it can be said supporting the use of these three needs.

It's fine, Neutron Plugin there are two, one is the Core Plugin-- core plug-ins, mainly to maintain state network, subnet and port in the database, call the appropriate agent and is responsible for the implementation of related operations on the network provider, For example, to create a network; the other is the plug-service Plugin-- services, mainly to maintain the state of the resource router, load balance, security group, etc. in the database, call the appropriate agent and is responsible for the implementation of related operations on the network provider, such as creating router .

So, plugin One of the responsibilities is to maintain Neutron network status information, then this raises the question:

For different plugin Neutron Provider, you need to write a plugin for each very similar code to access the database, so the code are many and miscellaneous. So there ML2 plug-ins, to solve this problem, of course, not just because of this. Here to talk about ML2 plug it.

ML2 Core Plugin is what the hell?

ML2 - Moduler Layer 2, Neutron is the core of a new plug-H version implements, used to replace the original linux bridge plugin and open vswitch plugin. To put it plainly, it is the new technology, and with the core plug-ML2 changed the original plug-in, a unified country.

This in turn will have two questions:

  • Why replace the core plug?
  • ML2 core plug-in how to use?

If we get to the bottom of these two problems, not difficult to find the essence of these two issues - a role involving advantage, the other on architecture principles.

We go step by step reasoning about these two issues.

1, the main problem with conventional Core Plugin arise in the course of

The first question has been raised in front of the main problems is the development of cost and efficiency, the problem is in fact essentially nothing a little complicated, and will not fall is the most central issue, the most troublesome is difficult to maintain. The most central is this second question: for different Neutron Provider, the traditional core plug-ins is that they do not support the use of co-existence.

How to understand this second problem?

Through previous understanding, we know that the traditional core plug its agent is one to one, which means assuming that choice is Linux Bridge Plugin, then you must use a Linux Bridge Agent, and must use Linux on all nodes of OpenStack Bridge as a virtual switch as a network provider, OVS same.

We want to know, in a production environment, and the corresponding number of server roles, and even the location of which may not be the same. If you have to be unified to provide the same network provider, which will inevitably lead to a series of questions on each server node, the problem is most likely to think of engineering technology update brings the amount.

2, ML2 Core Plugin Core Plugin is how to solve the traditional problems?

ML2 Core Plugin provides a Layer 2 allows the simultaneous use of multiple network technologies in OpenStack network frame, so that the different nodes can be implemented using different network mechanisms. As shown below:

Look beyond - to talk about ML2 plugin such thing as child

By the figure, the core plug after use ML2, Agent may each deploy different nodes shown on different servers. And, ML2 not only support such a deployment, and can achieve seamless integration with the Agent, that is, before the use of the agent does not need to change, simply plug on the traditional core of the original Neutron Server plug replaced ML2 It can be.

This illustrates two aspects:

  • Agent on other nodes may be different, and no need to change;
  • Only the need for research and development of corresponding implementation mechanism for the principle ML2 functions can (below and then elaborate Understanding ML2 architecture);

3, take a look a look ML2 architecture

If you need to know ML2 ML2 or in-depth understanding of the working principle, it is the first to introduce the concept of drive. In the computer, drive refers to the drive program in computer software. In ML2, the drive is actually to make ML2 with better flexibility, easy expansion, easy and flexible access to support programs and a variety of network types and mechanisms.

Abstract ML2 and modeling of Layer 2 network, and the introduction of the type driver mechansim driver, the type of drive and driven mechanisms respectively. Before about two drives, let's take a look ML2 created an architecture diagram:

Look beyond - to talk about ML2 plugin such thing as child

By this picture, it can reflect the decoupling idea in architecture design and the design of the program, added that what is here tight coupling and decoupling:

Both thought just the opposite, tight coupling represents an association between two or more than two, very closely linked, who left who unilaterally can not work properly or provide services; decoupling between the parties, which means that although each there is a certain link between, but not the lack of whoever does not work, such as the development of the container is now very fire, is based on the idea. Such ideas are more in the software development level, in terms of operation and maintenance is reflected in the architecture design level.

With intuitive architecture pattern, again to explain these two types of drivers:

(1)Type Driver

type driver-- drive type, may be understood clearly from the figure, each type of supported network type Neutron ML2 has a corresponding drive.

The type of drive is responsible for maintaining the network type of status, perform validation create networks. These types of networks can refer to the previous article.

(2)Mechansim Driver

Mechansim Driver-- drive mechanism, each network has a support mechanism Neutron ML2 corresponding drive mechanism. (Some may not have heard, this time being ignored)

The drive mechanism is responsible for acquiring network state maintained by the Type Driver, and ensure the realization of these states correctly on the corresponding network device (physical or virtual).

4, and patted ML2 driven work process

Possible, so straightforward explanation not only abstract and boring, or through an example to brief about it, beating it easy to understand the working process ML2 plug-ins.

Assuming that type driver for the Linux Bridge, we need to create a network vlan 10 for Vlan, mechansim driver. The process of creating is this:

  1. vlan type driver will be sure to save the information vlan10 to Neutron database, including the name of the network, vlan ID and so on;
  2. Linux bridge corresponding to the linux brige mechanism driver ensures that each node on the vlan ID of the device agent creating apparatus and bridge 10 in the physical network card, and bridged therebetween;

Additional information:

  1. Linux Bridge Driver supports type include local, flat, vlan, and vxlan;
  2. Open Vswitch Driver In addition to these four type also supports gre;
  3. L2 population driver function is optimized to limit broadcast traffic and overlay network;
  4. vxlan and gre belong to the overlay network;

To the end of a small sum

This article described the relevant content ML2 core plug, and easy to understand neutron currently the most widely used plug-ins through a lead core ML2 problem. ML2 plug-in is the core plug, replace the traditional plug-in, through the introduction of two drivers to solve the problems caused by traditional core plug. It also reflects a problem in the design of the architecture to be considered, especially in terms of scalability. In addition, this article can understand the role of driver and understand the thoughts tight coupling and decoupling.

Guess you like

Origin blog.51cto.com/14557673/2478779
Recommended