A method and device for hot upgrading a virtual switch
By binding the physical network card to a virtual network card and utilizing link redundancy to implement hot upgrade of the virtual switch, the problem of network card limitations in the existing technology is solved, and the upgrade process is almost seamless and has little business impact.
Patent Information
- Application Number
- CN202211703843.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-12-29
AI Technical Summary
The existing virtual switch hot upgrade method requires the physical network card to be referenced by two processes at the same time, resulting in traffic duplication and limiting the use scope of the network card. Most network cards do not have this capability, resulting in long business interruption time during the upgrade process.
By binding two physical network cards into one virtual network card, link redundancy is used to achieve dual-process upgrade. First, the business traffic is concentrated on one network card, a new process is started and configuration information is loaded, and then it is switched to two network cards. Realize traffic forwarding and circumvent the limitations of physical network cards.
It achieves hot upgrade of virtual switches with almost no interruption, reduces business impact, and gets rid of dependence on physical network cards, making it suitable for upgrading more network cards.
Smart Images

Figure CN116233038B
Abstract
Description
Technical Field
[0001] The present application relates to the field of information network technology, and in particular to a method and device for hot upgrading a virtual switch. Background Art
[0002] In recent years, with the rapid development of the network, cloud computing has become more and more widely used. The cloud computing network mainly uses software defined network (SDN) technology. Compared with traditional network technology, the most typical feature of SDN technology is the separation of forwarding and control, that is, the forwarding plane is separated from the control plane. In many cases, the forwarding plane uses virtual switch technology. For example, the open source software openvswitch is widely used as a classic virtual switch. With the update of cloud computing usage scenarios, virtual switches will inevitably have version iterations and problem repairs. Since there is only one virtual switch on a host machine, it cannot be used as the master and backup in the architecture. Therefore, the network disconnection caused by the upgrade will seriously affect the business running on the virtual machine.
[0003] Currently, hot upgrade of virtual switches can be achieved through dual-process mode. Dual-process mode means that an independent new-version virtual switch process is created on the basis of the old-version virtual switch process. At this time, the physical network card connected to the old-version virtual switch replicates the traffic and sends it to the new-version virtual switch process and the old-version virtual switch process at the same time. After completing the required settings, the old-version virtual switch process is terminated, and the new-version virtual switch process provides the corresponding service, thereby achieving hot upgrade of virtual switches without service interruption.
[0004] However, this dual-process hot upgrade method requires that the physical network card can be referenced by two virtual switch processes at the same time, and the traffic is copied in two copies and sent to the two processes respectively. However, only a small number of network cards on the market currently support this capability, and most network cards do not have this capability. Summary of the invention
[0005] The purpose of the present application is to provide a method and device for hot upgrading a virtual switch, which can improve the above-mentioned problem.
[0006] The embodiment of the present application is implemented as follows:
[0007] In a first aspect, the present application provides a method for hot upgrading a virtual switch, comprising:
[0008] S1. Detach the second physical network card from the virtual bound network card, concentrate the service traffic of the host machine on the first physical network card of the virtual bound network card, and connect the first physical network card to the first virtual switch daemon process to realize traffic forwarding;
[0009] S2. Start the second virtual switch daemon process through the second physical network card and load the configuration information to be upgraded;
[0010] S3. After the second virtual switch daemon process is started, exit the first virtual switch daemon process and release the first physical network card;
[0011] S4. Re-add the first physical network card to the virtual bound network card, concentrate the service traffic of the host machine on the first physical network card and the second physical network card, and connect the second physical network card to the second virtual switch daemon process to realize traffic forwarding.
[0012] It can be understood that the present application discloses a method for hot upgrading a virtual switch, and the method realizes dual-process upgrade by binding two physical network cards into one virtual network card. First, the second physical network card is detached from the virtual binding network card, and the service traffic of the host machine is concentrated on the first physical network card. The first physical network card is connected to the first virtual switch daemon process to realize traffic forwarding; then, the second virtual switch daemon process is started with the second physical network card, and the configuration information to be upgraded is loaded; after the second virtual switch daemon process is started, the first virtual switch daemon process is exited, and the first physical network card in the first virtual switch is re-added to the virtual binding network card, and the service traffic of the host machine is concentrated on the first physical network card and the second physical network card. The present application utilizes link redundancy to enable the dual-process solution to circumvent the limitations of the physical network card and achieve the effect of almost continuous flow during the upgrade. The place where packet loss occurs in the whole process only occurs when the new and old processes switch network cards. Since the flow interruption time is extremely short, the impact on the business is extremely small, and it also gets rid of the dependence on the physical network card.
[0013] The virtual bound network card is a virtual network card formed by binding the first physical network card and the second physical network card.
[0014] Network card binding (bond), also known as network card bundling, is to bind two or more physical network cards into a virtual network card. Virtual network card is a common technology in application deployment, which realizes local network card redundancy, bandwidth expansion and load balancing by binding multiple network cards into one logical network card. Multiple network card binding actually requires an additional software binding driver to be implemented. Multiple network cards can be shielded through the binding driver.
[0015] In an optional embodiment of the present application, the step of concentrating the service traffic of the host machine on the first physical network card of the virtual bound network card includes:
[0016] Disconnect the second physical network card from any virtual switch daemon process;
[0017] The traffic originally sent to the second physical network card is sent to the first physical network card.
[0018] It can be understood that before the second virtual switch daemon completes the upgrade through the second physical network card, the service traffic of the host machine needs to be concentrated on the first physical network card to ensure that the existing traffic is uninterrupted during the upgrade process.
[0019] In an optional embodiment of the present application, the step of concentrating the service traffic of the host machine on the first physical network card and the second physical network card includes:
[0020] Traffic forwarding is achieved by connecting the first physical network card and the second physical network card to the second virtual switch daemon process.
[0021] It can be understood that after the second virtual switch daemon completes the upgrade through the second physical network card, the first physical network card released by the old process exits and rejoins the virtual bound network card, concentrating the service traffic of the host machine on the first physical network card and the second physical network card, and connecting the first physical network card and the second physical network card through the upgraded second virtual switch daemon to realize traffic forwarding.
[0022] In an optional embodiment of the present application, step S2 includes:
[0023] S21, starting the second virtual switch daemon process through the second physical network card;
[0024] S22. Synchronize the configuration file of the first virtual switch daemon process to the second virtual switch daemon process;
[0025] S23, modifying the first physical network card in the configuration file to the second physical network card;
[0026] S24. Upgrading the second virtual switch daemon process according to the modified configuration file.
[0027] The configuration information includes routing information, flow table and session status.
[0028] It can be understood that the first virtual switch daemon synchronizes its configuration file to the second virtual switch daemon, but the physical network card used in the configuration file is still the first physical network card, so it is necessary to modify the first physical network card in the configuration file to the second physical network card. In this way, the upgrade of the second virtual switch daemon is implemented according to the modified configuration file, that is, the upgrade of the second virtual switch daemon is implemented according to the second physical network card.
[0029] Wherein, step S22 comprises:
[0030] S221. Establish a transmission channel between the first virtual switch daemon process and the second virtual switch daemon process;
[0031] S222: Notify the first virtual switch daemon process to release resources and synchronize the configuration file to the second virtual switch daemon process through the transmission channel.
[0032] Wherein, step S24 includes: after completing the DPDK initialization of the second virtual switch daemon process according to the second physical network card, loading the configuration file to implement the upgrade of the second virtual switch daemon process.
[0033] The Data Plane Development Kit (DPDK) is mainly based on the Linux system and is a collection of function libraries and drivers for fast data packet processing. It can greatly improve data processing performance and throughput, and improve the work efficiency of data plane applications.
[0034] In a second aspect, the present application provides a device for hot upgrading a virtual switch, comprising:
[0035] A first service traffic switching module is used to detach the second physical network card from the virtual binding network card, and concentrate the service traffic of the host machine on the first physical network card of the virtual binding network card, and the first physical network card is connected to the first virtual switch daemon process to realize traffic forwarding;
[0036] An upgrade module, used to start the second virtual switch daemon process and load the configuration information to be upgraded;
[0037] An exit old process module is used to exit the first virtual switch daemon process after the second virtual switch daemon process is started;
[0038] The second service traffic switching module is used to re-add the second physical network card to the virtual bound network card, concentrate the service traffic of the host machine on the second physical network card, and connect the second physical network card to the second virtual switch daemon process to realize traffic forwarding.
[0039] In a third aspect, the present application also discloses another device for hot upgrading a virtual switch, comprising: a processor and a memory, the processor and the memory being connected to each other, wherein the memory is used to store a computer program, the computer program comprising program instructions, and the processor is configured to call the program instructions to execute a method as described in any one of the first aspects.
[0040] In a fourth aspect, the present application further discloses a computer-readable storage medium, wherein the computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method as described in any one of the first aspects.
[0041] Beneficial effects:
[0042] The present application discloses a method for hot upgrading a virtual switch, which realizes dual-process upgrade by binding two physical network cards into one virtual network card. First, the second physical network card is detached from the virtual binding network card, the service flow of the host machine is concentrated on the first physical network card, and the first physical network card is connected to the first virtual switch daemon process to realize traffic forwarding; then, the second virtual switch daemon process is started with the second physical network card, and the configuration information to be upgraded is loaded; after the second virtual switch daemon process is started, the first virtual switch daemon process is exited, the first physical network card in the first virtual switch is re-added to the virtual binding network card, and the service flow of the host machine is concentrated on the first physical network card and the second physical network card.
[0043] This application uses link redundancy to enable the dual-process solution to circumvent the limitations of physical network cards and achieve the effect of almost continuous flow during upgrades. Packet loss during the entire process only occurs when the new and old processes switch network cards. Since the flow interruption time is extremely short, the impact on the business is minimal, and it also gets rid of the dependence on physical network cards.
[0044] In order to make the above-mentioned objects, features and advantages of the present application more obvious and understandable, optional embodiments are specifically listed below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 This is a schematic diagram of the internal operation of a traditional virtual switch;
[0047] Figure 2 This is a schematic diagram of the internal operation of a virtual switch that introduces DPDK acceleration technology;
[0048] Figure 3 is a schematic diagram of detaching a second physical network card from a virtual bound network card provided by the present application;
[0049] Figure 4It is a flow chart of a method for hot upgrading a virtual switch provided by the present application;
[0050] Figure 5 It is a structural schematic diagram of a device for hot upgrading a virtual switch provided by the present application. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0052] Centrex uses the resources of the public network to form a private network and provides special switching functions of virtual private branch exchange (PBX) services to public network users. Therefore, it is also called a centralized user small switch or virtual user switch. The open source software openvswitch is widely used as a classic virtual switch.
[0053] like Figure 1 The figure shows the internal operation diagram of a traditional virtual switch such as openvswitch. It can be seen that the traditional openvswitch completes the switch function through the daemon process (ovs-vswitchd) in the user state process and the data path (datapath) in the kernel. The daemon process (ovs-vswitchd) in the user state process can be regarded as the control plane of the virtual switch, and the data path (datapath) in the kernel can be regarded as the real forwarding plane.
[0054] The datapath is the one that actually forwards the message. As the control plane, the daemon (ovs-vswitchd) only needs to generate the corresponding forwarding logic and send it to the datapath. And generally, only the control plane needs to be iterated. In the traditional openvswitch, during the upgrade process, the communication channel between the control plane and the forwarding plane is cut off, and the forwarding plane continues to forward the existing traffic. The control plane daemon (ovs-vswitchd) is replaced, and after the new daemon (ovs-vswitchd) control plane takes effect, the communication between the control plane and the forwarding plane is restored. In this upgrade process, the existing traffic can be kept flowing.
[0055] With the rapid development of the Internet, the network forwarding performance requirements for cloud computing are getting higher and higher. The traditional way of using virtual switches can no longer meet the network performance requirements. Therefore, virtual switches introduce the Data Plane Development Kit (DPDK) acceleration technology to improve network forwarding performance. This results in the disappearance of the original kernel data path, and the forwarding plane is integrated into the original daemon (ovs-vswitchd) control plane. Figure 2 The figure shows the internal operation of a virtual switch that introduces DPDK acceleration technology.
[0056] like Figure 2 As shown in the figure, the module that actually completes the forwarding becomes the polling mode driver (PMD), and PMD is a thread of the daemon process (ovs-vswitchd). They cannot be separated, so the original hot upgrade method cannot be used anymore, but the upgrade demand still exists.
[0057] If the upgrade and replacement is completed by simply restarting the process, it will cause the virtual machine service to be disconnected for a long time. After the virtual switch introduces DPDK, the daemon process will take a long time to complete the DPDK initialization during the startup process. In addition, the flow table recovery in the SDN architecture, especially now that the scale of cloud computing is getting larger and larger, and the number of SDN flow tables is increasing, the entire flow table recovery time also takes a lot of time.
[0058] The Data Plane Development Kit (DPDK) is mainly based on the Linux system and is a collection of function libraries and drivers for fast data packet processing. It can greatly improve data processing performance and throughput, and improve the work efficiency of data plane applications.
[0059] In view of this, there are related technical descriptions that can implement hot upgrades of DPDK in virtual switches through a dual-process approach. The dual-process approach can completely avoid the time overhead of DPDK initialization and flow table recovery. The specific implementation method is to create an independent new version daemon process on the basis of the old version of the daemon process. At this time, the physical network card connected to the old version of the daemon process copies the traffic and sends it to the new version daemon process and the old version of the daemon process at the same time. After completing the required settings, the old version of the daemon process is terminated, and the new version of the daemon process provides the corresponding service, thereby realizing a hot upgrade of the virtual switch without service interruption. However, this dual-process hot upgrade method requires that the physical network card can be referenced by two daemons at the same time, and the traffic is copied in two copies and sent to the two processes respectively. However, only a small number of network cards on the market currently support this capability, and most network cards do not have this capability.
[0060] In a first aspect, the present application provides a method for hot upgrading a virtual switch, comprising:
[0061] S1. Detach the second physical network card from the virtual bound network card, and concentrate the service traffic of the host machine on the first physical network card of the virtual bound network card. The first physical network card is connected to the first virtual switch daemon process to realize traffic forwarding.
[0062] The virtual bound network card is a virtual network card formed by binding the first physical network card and the second physical network card.
[0063] Network card binding (bond), also known as network card bundling, is to bind two or more physical network cards into a virtual network card. Virtual network card is a common technology in application deployment, which realizes local network card redundancy, bandwidth expansion and load balancing by binding multiple network cards into one logical network card. Multiple network card binding actually requires an additional software binding driver to be implemented. Multiple network cards can be shielded through the binding driver.
[0064] In an optional embodiment of the present application, the service traffic of the host machine is concentrated on the first physical network card of the virtual bound network card, including: disconnecting the second physical network card from any virtual switch daemon process; and sending the traffic originally sent to the second physical network card to the first physical network card.
[0065] It can be understood that before the second virtual switch daemon completes the upgrade through the second physical network card, the service traffic of the host machine needs to be concentrated on the first physical network card to ensure that the existing traffic is uninterrupted during the upgrade process.
[0066] like Figure 3 The schematic diagram provided by the present application for concentrating the service traffic of the host machine on the first physical network card is shown. The LACP protocol is used to notify the second switch side that the port status is disconnected, and the traffic originally sent by the second switch to the second physical network card is transferred to the first physical network card. The second physical network card is removed using the command provided by the virtual switch, and the traffic sent by the second physical network card is transferred to the first physical network card. At this time, all the sending and receiving traffic is concentrated on the first physical network card.
[0067] S2. Start the second virtual switch daemon process through the second physical network card and load the configuration information to be upgraded.
[0068] S3. After the second virtual switch daemon process is started, exit the first virtual switch daemon process and release the first physical network card.
[0069] S4. Re-add the first physical network card to the virtual bound network card, concentrate the service traffic of the host machine on the first physical network card and the second physical network card, and connect the first physical network card and the second physical network card to the second virtual switch daemon process to realize traffic forwarding.
[0070] In an optional embodiment of the present application, the business traffic of the host machine is concentrated on the first physical network card and the second physical network card, including: connecting the first physical network card and the second physical network card to the second virtual switch daemon to achieve traffic forwarding. It can be understood that after the second virtual switch daemon completes the upgrade through the second physical network card, the first physical network card released by the old process exits and rejoins the virtual bound network card, the business traffic of the host machine is concentrated on the first physical network card and the second physical network card, and the upgraded second virtual switch daemon is connected to the first physical network card and the second physical network card to achieve traffic forwarding.
[0071] It can be understood that the present application discloses a method for hot upgrading a virtual switch, and the method realizes dual-process upgrade by binding two physical network cards into one virtual network card. First, the second physical network card is detached from the virtual binding network card, and the service traffic of the host machine is concentrated on the first physical network card. The first physical network card is connected to the first virtual switch daemon process to realize traffic forwarding; then, the second virtual switch daemon process is started with the second physical network card, and the configuration information to be upgraded is loaded; after the second virtual switch daemon process is started, the first virtual switch daemon process is exited, and the first physical network card is re-added to the virtual binding network card, and the service traffic of the host machine is concentrated on the first physical network card and the second physical network card. The present application utilizes link redundancy to enable the dual-process solution to circumvent the limitations of the physical network card and achieve the effect of almost continuous flow during the upgrade. The place where packet loss occurs in the whole process only occurs when the new and old processes switch network cards. Since the flow interruption time is extremely short, the impact on the business is extremely small, and it also gets rid of the dependence on the physical network card.
[0072] In an optional embodiment of the present application, step S2 includes:
[0073] S21. Start the second virtual switch daemon process through the second physical network card.
[0074] S22. Synchronize the configuration file of the first virtual switch daemon process to the second virtual switch daemon process.
[0075] The configuration information includes routing information, flow table and session status.
[0076] Wherein, step S22 comprises:
[0077] S221. Establish a transmission channel between the first virtual switch daemon process and the second virtual switch daemon process.
[0078] S222: Notify the first virtual switch daemon process to release resources and synchronize the configuration file to the second virtual switch daemon process through a transmission channel.
[0079] S23. Modify the first physical network card in the configuration file to the second physical network card.
[0080] S24. Upgrade the second virtual switch daemon process according to the modified configuration file.
[0081] Wherein, step S24 includes: after completing the DPDK initialization of the second virtual switch daemon process according to the second physical network card, loading the configuration file to implement the upgrade of the second virtual switch daemon process.
[0082] It can be understood that the first virtual switch daemon synchronizes its configuration file to the second virtual switch daemon, but the physical network card used in the configuration file is still the first physical network card, so the first physical network card in the configuration file needs to be modified to the second physical network card. In this way, the upgrade of the second virtual switch daemon is implemented according to the modified configuration file, that is, the upgrade of the second virtual switch daemon is implemented according to the first physical network card and the second physical network card.
[0083] For example, Figure 4 The flowchart of a method for hot upgrading a virtual switch provided by the present application is shown, wherein the new version daemon process is the second virtual switch daemon process, and the old version daemon process is the first virtual switch daemon process.
[0084] First, split the virtual bound network card, detach the second physical network card from the virtual bound network card, and concentrate the service traffic of the host machine on the first physical network card.
[0085] Next, the new version daemon starts a new process. The new version daemon notifies the old version daemon to release resources through the channel between the new and old processes. After the old version daemon releases resources, it starts to synchronize configurations and flow tables with the new version daemon.
[0086] Subsequently, since the new version of the daemon process uses the same configuration file as the old version of the daemon process when it is started, the new version of the daemon process also uses the first physical network card at this time, so the physical network card used needs to be changed to the second physical network card.
[0087] Then, the old version daemon notifies the new version daemon that the information synchronization is complete. The new version daemon uses the modified second physical network card to complete DPDK initialization, and then loads routing and other information.
[0088] Finally, after the new version of the daemon process completes the upgrade, it notifies the old version of the daemon process to exit and releases the first physical network card; the first physical network card is re-added to the virtual bound network card, and the service traffic of the host machine is concentrated on the first physical network card and the second physical network card. The first physical network card and the second physical network card are connected to the new version of the daemon process to realize traffic forwarding.
[0089] In a second aspect, the present application discloses a device for hot upgrading a virtual switch, comprising a first service traffic switching module, for detaching a second physical network card from a virtual bound network card, concentrating the service traffic of a host machine on a first physical network card of the virtual bound network card, wherein the first physical network card is connected to a first virtual switch daemon process to implement traffic forwarding;
[0090] An upgrade module, used to start the second virtual switch daemon process and load the configuration information to be upgraded;
[0091] An exit old process module is used to exit the first virtual switch daemon process after the second virtual switch daemon process is started;
[0092] The second service traffic switching module is used to re-add the second physical network card to the virtual bound network card, concentrate the service traffic of the host machine on the second physical network card, and connect the second physical network card to the second virtual switch daemon process to realize traffic forwarding.
[0093] The specific implementation is similar to that described in the first aspect and will not be repeated here.
[0094] In a third aspect, the present application provides a device for hot upgrading a virtual switch. Figure 5 As shown, the device for hot upgrading a virtual switch includes one or more processors 601 and a memory 602. The processor 601 and the memory 602 are connected via a bus 603. The memory 602 is used to store a computer program, which includes program instructions, and the processor 601 is used to execute the program instructions stored in the memory 602. The processor 601 is configured to call the program instructions to perform the operation of any method of the first aspect:
[0095] It should be understood that in the embodiment of the present invention, the processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0096] The memory 602 may include a read-only memory and a random access memory, and provide instructions and data to the processor 601. A portion of the memory 602 may also include a non-volatile random access memory. For example, the memory 602 may also store information about the device type.
[0097] In a specific implementation, the processor 601 described in the embodiment of the present invention can execute the implementation method described in any method of the first aspect, and can also execute the implementation method of the device for hot upgrading the virtual switch described in the embodiment of the present invention, which will not be repeated here.
[0098] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the steps of any method of the first aspect are implemented.
[0099] The computer-readable storage medium may be an internal storage unit of the device for hot upgrading the virtual switch in any of the aforementioned embodiments, such as a hard disk or memory of the device for hot upgrading the virtual switch. The computer-readable storage medium may also be an external storage device of the device for hot upgrading the virtual switch, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the device for hot upgrading the virtual switch. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the device for hot upgrading the virtual switch. The computer-readable storage medium is used to store the computer program and other programs and data required by the device for hot upgrading the virtual switch. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0100] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0101] In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method for hot upgrading of a virtual switch can be implemented in other ways. For example, the apparatus embodiments described above are merely schematic. For example, the division of the above units is merely a logical function division. There may be other division methods in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be an electrical, mechanical or other form of connection.
[0102] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0103] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0104] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0105] The expressions "first", "second", "the first" or "the second" used in various embodiments of the present disclosure may modify various components regardless of order and / or importance, but these expressions do not limit the corresponding components. The above expressions are only configured for the purpose of distinguishing an element from other elements. For example, a first user device and a second user device represent different user devices, although both are user devices. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element without departing from the scope of the present disclosure.
[0106] When one element (e.g., a first element) is referred to as being "(operably or communicatively) coupled" or "(operably or communicatively) coupled to" or "connected to" another element (e.g., a second element), it is understood that the one element is directly connected to the other element or the one element is indirectly connected to the other element via yet another element (e.g., a third element). Conversely, it is understood that when an element (e.g., a first element) is referred to as being "directly connected" or "directly coupled" to another element (the second element), no element (e.g., a third element) is interposed between the two.
[0107] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.
[0108] The above description is only an optional embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other.
[0109] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0110] The above description is only an optional embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other.
[0111] The above description is only an optional embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for hot upgrading a virtual switch, characterized in that: include: The second physical network card is separated from the virtual binding network card, and the service traffic of the host machine is concentrated on the first physical network card of the virtual binding network card, and the first physical network card is connected to the first virtual switch daemon process to realize traffic forwarding; wherein the virtual binding network card is a virtual network card formed by binding the first physical network card and the second physical network card; Start the second virtual switch daemon process through the second physical network card and load the configuration information to be upgraded; After the second virtual switch daemon process is started, exit the first virtual switch daemon process and release the first physical network card; Re-adding the first physical network card to the virtual bound network card, and concentrating the service traffic of the host machine on the first physical network card and the second physical network card; The step of starting the second virtual switch daemon process through the second physical network card and loading the configuration information to be upgraded includes: Start the second virtual switch daemon through the second physical network card; Synchronize the configuration file of the first virtual switch daemon process to the second virtual switch daemon process; Modify the first physical network card in the configuration file to the second physical network card; The second virtual switch daemon process is upgraded according to the modified configuration file.
2. The method for hot upgrading a virtual switch according to claim 1, characterized in that: The virtual bonded network card is a virtual network card formed by bonding the first physical network card and the second physical network card.
3. The method for hot upgrading a virtual switch according to claim 2, characterized in that: The method of concentrating the service traffic of the host machine on the first physical network card of the virtual bound network card includes: Disconnect the second physical network card from any virtual switch daemon process; The traffic originally sent to the second physical network card is sent to the first physical network card.
4. The method for hot upgrading a virtual switch according to claim 1, characterized in that: The step of synchronizing the configuration file of the first virtual switch daemon process to the second virtual switch daemon process includes: Establishing a transmission channel between the first virtual switch daemon process and the second virtual switch daemon process; Notify the first virtual switch daemon process to release resources and synchronize the configuration file to the second virtual switch daemon process through the transmission channel.
5. The method for hot upgrading a virtual switch according to claim 1, characterized in that: The step of upgrading the second virtual switch daemon process according to the modified configuration file includes: After completing the DPDK initialization of the second virtual switch daemon process according to the second physical network card, the configuration file is loaded to implement the upgrade of the second virtual switch daemon process.
6. The method for hot upgrading a virtual switch according to claim 2, characterized in that: The concentrating the service traffic of the host machine on the first physical network card and the second physical network card includes: Traffic forwarding is achieved by connecting the first physical network card and the second physical network card to the second virtual switch daemon process.
7. A device for hot upgrading a virtual switch, characterized in that: A first service traffic switching module is used to detach the second physical network card from the virtual binding network card, and concentrate the service traffic of the host machine on the first physical network card of the virtual binding network card, and the first physical network card is connected to the first virtual switch daemon process to realize traffic forwarding; wherein the virtual binding network card is a virtual network card formed by binding the first physical network card and the second physical network card; An upgrade module is used to start the second virtual switch daemon through the second physical network card; synchronize the configuration file of the first virtual switch daemon to the second virtual switch daemon; modify the first physical network card in the configuration file to the second physical network card; and implement the upgrade of the second virtual switch daemon according to the modified configuration file; An exit old process module is used to exit the first virtual switch daemon process after the second virtual switch daemon process is started; The second service traffic switching module is used to re-add the second physical network card to the virtual bound network card, concentrate the service traffic of the host machine on the second physical network card, and connect the second physical network card to the second virtual switch daemon process to realize traffic forwarding.
8. A device for hot upgrading a virtual switch, characterized in that: The method comprises a processor and a memory, wherein the processor and the memory are connected to each other, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Distributed virtual magnetic disc system of virtual machine
CN101419535A
Virtual network capable of achieving flow isolation control and construction method
CN103139039A
Dynamic migration method and system of virtual machine
CN103324532A
System and method of preventing forging IP address based on SDN virtual switch
CN105429946A
A method and apparatus for configuring virtual machine network
CN109981493A
