WO2018077052A1 - 一种虚拟交换机的升级方法和装置 - Google Patents

一种虚拟交换机的升级方法和装置 Download PDF

Info

Publication number
WO2018077052A1
WO2018077052A1 PCT/CN2017/106258 CN2017106258W WO2018077052A1 WO 2018077052 A1 WO2018077052 A1 WO 2018077052A1 CN 2017106258 W CN2017106258 W CN 2017106258W WO 2018077052 A1 WO2018077052 A1 WO 2018077052A1
Authority
WO
WIPO (PCT)
Prior art keywords
module
network
old
new
dynamic information
Prior art date
Application number
PCT/CN2017/106258
Other languages
English (en)
French (fr)
Inventor
马介悦
毛小云
刘峥
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2018077052A1 publication Critical patent/WO2018077052A1/zh
Priority to US16/398,112 priority Critical patent/US10855557B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5003Managing SLA; Interaction between SLA and QoS
    • H04L41/5019Ensuring fulfilment of SLA
    • H04L41/5025Ensuring fulfilment of SLA by proactively reacting to service quality change, e.g. by reconfiguration after service quality degradation or upgrade
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0895Configuration of virtualised networks or elements, e.g. virtualised network function or OpenFlow elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • H04L41/0836Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability to enhance reliability, e.g. reduce downtime
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0846Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • H04L41/0853Retrieval of network configuration; Tracking network configuration history by actively collecting configuration information or by backing up configuration information
    • H04L41/0856Retrieval of network configuration; Tracking network configuration history by actively collecting configuration information or by backing up configuration information by backing up or archiving configuration information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0866Checking the configuration
    • H04L41/0873Checking configuration conflicts between network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/65Re-configuration of fast packet switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches

Definitions

  • the present application relates to the field of virtual machine switch technologies, and in particular, to a method for upgrading a virtual switch and an upgrade device for a virtual switch.
  • a virtual switch is a core component, and the sending and receiving of virtual machine network packets is ultimately completed through a virtual switch.
  • the virtual switch can also handle different virtual machines and different network services, such as network packet access control, network packet rate limit control, security group and firewall, network address translation, and elastic IP.
  • a virtual machine VM, Virtual Machine
  • a virtual switch VSwitch, Virtual Switch
  • VNIC Virtual Network Interface Card
  • the virtual machine can communicate with the virtual switch based on its OS (Operating System) and installed APP.
  • the virtual switch can be connected to other physical switches in the data center, high-performance service gateways (eg, IGW (International Gateway), VGW (Voice GateWay), NATGW (Network Address). Translation GateWay, Network Address Translation Gateway), MPLSGW (Multi-Protocol Label Switching GateWay), cloud services (eg, OSS (Object Storage Service), RDS (Relational Database Service) Database services)), network controllers (Controller) and other network elements work together to support complex network services and applications in the cloud computing environment. For details, please refer to FIG. 2.
  • the virtual machine and the virtual switch form a virtual network (VM Network).
  • the virtual switch and other physical switches, high-performance service gateways, cloud services, and network controllers can form a physical network (Physical Network).
  • a cloud computing network is further formed.
  • Network elements in a cloud computing network can communicate with each other based on a physical network, and based on a physical network and the Internet (Internet).
  • User networks communicate with each other.
  • the network elements in the cloud computing network communicate with each other on the physical network through the tunnel (tunnel protocol), as shown by the solid arrows in Figure 2, between the virtual switch and the Internet gateway, the voice gateway, and the voice gateway and multi-protocol label switching. Gateways and network address translation gateways can communicate through tunnel protocols.
  • the network controller in the cloud computing network can control the network elements in the cloud computing network, as shown by the double-dashed arrows in FIG. 2, the network controller can control the virtual switch, the Internet gateway, the network address translation gateway, the voice gateway, and the multi-protocol.
  • a network element such as a label switching gateway. Because virtual switches are implemented in software, you need to consider the impact on existing network services when upgrading.
  • the virtual switch cannot be interrupted during the upgrade process, and there is no network packet loss. Secondly, if the virtual switch has a security group or a firewall, the existing connection state is not lost. Finally, the virtual switch needs to be Ensure that the network service configuration before and after the upgrade remains unchanged. For example, firewall rules and forwarding table entries are consistent.
  • the network service of the virtual machine cannot be interrupted, which means that this is a hot upgrade mode, that is, the network packet continues to be processed during the upgrade process.
  • the change of the network connection status must be reflected in the virtual switch after the upgrade is completed.
  • TCP Transmission Control Protocol
  • the establishment of a TCP (Transmission Control Protocol) connection is subject to a three-way handshake.
  • the TCP connection is closed for four times. Therefore, the network connection status of the TCP protocol is a finite state automaton. For a hot upgrade, you need to ensure that all network connection states saved in the virtual switch are consistent before and after the upgrade.
  • the virtual machine switch receives a TCP sync message and attempts to establish a network connection. At this time, it is received and processed by the old module of the virtual switch. After completing the three-way handshake, an ESTABLISEHED is generated. The network connection of the successful state), because the new module of the virtual switch is the last step of the hot upgrade, the network traffic will be switched over, so there is no such network connection in the new module. Then, if the network connection is not synchronized, it may cause the network packet on the network connection to be discarded after the upgrade is completed.
  • embodiments of the present application have been made in order to provide an upgrade method of a virtual switch and a corresponding upgrade apparatus of a virtual switch that overcome the above problems or at least partially solve the above problems.
  • the embodiment of the present application discloses a method for upgrading a virtual switch, where the virtual switch includes an old module, and the old module includes static configuration and dynamic information, and the method includes:
  • the network traffic When the network traffic is received on the virtual switch, it is sent to the new module after synchronizing the static configuration and dynamic information of the old module.
  • the static configuration includes a network service configuration
  • the step of statically configuring the new module and the static configuration of the old module includes:
  • the step of synchronizing the new module and the static configuration of the old module further includes:
  • the new network service configuration is synchronized to the new module.
  • the dynamic information includes a network session
  • the step of recording the dynamic information of the old module that is changing includes:
  • the network session is recorded in the bitmap with the first status identifier.
  • the step of synchronizing the dynamically changing dynamic information of the old module to the new module comprises:
  • the step of recording the dynamic information of the old module further includes:
  • the cache is sent to The network session of the old module.
  • the method further comprises:
  • the step of synchronizing the dynamically changing dynamic information of the old module to the new module comprises:
  • the cached old module network session is sent to the new module.
  • the new module has a designated interface, and when the network traffic is received on the virtual switch, the step of sending the new module after synchronizing the static configuration and dynamic information of the old module includes:
  • the embodiment of the present application further discloses an upgrade device of a virtual switch, where the virtual switch includes an old module, the old module includes static configuration and dynamic information, and the device includes:
  • a new module loading module configured to load a new module on the virtual switch
  • a static configuration synchronization module configured to synchronize static configurations of the new module and the old module
  • a dynamic information recording module configured to record the dynamically changing dynamic information of the old module during a process in which the dynamic information of the old module is constantly changing;
  • a dynamic information synchronization module configured to synchronize dynamic information of the old module to the new module
  • the network traffic switching module is configured to send to the new module after synchronizing the static configuration and dynamic information of the old module when the network traffic is received on the virtual switch.
  • the static configuration includes a network service configuration
  • the static configuration synchronization module includes:
  • a network service configuration acquisition submodule configured to acquire a network service configuration of the old module
  • the network service configuration synchronization submodule is configured to synchronize the network service configuration of the old module to the new module.
  • the method further comprises:
  • the new network service configuration synchronization sub-module is configured to synchronize the new network service configuration to the new module when the network service configuration of the old module receives a new network service configuration.
  • the dynamic information includes a network session
  • the dynamic information recording module includes:
  • a network session collection submodule configured to collect a network session of the old module
  • the network session recording submodule is configured to record the network session in the bitmap by using the first state identifier.
  • the dynamic information synchronization module comprises:
  • a first session copy submodule configured to copy a network session in the bitmap that is the first state identifier into the new module
  • the first identifier modification submodule is configured to modify the first state identifier corresponding to the network session copied into the new module to the second state identifier.
  • the dynamic information recording module comprises:
  • a session quantity statistics sub-module configured to count the number of network sessions in the bitmap that are identified by the first state
  • a synchronization time statistics sub-module configured to perform synchronization time of performing dynamic information of the synchronization new module and the old module
  • a first determining sub-module configured to determine whether the quantity is less than a first preset threshold, and/or whether the synchronization time reaches a preset time; if the quantity is less than a first preset threshold, and/or The session buffer sub-module is invoked when the synchronization time reaches the preset time. If the number is greater than or equal to the first preset threshold, and/or the synchronization time does not reach the preset time, the second determining sub-module is invoked;
  • a session cache sub-module for caching a network session sent to the old module is a session cache sub-module for caching a network session sent to the old module.
  • the method further comprises:
  • the second determining sub-module is configured to determine whether the quantity is greater than a second preset threshold; then calling the first session copy sub-module.
  • the dynamic information synchronization module comprises:
  • a second session copy submodule configured to copy all the network sessions in the bitmap that are identified by the first state into the new module
  • a cache session sending submodule configured to send the cached old module network session to the new module.
  • the new module has a designated interface
  • the network traffic switching module includes:
  • a network traffic sending submodule configured to send to the new module by using the specified interface when the network traffic received by the virtual switch.
  • the static configuration and dynamic information of the new module and the old module of the virtual switch are synchronized.
  • the network traffic of the virtual switch is switched from the old module to the old module.
  • the dynamic information of the old module of the virtual switch is still changing. Applying the embodiment of the present application can maintain the consistency of the dynamic information between the old module and the new module, which means that the upgrade mode of the embodiment of the present application is one.
  • the hot upgrade mode that is, during the upgrade process, the virtual switch can synchronize the dynamic information of the old module change to the new module without interrupting the old module receiving and processing the dynamic information, so that the new module and the old module are The dynamic information between the two is always consistent, achieving a smooth upgrade of the virtual switch.
  • FIG. 1 is a schematic diagram of a connection between a virtual machine and a virtual switch
  • FIG. 2 is a schematic diagram of an architecture of a virtualized network
  • FIG. 3 is a flow chart showing the steps of an embodiment of a method for upgrading a virtual switch according to the present application
  • FIG. 4 is a schematic diagram of a virtual switch static configuration synchronization of the present application.
  • FIG. 5 is a schematic diagram of dynamic information synchronization of a virtual switch according to the present application.
  • FIG. 6 is a flowchart of a virtual switch network session synchronization according to the present application.
  • FIG. 7 is a schematic diagram of pseudo code of a network session synchronization according to the present application.
  • 8A is a schematic diagram of network session synchronization of a virtual switch of the present application.
  • 8B is another schematic diagram of network session synchronization of a virtual switch of the present application.
  • 8C is a schematic diagram of network session synchronization of a virtual switch of the present application.
  • 8D is a schematic diagram of network session synchronization of a virtual switch of the present application.
  • 8E is a schematic diagram of network session synchronization of a virtual switch of the present application.
  • FIG. 9 is a structural block diagram of an embodiment of an apparatus for upgrading a virtual switch according to the present application.
  • the virtual switch may include an old module, and the method may specifically include the following steps:
  • Step 101 Load a new module on the virtual switch.
  • the virtual switch is a channel for connecting the virtual machine and the physical network outside the server, and the modules in the virtual switch need to be periodically performed to achieve better performance.
  • the old module of the virtual switch can be replaced with a new module.
  • the modules of the virtual switch may be one or more, and only part of the upgrade may be upgraded.
  • the old datapath module of the virtual switch may be replaced with a new datapath module.
  • the upgrade of the virtual switch can ensure that the network services of all the virtual machines accessed by the virtual switch are not affected, that is, transparent and non-aware.
  • Step 102 Synchronize static configuration of the new module and the old module.
  • the upgrade process of the entire virtual switch can be divided into two parts.
  • the following uses the Linux operating system as an operating environment as an example, and the virtual switch runs in the form of a system kernel driver.
  • the static configuration may include a network service configuration
  • the step 102 may include the following sub-steps:
  • Sub-step S11 acquiring a network service configuration of the old module
  • Sub-step S12 synchronizing the network service configuration of the old module to the new module.
  • the step 102 may further include the following sub-steps:
  • Sub-step S13 when the network service configuration of the old module receives a new network service configuration, the new network service configuration is synchronized to the new module.
  • the first part of the upgrade of the virtual switch is the preparation phase.
  • First, the network service configuration consistency between the new module and the old module is performed.
  • the network service configuration may include security rules, firewall rules, routing entries, and the like.
  • the virtual switch includes the old module Avs1.ko and the new module Avs2.ko, which is loaded with Avs2.ko while Avs1.ko is running, but at this time the network traffic also runs in Avs1.ko.
  • the network service configuration of the Avs1.ko is synchronized to the Avs2.ko through the Controller, so that the network service configuration of the new module of the virtual switch and the old module are consistent.
  • Step 103 Record, in a process in which the dynamic information of the old module is constantly changing, dynamically changing the dynamic information of the old module;
  • Step 104 Synchronize the dynamically changing dynamic information of the old module to the new module.
  • the second part of the upgrade of the virtual switch is the synchronization process of dynamic information.
  • dynamic information of network services such as network address translation, stateful firewall, etc., it is necessary to maintain consistency before and after the upgrade.
  • the dynamic information may include a network session, and the step 103 may be To include:
  • Sub-step S21 collecting a network session of the old module
  • Sub-step S22 the network session is recorded in the bitmap by using the first status identifier.
  • the network session may also be referred to as a network connection, a session, etc., and represents all information that the end-to-end interaction on the network generally includes two network traffic and a network connection session state in two directions.
  • the two directions indicate two directions, for example, the direction in which the network element A accesses the network element B, and the direction in which the network element B returns to the network element A.
  • a data structure such as a bitmap may be used to record a state change of a network session.
  • Each bit in the bitmap represents a state identifier of a network session, and the bit may be set to dirty or clear. For example, for the initial network session in the old module, and the network session received during the upgrade process, the dirty is used as the status identifier in the bitmap for recording.
  • the first state identifier can be dirty. In the initial case, the bits of all network sessions are set to dirty.
  • the old module does not interrupt the reception and processing of the network session, so the status identifier of the network session in the bitmap changes at any time due to the arrival of the network session, when copying the bitmap in the round After the network session, some of the network sessions within the old module have changed, and these changed network sessions are also set to dirty in the bitmap.
  • the dirty and clear can be represented in the manner of 1,0, as long as the network session before and after the copy can be distinguished, which is not limited in this embodiment of the present application.
  • the recording may be performed in other manners, and the embodiment of the present application also does not limit this.
  • the step 104 may include:
  • Sub-step S31 copying the network session in the bitmap that is the first state identifier into the new module
  • Sub-step S32 modifying the first state identifier corresponding to the network session copied into the new module to the second state identifier.
  • the second status indicator can be clear.
  • the network session marked with dirty in the bitmap is copied to the new module. After the copy is completed in the bitmap, the dirty corresponding to the network session is set to clear.
  • the step 103 may further include:
  • Sub-step S23 counting the number of network sessions in the bitmap that are identified by the first state
  • Sub-step S24 counting synchronization time of the dynamic information of the synchronization new module and the old module
  • Sub-step S25 determining whether the quantity is less than a first preset threshold, and/or whether the synchronization time reaches a preset time; if the quantity is less than a first preset threshold, and/or, the synchronization time is reached Preset time, then perform sub-step S26;
  • Sub-step S26 buffering the network session sent to the old module.
  • the step 104 may further include:
  • Sub-step S33 copying all the network sessions in the bitmap that are identified by the first state into the new module
  • Sub-step S34 the cached old module network session is sent to the new module.
  • the network session in the bitmap may be in a state of change, and the embodiment of the present application may not repeat the copy operation all the time, so it is added in the embodiment of the present application.
  • the decision is to set one or more conditions to start the last round of network session connection synchronization when the preset condition is reached during the synchronization network session.
  • the network packet processing of the old module is suspended, and all new network messages are cached, ensuring that all dirty network sessions are synchronized to the new module. Since no new network messages are processed, the state of the network session of the old module will not change any more, so the network session of the new module and the old module can be completely consistent after the last round of synchronization ends.
  • the number of network sessions that are dirty in the bitmap may be counted, and/or the time when the new module and the old module network session are synchronized may be counted as the last round of network session synchronization. Judgment conditions.
  • the network session of the dirty in the bitmap is continuously copied to the new module.
  • the network session of the cached old module can also be sent to the new module, so that the network session on the new module and the old module are consistent.
  • the step 103 may further include:
  • Sub-step S27 if the number is greater than or equal to the first preset threshold, and/or the synchronization time does not reach the preset time, determine whether the quantity is greater than a second preset threshold; The second preset threshold is then invoked in the sub-step S31.
  • the network session synchronization is entered, and vice versa, the network session in the bitmap is dirty.
  • the step of copying to the new module that is, entering the loop operation, starts the synchronization of the next round of network sessions.
  • the first preset threshold and the second preset threshold may be set according to the proportion of the total number of network sessions of the old module, for example, may be set to 10%, 8%, of course, may also be set to a fixed Numerical values are not limited in this embodiment of the present application.
  • the values of the first preset threshold and the second preset threshold may be the same or different according to the actual setting, and the embodiment of the present application does not limit this.
  • the network session synchronization may specifically be as follows:
  • Step S41 collecting a network session of the old module
  • Step S42 the network session is recorded in the bitmap by using the first status identifier
  • Step S43 copying the network session in the bitmap that is the first state identifier into the new module.
  • Step S44 modifying the first state identifier corresponding to the network session copied to the new module to the second state identifier
  • Step S45 counting the number of network sessions in the bitmap that are identified by the first state
  • Step S46 performing a synchronization time of performing dynamic information of the synchronization new module and the old module
  • Step S47 determining whether the quantity is less than a first preset threshold, or whether the synchronization time reaches a preset time; if the quantity is less than a first preset threshold, or the synchronization time reaches a preset time, Step S48 is performed; if the number is greater than or equal to the first preset threshold, and the synchronization time does not reach the preset time, step S411 is performed;
  • Step S48 buffering a network session sent to the old module
  • Step S49 Copy all the network sessions in the bitmap that are identified by the first state to the new module.
  • Step S410 sending the cached old module network session to the new module
  • step S411 it is determined whether the quantity is greater than a second preset threshold. If the quantity is greater than the second preset threshold, the process returns to step S43.
  • FIG. 7 a schematic diagram of a pseudo-code of network session synchronization according to the present application is shown.
  • the bitmap.dirty_num>threshold that is, the number of network sessions in the bitmap in the bitmap reaches a preset threshold
  • a copy operation of the network session is performed, and the status identifier of the copied network session in the bitmap is changed from dirty to clear.
  • the old module Avs1 of this example the new network session is continuously fetched, and the captured network session is written to the bitmap and the dirty is set.
  • Step 105 When receiving dynamic information on the virtual switch, send to the new module after synchronizing the static configuration and dynamic information of the old module.
  • the network traffic is switched to the new module of the virtual switch.
  • the network traffic also called flow, is represented by a tuple of network messages in one direction from end to end, which is generally a five-tuple.
  • the new module may have a designated interface, and the step 105 may include the following sub-steps:
  • Sub-step S51 the processing function pointer of the virtual switch is switched to the designated interface of the new module
  • Sub-step S52 when the network traffic received by the virtual switch is sent to the new module through the designated interface.
  • the processing function pointer of all the network packets is switched to the designated interface of the new module, so that the new network packet is processed by the new module of the virtual switch, and the hot upgrade is completed.
  • the virtual switch when the virtual switch loads a new module for upgrading, the static configuration and dynamic information of the new module and the old module of the virtual switch are synchronized. After the upgrade is completed, the network traffic of the virtual switch is switched from the old module to the new module. During the upgrade process, the dynamic information of the old module of the virtual switch is still changing. Applying the embodiment of the present application can maintain the consistency of the dynamic information between the old module and the new module, which means that the upgrade mode of the embodiment of the present application is one.
  • the hot upgrade mode that is, during the upgrade process, the virtual switch can synchronize the dynamic information of the old module change to the new module without interrupting the old module receiving and processing the dynamic information, so that the new module and the old module are The dynamic information between the two is always consistent, achieving a smooth upgrade of the virtual switch.
  • bitmap-based virtual switch upgrade method in the embodiment of the present application is described below by using specific examples.
  • the new module is first loaded on the virtual switch, and then the static configuration and dynamic information of the new module and the old module are synchronized.
  • the configuration process for the dynamic information is as follows:
  • the synchronization time of the new module and the old module is counted in the embodiment of the present application, and the synchronization time of the new module and the old module is also calculated in the embodiment of the present application.
  • the old module in order to implement the hot upgrade, the old module does not interrupt the network session from the network, and the new network session makes the bit The figure changes, and the present application uses the bitmap for the synchronization of the new module before the last round of the network session synchronization. Since the old module does not need to interrupt the post-processing of the network session, the embodiment of the present application can implement A hot upgrade of the virtual switch.
  • the proposed switch may include an old module, and the device may specifically include the following modules:
  • a new module loading module 201 configured to load a new module on the virtual switch
  • a static configuration synchronization module 202 configured to synchronize static configurations of the new module and the old module
  • the static configuration may include a network service configuration
  • the static configuration synchronization module 202 may include the following sub-modules:
  • a network service configuration acquisition submodule configured to acquire a network service configuration of the old module
  • the network service configuration synchronization submodule is configured to synchronize the network service configuration of the old module to the new module.
  • the static configuration synchronization module 202 may include the following sub-modules:
  • the new network service configuration synchronization sub-module is configured to synchronize the new network service configuration to the new module when the network service configuration of the old module receives a new network service configuration.
  • the dynamic information recording module 203 is configured to record the dynamically changing dynamic information of the old module during the process of changing the dynamic information of the old module;
  • the dynamic information synchronization module 204 is configured to synchronize the dynamic information of the old module to the new module;
  • the dynamic information includes a network session
  • the dynamic information recording module 203 may include the following sub-modules:
  • a network session collection submodule configured to collect a network session of the old module
  • the network session recording submodule is configured to record the network session in the bitmap by using the first state identifier.
  • the dynamic information synchronization module 204 may include the following sub-modules:
  • a first session copy submodule configured to copy a network session in the bitmap that is the first state identifier into the new module
  • the first identifier modification submodule is configured to modify the first state identifier corresponding to the network session copied into the new module to the second state identifier.
  • the dynamic information recording module 203 may include the following sub-modules:
  • a session quantity statistics sub-module configured to count the number of network sessions in the bitmap that are identified by the first state
  • a synchronization time statistics sub-module configured to perform synchronization time of performing dynamic information of the synchronization new module and the old module
  • a first determining sub-module configured to determine whether the quantity is less than a first preset threshold, and/or whether the synchronization time reaches a preset time; if the quantity is less than a first preset threshold, and/or The session buffer sub-module is invoked when the synchronization time reaches the preset time. If the number is greater than or equal to the first preset threshold, and/or the synchronization time does not reach the preset time, the second determining sub-module is invoked;
  • a session cache sub-module for caching a network session sent to the old module is a session cache sub-module for caching a network session sent to the old module.
  • the dynamic information recording module 203 may include the following sub-modules:
  • the second determining sub-module is configured to determine whether the quantity is greater than a second preset threshold; then calling the first session copy sub-module.
  • the dynamic information synchronization module 204 may include the following sub-modules:
  • a second session copy submodule configured to copy all the network sessions in the bitmap that are identified by the first state into the new module
  • a cache session sending submodule configured to send the cached old module network session to the new module.
  • the network traffic switching module is configured to send to the new module after synchronizing the static configuration and dynamic information of the old module when the network traffic is received on the virtual switch.
  • the new module may have a designated interface
  • the network traffic switching module may include the following submodules:
  • a network traffic sending submodule configured to send to the new module by using the specified interface when the network traffic received by the virtual switch.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • embodiments of the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM Is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include non-persistent computer readable media, such as modulated data signals and carrier waves.
  • Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal device to produce a machine such that instructions are executed by a processor of a computer or other programmable data processing terminal device
  • Means are provided for implementing the functions specified in one or more of the flow or in one or more blocks of the flow chart.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本申请实施例提供了一种虚拟交换机的升级方法和装置,所述虚拟交换机包括旧模块,所述旧模块包括静态配置和动态信息,所述的方法包括:在所述虚拟交换机上加载新模块;同步所述新模块和所述旧模块的静态配置;在所述旧模块的动态信息不断变化的过程中,记录所述旧模块不断变化的动态信息;将所述旧模块不断变化的动态信息同步至所述新模块;当在所述虚拟交换机上接收到网络流量时,发送至所述同步旧模块静态配置和动态信息后的新模块。应用本申请实施例可以保持旧模块与新模块之间动态信息的一致性,意味着本申请实施例的升级方式为一种热升级方式。

Description

一种虚拟交换机的升级方法和装置
本申请要求2016年10月28日递交的申请号为201610973938.0、发明名称为“一种虚拟交换机的升级方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及虚拟机交换机技术领域,特别是涉及一种虚拟交换机的升级方法和一种虚拟交换机的升级装置。
背景技术
近年来,随着互联网的快速发展,网络虚拟化受到了广泛的关注。在网络虚拟化的环境中,虚拟交换机是核心组件,虚拟机网络报文的收发最终都要通过虚拟交换机来完成。虚拟交换机还可以针对不同的虚拟机、不同的网络业务做相应处理,例如,网络报文访问控制,网络报文限速控制,安全组和防火墙,网络地址转换以及弹性IP等网络业务。
参照图1所示的一种虚拟机和虚拟交换机的连接示意图,虚拟机(VM,Virtual Machine)和虚拟交换机(VSwitch,Virtual Switch)之间通过VNIC(虚拟网络接口卡)连接,在处理网络业务时,虚拟机可以基于其OS(Operating System,操作系统)和安装好的APP(应用)与虚拟交换机的通信。
在云计算网络(Alibaba Network)中,虚拟交换机可以和数据中心的其他物理交换机,高性能业务网关(例如:IGW(International Gateway,互联网关)、VGW(Voice GateWay,语音网关)、NATGW(Network Address Translation GateWay,网络地址转换网关)、MPLSGW(Multi-Protocol Label Switching GateWay,多协议标签交换网关)),云服务(例如:OSS(Object Storage Service,对象存储服务)、RDS(Relational Database Service,关系型数据库服务)),网络控制器(Controller)等网元协同工作,共同支撑云计算环境下复杂的网络业务和应用。具体可以参照图2。
如图2所示,虚拟机与虚拟交换机组成虚拟网络(VM Network),虚拟交换机与其他物理交换机,高性能业务网关,云服务以及网络控制器之间可以互相组成物理网络(Physical Network),在这些物理网络的基础上进一步组成了云计算网络。云计算网络中的网元可以基于物理网络互相进行通信,以及,基于物理网络与因特网(Internet)和 用户网络(User Network)互相进行通信。
云计算网络中的网元通过tunnel(隧道协议)在物理网络上互相进行通信,如图2中实线双箭头所示,虚拟交换机与互联网关、语音网关之间,语音网关与多协议标签交换网关、网络地址转换网关之间,可以通过隧道协议进行通信。此外,云计算网络中的网络控制器可以控制云计算网络中的网元,如图2虚线双箭头所示,网络控制器可以控制虚拟交换机、互联网关、网络地址转换网关、语音网关、多协议标签交换网关等网元。由于虚拟交换机利用软件实现,因此在升级时需要考虑对已有网络业务的影响。首先,虚拟交换机在升级过程中网络不能中断,不能有网络报文丢失;其次,如果虚拟交换机有安全组或者防火墙一类的业务,还需要保持已有连接状态不丢失;最后,虚拟交换机还需要保证升级前后的网络业务配置保持不变,例如防火墙规则,转发表表项等配置前后一致。
同时,在升级的过程中若要实现网络业务的平滑切换,虚拟机的网络业务不能中断,意味着这是一种热升级的方式,即此时网络报文在升级的过程中也在继续处理中,并且对已有的网络连接状态造成变化,这就要求升级的过程中必须把网络连接状态的变化,也反映到升级完成后的虚拟交换机中。
举例来说,TCP(Transmission Control Protocol,传输控制协议)连接的建立要经历三次握手,同样地,TCP连接的关闭要经过四次握手,因此TCP协议的网络连接状态是一个有限状态自动机。对于热升级而言,需要保证虚拟交换机在升级前后,内部保存的所有网络连接状态都是一致的。
以TCP协议为例,在热升级期间,虚拟机交换机接收到TCP sync报文尝试建立一个网络连接,此时被虚拟交换机的旧模块接收到并处理,完成了三次握手之后产生了一个ESTABLISEHED(连接成功状态)的网络连接,由于虚拟交换机的新模块是在热升级结束最后一步时,才会将网络流量切换过来,故而在新模块里没有这个网络连接。那么,如果不进行网络连接的同步,就有可能造成升级完成之后,这个网络连接上的网络报文都被丢弃。
以流行的开源虚拟交换机软件openvswitch为例,其数据面的升级需要更换虚拟交换机的datapath(数据通道)模块,此时会造成网络连接的中断,这只是一种冷升级的方式,会造成服务不可用,导致无法达到更高的SLA(Service-Level Agreement,服务等级协议)服务承诺。
发明内容
鉴于上述问题,提出了本申请实施例以便提供一种克服上述问题或者至少部分地解决上述问题的一种虚拟交换机的升级方法和相应的一种虚拟交换机的升级装置。
为了解决上述问题,本申请实施例公开了一种虚拟交换机的升级方法,所述虚拟交换机包括旧模块,所述旧模块包括静态配置和动态信息,所述的方法包括:
在所述虚拟交换机上加载新模块;
同步所述新模块和所述旧模块的静态配置;
在所述旧模块的动态信息不断变化的过程中,记录所述旧模块不断变化的动态信息;
将所述旧模块不断变化的动态信息同步至所述新模块;
当在所述虚拟交换机上接收到网络流量时,发送至所述同步旧模块静态配置和动态信息后的新模块。
优选地,所述静态配置包括网络业务配置,所述同步新模块和所述旧模块的静态配置的步骤包括:
获取所述旧模块的网络业务配置;
将所述旧模块的网络业务配置同步至所述新模块。
优选地,所述同步新模块和所述旧模块的静态配置的步骤,还包括:
当所述旧模块的网络业务配置接收到新的网络业务配置时,将所述新的网络业务配置同步至所述新模块。
优选地,所述动态信息包括网络会话,所述记录旧模块不断变化的动态信息的步骤包括:
采集所述旧模块的网络会话;
将所述网络会话采用第一状态标识记录在位图中。
优选地,所述将旧模块不断变化的动态信息同步至所述新模块的步骤包括:
将所述位图中为第一状态标识的网络会话拷贝到所述新模块中;
将所述拷贝到新模块中的网络会话对应的第一状态标识修改为第二状态标识。
优选地,所述记录旧模块的动态信息的步骤还包括:
统计所述位图中为第一状态标识的网络会话的数量;
统计进行所述同步新模块和所述旧模块的动态信息的同步时间;
判断所述数量是否小于第一预设阈值,和/或,所述同步时间是否达到预设时间;
若所述数量小于第一预设阈值,和/或,所述同步时间达到预设时间,则缓存发送至 所述旧模块的网络会话。
优选地,还包括:
若所述数量大于或等于第一预设阈值,和/或,所述同步时间没有达到预设时间,则判断所述数量是否大于第二预设阈值;
若所述数量大于第二预设阈值,则返回所述将所述位图中为第一状态标识的网络会话拷贝到所述新模块中的步骤中。
优选地,所述将旧模块不断变化的动态信息同步至所述新模块的步骤包括:
将所述位图中为第一状态标识的网络会话全部拷贝到所述新模块中;
将所述缓存的旧模块网络会话发送至所述新模块。
优选地,所述新模块具有指定接口,所述当在虚拟交换机上接收到网络流量时,发送至所述同步旧模块静态配置和动态信息后的新模块的步骤包括:
在所述虚拟交换机的处理函数指针切换至所述新模块的指定接口;
当在所述虚拟交换机接收到的网络流量时,通过所述指定接口发送至所述新模块。
本申请实施例还公开了一种虚拟交换机的升级装置,所述虚拟交换机包括旧模块,所述旧模块包括静态配置和动态信息,所述的装置包括:
新模块加载模块,用于在所述虚拟交换机上加载新模块;
静态配置同步模块,用于同步所述新模块和所述旧模块的静态配置;
动态信息记录模块,用于在所述旧模块的动态信息不断变化的过程中,记录所述旧模块不断变化的动态信息;
动态信息同步模块,用于将所述旧模块不断变化的动态信息同步至所述新模块;
网络流量切换模块,用于当在所述虚拟交换机上接收到网络流量时,发送至所述同步旧模块静态配置和动态信息后的新模块。
优选地,所述静态配置包括网络业务配置,所述静态配置同步模块包括:
网络业务配置获取子模块,用于获取所述旧模块的网络业务配置;
网络业务配置同步子模块,用于将所述旧模块的网络业务配置同步至所述新模块。
优选地,还包括:
新网络业务配置同步子模块,用于当所述旧模块的网络业务配置接收到新的网络业务配置时,将所述新的网络业务配置同步至所述新模块。
优选地,所述动态信息包括网络会话,所述动态信息记录模块包括:
网络会话采集子模块,用于采集所述旧模块的网络会话;
网络会话记录子模块,用于将所述网络会话采用第一状态标识记录在位图中。
优选地,所述动态信息同步模块包括:
第一会话拷贝子模块,用于将所述位图中为第一状态标识的网络会话拷贝到所述新模块中;
第一标识修改子模块,用于将所述拷贝到新模块中的网络会话对应的第一状态标识修改为第二状态标识。
优选地,所述动态信息记录模块包括:
会话数量统计子模块,用于统计所述位图中为第一状态标识的网络会话的数量;
同步时间统计子模块,用于统计进行所述同步新模块和所述旧模块的动态信息的同步时间;
第一判断子模块,用于判断所述数量是否小于第一预设阈值,和/或,所述同步时间是否达到预设时间;若所述数量小于第一预设阈值,和/或,所述同步时间达到预设时间,则调用会话缓存子模块,若所述数量大于或等于第一预设阈值,和/或,所述同步时间没有达到预设时间,则调用第二判断子模块;
会话缓存子模块,用于缓存发送至所述旧模块的网络会话。
优选地,还包括:
第二判断子模块,用于判断所述数量是否大于第二预设阈值;则调用第一会话拷贝子模块。
优选地,所述动态信息同步模块包括:
第二会话拷贝子模块,用于将所述位图中为第一状态标识的网络会话全部拷贝到所述新模块中;
缓存会话发送子模块,用于将所述缓存的旧模块网络会话发送至所述新模块。
优选地,所述新模块具有指定接口,所述网络流量切换模块包括:
指定接口切换子模块,用于在所述虚拟交换机的处理函数指针切换至所述新模块的指定接口;
网络流量发送子模块,用于当在所述虚拟交换机接收到的网络流量时,通过所述指定接口发送至所述新模块。
本申请实施例包括以下优点:
本申请实施例在虚拟交换机加载新模块进行升级时,同步虚拟交换机的新模块和旧模块的静态配置和动态信息,在升级结束后,该虚拟交换机的网络流量从旧模块切换到 新模块中。在升级过程中,虚拟交换机旧模块的动态信息仍然在不断地变化中,应用本申请实施例可以保持旧模块与新模块之间动态信息的一致性,意味着本申请实施例的升级方式为一种热升级方式,即,在升级过程中,虚拟交换机能够在不中断旧模块接收并处理动态信息的情况下,将旧模块变化的动态信息也同步到新模块中,使得新模块和旧模块之间的动态信息始终保持一致,实现虚拟交换机的平滑升级。
附图说明
图1是一种虚拟机和虚拟交换机的连接示意图;
图2是一种虚拟化网络的架构示意图;
图3是本申请的一种虚拟交换机的升级方法实施例的步骤流程图;
图4是本申请的一种虚拟交换机静态配置同步的示意图;
图5是本申请的一种虚拟交换机动态信息同步的示意图;
图6是本申请的一种虚拟交换机网络会话同步的流程图;
图7是本申请的一种网络会话同步的伪代码示意图;
图8A是本申请的一种虚拟交换机的网络会话同步一种示意图;
图8B是本申请的一种虚拟交换机的网络会话同步另一种示意图;
图8C是本申请的一种虚拟交换机的网络会话同步又一种示意图;
图8D是本申请的一种虚拟交换机的网络会话同步又一种示意图;
图8E是本申请的一种虚拟交换机的网络会话同步又一种示意图;
图9是本申请的一种虚拟交换机的升级装置实施例的结构框图。
具体实施方式
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。
参照图3,示出了本申请的一种虚拟交换机的升级方法实施例的步骤流程图,所述虚拟交换机可以包括旧模块,所述的方法具体可以包括如下步骤:
步骤101,在所述虚拟交换机上加载新模块;
在具体实现中,虚拟交换机是用于连接虚拟机和服务器外部物理网络的通道,虚拟交换机中的模块需要定期以达到更好的性能。
在升级时,可对于虚拟交换机的旧模块进行使用新模块替代。在一种示例中,虚拟交换机的模块可以为一个或多个,在升级时可只升级部分,例如,可以将虚拟交换机旧的datapath模块替换为新的datapath模块。
本申请实施例对于虚拟交换机的升级,可以保证其接入的所有虚拟机的网络业务不受影响,即透明无感知。
步骤102,同步所述新模块和所述旧模块的静态配置;
在本申请实施例中,整个虚拟交换机的升级过程可以划分为两部分,下面以Linux操作系统作为运行环境为例,虚拟交换机以系统内核驱动的形式运行。
在本申请的一种优选实施例中,所述静态配置可以包括网络业务配置,所述步骤102可以包括如下子步骤:
子步骤S11,获取所述旧模块的网络业务配置;
子步骤S12,将所述旧模块的网络业务配置同步至所述新模块。
在本申请的一种优选实施例中,所述步骤102,还可以包括如下子步骤:
子步骤S13,当所述旧模块的网络业务配置接收到新的网络业务配置时,将所述新的网络业务配置同步至所述新模块。
虚拟交换机的升级的第一部分是准备阶段,首先进行新模块和旧模块之间的网络业务配置的一致性,其中,网络业务配置可以包括安全性规则,防火墙规则,路由表项等等。
参照图4和图5,虚拟交换机包括旧模块Avs1.ko和新模块Avs2.ko,在Avs1.ko正在运行中加载Avs2.ko,但此时网络流量还跑在Avs1.ko中。在本申请实施例中通过Controller,将Avs1.ko的网络业务配置同步给Avs2.ko,使得虚拟交换机新模块和旧模块的网络业务配置保持一致。
在同步网络业务配置的过程中,如果有新的网络业务配置下发到虚拟交换机中,也将同时配置到新模块和旧模块,始终保持两者网络业务配置的一致性。
步骤103,在所述旧模块的动态信息不断变化的过程中,记录所述旧模块不断变化的动态信息;
步骤104,将所述旧模块不断变化的动态信息同步至所述新模块;
虚拟交换机的升级的第二部分是动态信息的同步过程,对于某些网络业务的动态信息,如网络地址转换、有状态的防火墙等等,需要在升级前后保持一致性。
在本申请实施例的一种示例中,所述动态信息可以包括网络会话,所述步骤103可 以包括:
子步骤S21,采集所述旧模块的网络会话;
子步骤S22,将所述网络会话采用第一状态标识记录在位图中。
在具体实现中,网络会话又可以称为网络连接,Session等等,表示端到端在网络上交互的所有信息,一般包括两个方向上的两条网络流量和网络连会话状态。其中,两个方向表示双向,例如,网元A访问网元B的方向,以及,网元B回访网元A的方向。
在本申请实施例中,可以采用位图(bitmap)这种的数据结构来记录网络会话的状态变化,位图里的每个bit代表一个网络会话的状态标识,bit可以置为dirty或clear。例如,对于旧模块中初始的网络会话,以及,在升级过程中接收到的网络会话,在位图中采用dirty作为状态标识进行记录。
本申请实施例在升级开始后,在同步新模块和旧模块的静态配置时,开始采集旧模块的网络会话,并采用对应bit记录在位图中。第一状态标识可以为dirty,初始情况下,所有网络会话的bit都置dirty。
由于本申请实施例为热升级方式,旧模块不中断网络会话的接收和处理,因此位图中网络会话的状态标识,随时因为网络会话的到来而发生变化,当拷贝完一轮位图中的网络会话之后,旧模块内部的某些网络会话又发生了变化,这些发生变化的网络会话也会在位图中被置dirty。
需要说明的是,在位图中可以1,0这种方式来表示dirty和clear,只要能够区分拷贝前后的网络会话即可,本申请实施例对此不加以限制。另外,除了上述采用位图来记录旧模块中网络会话之外,也可以采用其他方式来进行记录,本申请实施例同样对此不加以限制。
在本申请实施例的一种示例中,所述步骤104可以包括:
子步骤S31,将所述位图中为第一状态标识的网络会话拷贝到所述新模块中;
子步骤S32,将所述拷贝到新模块中的网络会话对应的第一状态标识修改为第二状态标识。
第二状态标识可以为clear。新模块与旧模块进行网络会话的同步时,会将位图中标记dirty的网络会话拷贝到新模块中,位图中拷贝完之后网络会话对应的dirty被置为clear。
在本申请实施例的一种示例中,所述步骤103还可以包括:
子步骤S23,统计所述位图中为第一状态标识的网络会话的数量;
子步骤S24,统计进行所述同步新模块和所述旧模块的动态信息的同步时间;
子步骤S25,判断所述数量是否小于第一预设阈值,和/或,所述同步时间是否达到预设时间;若所述数量小于第一预设阈值,和/或,所述同步时间达到预设时间,则执行子步骤S26;
子步骤S26,缓存发送至所述旧模块的网络会话。
在本申请实施例的一种示例中,所述步骤104还可以包括:
子步骤S33,将所述位图中为第一状态标识的网络会话全部拷贝到所述新模块中;
子步骤S34,将所述缓存的旧模块网络会话发送至所述新模块。
由于旧模块不中断网络会话的接收和处理,因此位图中的网络会话可能一直处于变化的状态中,而本申请实施例也不可能一直重复做拷贝的操作,故而在本申请实施例中增加判决,设定一个或多个条件,当在同步网络会话过程中达到预设条件时,开始执行最后一轮的网络会话连接同步。
当开始执行最后一轮的网络会话连接同步时,暂停旧模块的网络报文处理,所有新来的网络报文被缓存,保证所有dirty的网络会话都被同步到了新模块中。由于没有新的网络报文被处理,旧模块的网络会话的状态也不会再变化,因此最后一轮的同步结束之后就可以保证新模块和旧模块的网络会话是完全一致的。
在本申请实施例中,可以统计在位图中为dirty的网络会话的数量,和/或,统计开始进行新模块和旧模块网络会话同步的时间,作为是否进行最后一轮的网络会话同步的判决条件。
在暂停旧模块的网络报文处理后,继续将位图中dirty的网络会话全部拷贝到新模块中。同时,还可以将缓存的旧模块的网络会话发送至新模块中,使得新模块和旧模块上的网络会话保持一致。
在本申请实施例的一种示例中,所述步骤103还可以包括:
子步骤S27,若所述数量大于或等于第一预设阈值,和/或,所述同步时间没有达到预设时间,则判断所述数量是否大于第二预设阈值;若所述数量大于第二预设阈值,则调用所述子步骤S31。
如果位图中dirty的网络会话数量小于第一预设阈值,或者,连接同步时间已经达到预设时间,进入网络会话同步的最后阶段,反之,则可以重复进行将位图中为dirty的网络会话拷贝到新模块的步骤,即进入循环操作,开始下一轮网络会话的同步。
考虑到如果只要有dirty的网络会话就继续进行将位图中为dirty的网络会话拷贝到 新模块这些步骤,可能比较需要重复执行的次数会比较多,故在本申请实施例中还可以增加多一个判决条件。
具体地,如果位图中dirty的网络会话的数量超过了第二预设阈值,那么才开始下一轮网络会话的同步,重复进行将位图中为dirty的网络会话拷贝到新模块的步骤中,也即是返回子步骤S31。
在本申请的一种优选实施方式中,考虑到有些网络会话并不是很重要,如果全部拷贝到新模块中不仅费时,也不必要,因此可以在同步网络会话时,只进行指定的网络会话的同步,本申请实施例对此不加以限制。
需要说明的是,第一预设阈值和第二预设阈值可以按照旧模块网络会话总数量比例来进行设定,比如可以设置为10%,8%,当然,也可以设置为某一固定的数值,本申请实施例对此不加以限制。另外,第一预设阈值和第二预设阈值的数值可以根据实际设置为相同或不同,本申请实施例对此也不加以限制。为了使本领域技术人员更好地理解动态同步的过程,以下采用一个具体的步骤流程进行说明。参照图6,网络会话同步具体可以为如下子步骤:
步骤S41,采集所述旧模块的网络会话;
步骤S42,将所述网络会话采用第一状态标识记录在位图中;
步骤S43,将所述位图中为第一状态标识的网络会话拷贝到所述新模块中;
步骤S44,将所述拷贝到新模块中的网络会话对应的第一状态标识修改为第二状态标识;
步骤S45,统计所述位图中为第一状态标识的网络会话的数量;
步骤S46,统计进行所述同步新模块和所述旧模块的动态信息的同步时间;
步骤S47,判断所述数量是否小于第一预设阈值,或者,所述同步时间是否达到预设时间;若所述数量小于第一预设阈值,或者,所述同步时间达到预设时间,则执行步骤S48;若所述数量大于或等于第一预设阈值,并且,所述同步时间没有达到预设时间,则执行步骤S411;
步骤S48,缓存发送至所述旧模块的网络会话;
步骤S49,将所述位图中为第一状态标识的网络会话全部拷贝到所述新模块中;
步骤S410,将所述缓存的旧模块网络会话发送至所述新模块;
步骤S411,判断所述数量是否大于第二预设阈值,若所述数量大于第二预设阈值,则返回所述步骤S43。
参照图7,所示为本申请的一种网络会话同步的伪代码示意图,在本示例的新模块Avs2中,当bitmap.dirty_num>threshold,即位图中dirty的网络会话数量达到预设阈值时,进行网络会话的拷贝操作,并且对于位图中拷贝过的网络会话的状态标识,将从dirty修改为clear。在本示例的旧模块Avs1中,则不断抓取新来的网络会话,并将抓取到的网络会话写入位图并置dirty。
步骤105,当在所述虚拟交换机上接收到动态信息时,发送至所述同步旧模块静态配置和动态信息后的新模块。
当虚拟交换机的升级结束后,把网络流量切换到虚拟交换机的新模块上。其中,网络流量又称为flow,用端到端在一个方向上的网络报文的元组来表示,一般是五元组。
在本申请的一种优选实施例中,所述新模块可以具有指定接口,所述步骤105可以包括如下子步骤:
子步骤S51,在所述虚拟交换机的处理函数指针切换至所述新模块的指定接口;
子步骤S52,当在所述虚拟交换机接收到的网络流量时,通过所述指定接口发送至所述新模块。
在本申请实施例中,所有网络报文的处理函数指针将切换到新模块的指定接口上,让新的网络报文通过虚拟交换机的新模块处理,至此热升级结束。
本申请实施例在虚拟交换机加载新模块进行升级时,同步虚拟交换机的新模块和旧模块的静态配置和动态信息,在升级结束后,该虚拟交换机的网络流量从旧模块切换到新模块中。在升级过程中,虚拟交换机旧模块的动态信息仍然在不断地变化中,应用本申请实施例可以保持旧模块与新模块之间动态信息的一致性,意味着本申请实施例的升级方式为一种热升级方式,即,在升级过程中,虚拟交换机能够在不中断旧模块接收并处理动态信息的情况下,将旧模块变化的动态信息也同步到新模块中,使得新模块和旧模块之间的动态信息始终保持一致,实现虚拟交换机的平滑升级。
为使本领域技术人员更好地理解本申请实施例,以下通过具体的示例来说明本申请实施例中基于位图的虚拟交换机升级方法。
在虚拟交换机进行升级时,首先在该虚拟交换机上加载新模块,然后开始同步新模块与旧模块的静态配置和动态信息,其中,对于动态信息的配置过程如下所示:
采集旧模块的网络会话,并将这几个网络会话记录在位图中,具体如图8A所示,在该位图中记录了旧模块中Session1-Session4(网络会话1-网络会话4)这几个网络会话,由于这些网络会话尚未同步到新模块中,故采用“1”记录。
将旧模块中的网络会话采集到位图后,开始将位图中为“1”的网络会话拷贝到新模块中,其中,对于拷贝到新模块后网络会话,由于已经同步到新模块中,故在位图中将其从“1”修改为“0”,具体如图8B所示。
在本申请中旧模块网络连接不中断,旧模块的动态信息仍然在不断地变化中,因此,在将旧模块的网络会话拷贝到新模块的过程中,有些网络会话由于发生变化,将重新由“0”置为“1”,具体如图8C所示。
对于旧模块的重新由“0”置为“1”网络会话,还将继续拷贝到新模块中,为了避免陷入死循环,在本申请实施例中统计新模块和旧模块的同步时间,以及,在位图中为“1”的网络会话的数量,当新模块和旧模块的同步时间达到预设时间(例如30分钟),或者,位图中为“1”的网络会话的数量超过预设阈值(例如100个),则可以截断旧模块网络连接,旧模块暂停处理网络会话,因此其网络会话将不会再发生变化。缓存发送给旧模块的网络会话,同时将位图中为“1”的网络会话拷贝到新模块中,最后将缓存的网络会话发送到新模块中,此时新模块和旧模块同步成功。
当然,如果新模块和旧模块的同步时间未达到预设时间,或者,位图中为“1”的网络会话的数量未超过预设阈值,则继续将位图中为“1”的网络会话拷贝到新模块中的步骤。
同步结束之后,将在先旧模块的所有网络会话切换到新模块指定的接口上,至此虚拟交换机的升级结束。同步结束后的位图,具体如图8D所示。
综上可知,具体如图8E所示,本申请实施例的虚拟交换机的旧模块与新模块同步过程中,为了实现热升级,旧模块不中断从网络处接收网络会话,新的网络会话使得位图发生变化,而本申请在最后一轮的网络会话同步前,都会采用该位图用于新模块的同步,由于不需要中断旧模块对于网络会话的接收后处理,故而本申请实施例能够实现虚拟交换机的热升级。
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请实施例所必须的。
参照图9,示出了本申请的一种虚拟交换机的升级装置实施例的结构框图,所述虚 拟交换机可以包括旧模块,所述的装置具体可以包括如下模块:
新模块加载模块201,用于在所述虚拟交换机上加载新模块;
静态配置同步模块202,用于同步所述新模块和所述旧模块的静态配置;
在本申请的一种优选实施例中,所述静态配置可以包括网络业务配置,所述静态配置同步模块202可以包括如下子模块:
网络业务配置获取子模块,用于获取所述旧模块的网络业务配置;
网络业务配置同步子模块,用于将所述旧模块的网络业务配置同步至所述新模块。
在本申请的一种优选实施例中,所述静态配置同步模块还202可以包括如下子模块:
新网络业务配置同步子模块,用于当所述旧模块的网络业务配置接收到新的网络业务配置时,将所述新的网络业务配置同步至所述新模块。
动态信息记录模块203,用于在所述旧模块的动态信息不断变化的过程中,记录所述旧模块不断变化的动态信息;
动态信息同步模块204,用于将所述旧模块不断变化的动态信息同步至所述新模块;
在本申请的一种优选实施例中,所述动态信息包括网络会话,所述动态信息记录模块203可以包括如下子模块:
网络会话采集子模块,用于采集所述旧模块的网络会话;
网络会话记录子模块,用于将所述网络会话采用第一状态标识记录在位图中。
在本申请的一种优选实施例中,所述动态信息同步模块204可以包括如下子模块:
第一会话拷贝子模块,用于将所述位图中为第一状态标识的网络会话拷贝到所述新模块中;
第一标识修改子模块,用于将所述拷贝到新模块中的网络会话对应的第一状态标识修改为第二状态标识。
在本申请的一种优选实施例中,所述动态信息记录模块203可以包括如下子模块:
会话数量统计子模块,用于统计所述位图中为第一状态标识的网络会话的数量;
同步时间统计子模块,用于统计进行所述同步新模块和所述旧模块的动态信息的同步时间;
第一判断子模块,用于判断所述数量是否小于第一预设阈值,和/或,所述同步时间是否达到预设时间;若所述数量小于第一预设阈值,和/或,所述同步时间达到预设时间,则调用会话缓存子模块,若所述数量大于或等于第一预设阈值,和/或,所述同步时间没有达到预设时间,则调用第二判断子模块;
会话缓存子模块,用于缓存发送至所述旧模块的网络会话。
在本申请的一种优选实施例中,所述动态信息记录模块203可以包括如下子模块:
第二判断子模块,用于判断所述数量是否大于第二预设阈值;则调用第一会话拷贝子模块。
在本申请的一种优选实施例中,所述动态信息同步模块204可以包括如下子模块:
第二会话拷贝子模块,用于将所述位图中为第一状态标识的网络会话全部拷贝到所述新模块中;
缓存会话发送子模块,用于将所述缓存的旧模块网络会话发送至所述新模块。
网络流量切换模块,用于当在所述虚拟交换机上接收到网络流量时,发送至所述同步旧模块静态配置和动态信息后的新模块。
在本申请的一种优选实施例中,所述新模块可以具有指定接口,所述网络流量切换模块可以包括如下子模块:
指定接口切换子模块,用于在所述虚拟交换机的处理函数指针切换至所述新模块的指定接口;
网络流量发送子模块,用于当在所述虚拟交换机接收到的网络流量时,通过所述指定接口发送至所述新模块。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
本领域内的技术人员应明白,本申请实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
在一个典型的配置中,所述计算机设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存 是计算机可读介质的示例。计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非持续性的电脑可读媒体(transitory media),如调制的数据信号和载波。
本申请实施例是参照根据本申请实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何 其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。
以上对本申请所提供的一种虚拟交换机的升级方法和一种虚拟交换机的升级装置,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (18)

  1. 一种虚拟交换机的升级方法,其特征在于,所述虚拟交换机包括旧模块,所述旧模块包括静态配置和动态信息,所述的方法包括:
    在所述虚拟交换机上加载新模块;
    同步所述新模块和所述旧模块的静态配置;
    在所述旧模块的动态信息不断变化的过程中,记录所述旧模块不断变化的动态信息;
    将所述旧模块不断变化的动态信息同步至所述新模块;
    当在所述虚拟交换机上接收到网络流量时,发送至所述同步旧模块静态配置和动态信息后的新模块。
  2. 根据权利要求1所述的方法,其特征在于,所述静态配置包括网络业务配置,所述同步新模块和所述旧模块的静态配置的步骤包括:
    获取所述旧模块的网络业务配置;
    将所述旧模块的网络业务配置同步至所述新模块。
  3. 根据权利要求2所述的方法,其特征在于,所述同步新模块和所述旧模块的静态配置的步骤,还包括:
    当所述旧模块的网络业务配置接收到新的网络业务配置时,将所述新的网络业务配置同步至所述新模块。
  4. 根据权利要求1所述的方法,其特征在于,所述动态信息包括网络会话,所述记录旧模块不断变化的动态信息的步骤包括:
    采集所述旧模块的网络会话;
    将所述网络会话采用第一状态标识记录在位图中。
  5. 根据权利要求4所述的方法,其特征在于,将所述旧模块不断变化的动态信息同步至所述新模块的步骤包括:
    将所述位图中为第一状态标识的网络会话拷贝到所述新模块中;
    将所述拷贝到新模块中的网络会话对应的第一状态标识修改为第二状态标识。
  6. 根据权利要求4所述的方法,其特征在于,所述记录旧模块的动态信息的步骤还包括:
    统计所述位图中为第一状态标识的网络会话的数量;
    统计进行所述同步新模块和所述旧模块的动态信息的同步时间;
    判断所述数量是否小于第一预设阈值,和/或,所述同步时间是否达到预设时间;
    若所述数量小于第一预设阈值,和/或,所述同步时间达到预设时间,则缓存发送至所述旧模块的网络会话。
  7. 根据权利要求6所述的方法,其特征在于,还包括:
    若所述数量大于或等于第一预设阈值,和/或,所述同步时间没有达到预设时间,则判断所述数量是否大于第二预设阈值;
    若所述数量大于第二预设阈值,则返回所述将所述位图中为第一状态标识的网络会话拷贝到所述新模块中的步骤中。
  8. 根据权利要求6所述的方法,其特征在于,将所述旧模块不断变化的动态信息同步至所述新模块的步骤包括:
    将所述位图中为第一状态标识的网络会话全部拷贝到所述新模块中;
    将所述缓存的旧模块网络会话发送至所述新模块。
  9. 根据权利要求1所述的方法,其特征在于,所述新模块具有指定接口,所述当在虚拟交换机上接收到网络流量时,发送至所述同步旧模块静态配置和动态信息后的新模块的步骤包括:
    在所述虚拟交换机的处理函数指针切换至所述新模块的指定接口;
    当在所述虚拟交换机接收到的网络流量时,通过所述指定接口发送至所述新模块。
  10. 一种虚拟交换机的升级装置,其特征在于,所述虚拟交换机包括旧模块,所述旧模块包括静态配置和动态信息,所述的装置包括:
    新模块加载模块,用于在所述虚拟交换机上加载新模块;
    静态配置同步模块,用于同步所述新模块和所述旧模块的静态配置;
    动态信息记录模块,用于在所述旧模块的动态信息不断变化的过程中,记录所述旧模块不断变化的动态信息;
    动态信息同步模块,用于将所述旧模块不断变化的动态信息同步至所述新模块;
    网络流量切换模块,用于当在所述虚拟交换机上接收到网络流量时,发送至所述同步旧模块静态配置和动态信息后的新模块。
  11. 根据权利要求10所述的装置,其特征在于,所述静态配置包括网络业务配置,所述静态配置同步模块包括:
    网络业务配置获取子模块,用于获取所述旧模块的网络业务配置;
    网络业务配置同步子模块,用于将所述旧模块的网络业务配置同步至所述新模块。
  12. 根据权利要求11所述的装置,其特征在于,还包括:
    新网络业务配置同步子模块,用于当所述旧模块的网络业务配置接收到新的网络业务配置时,将所述新的网络业务配置同步至所述新模块。
  13. 根据权利要求10所述的装置,其特征在于,所述动态信息包括网络会话,所述动态信息记录模块包括:
    网络会话采集子模块,用于采集所述旧模块的网络会话;
    网络会话记录子模块,用于将所述网络会话采用第一状态标识记录在位图中。
  14. 根据权利要求13所述的装置,其特征在于,所述动态信息同步模块包括:
    第一会话拷贝子模块,用于将所述位图中为第一状态标识的网络会话拷贝到所述新模块中;
    第一标识修改子模块,用于将所述拷贝到新模块中的网络会话对应的第一状态标识修改为第二状态标识。
  15. 根据权利要求13所述的装置,其特征在于,所述动态信息记录模块包括:
    会话数量统计子模块,用于统计所述位图中为第一状态标识的网络会话的数量;
    同步时间统计子模块,用于统计进行所述同步新模块和所述旧模块的动态信息的同步时间;
    第一判断子模块,用于判断所述数量是否小于第一预设阈值,和/或,所述同步时间是否达到预设时间;若所述数量小于第一预设阈值,和/或,所述同步时间达到预设时间,则调用会话缓存子模块,若所述数量大于或等于第一预设阈值,和/或,所述同步时间没有达到预设时间,则调用第二判断子模块;
    会话缓存子模块,用于缓存发送至所述旧模块的网络会话。
  16. 根据权利要求15所述的装置,其特征在于,还包括:
    第二判断子模块,用于判断所述数量是否大于第二预设阈值;则调用第一会话拷贝子模块。
  17. 根据权利要求15所述的装置,其特征在于,所述动态信息同步模块包括:
    第二会话拷贝子模块,用于将所述位图中为第一状态标识的网络会话全部拷贝到所述新模块中;
    缓存会话发送子模块,用于将所述缓存的旧模块网络会话发送至所述新模块。
  18. 根据权利要求10所述的装置,其特征在于,所述新模块具有指定接口,所述网 络流量切换模块包括:
    指定接口切换子模块,用于在所述虚拟交换机的处理函数指针切换至所述新模块的指定接口;
    网络流量发送子模块,用于当在所述虚拟交换机接收到的网络流量时,通过所述指定接口发送至所述新模块。
PCT/CN2017/106258 2016-10-28 2017-10-16 一种虚拟交换机的升级方法和装置 WO2018077052A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/398,112 US10855557B2 (en) 2016-10-28 2019-04-29 Method and device for upgrading virtual switch

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610973938.0 2016-10-28
CN201610973938.0A CN108023756B (zh) 2016-10-28 2016-10-28 一种虚拟交换机的升级方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/398,112 Continuation US10855557B2 (en) 2016-10-28 2019-04-29 Method and device for upgrading virtual switch

Publications (1)

Publication Number Publication Date
WO2018077052A1 true WO2018077052A1 (zh) 2018-05-03

Family

ID=62024380

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/106258 WO2018077052A1 (zh) 2016-10-28 2017-10-16 一种虚拟交换机的升级方法和装置

Country Status (4)

Country Link
US (1) US10855557B2 (zh)
CN (1) CN108023756B (zh)
TW (1) TWI742131B (zh)
WO (1) WO2018077052A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019217216A1 (en) * 2018-05-11 2019-11-14 Microsoft Technology Licensing, Llc Maintaining apparent connectivity during virtual switch servicing
CN111414236A (zh) * 2020-03-23 2020-07-14 佳讯飞鸿(北京)智能科技研究院有限公司 Cpu和内存的在线调整方法、装置和虚拟电子设备
US10855557B2 (en) 2016-10-28 2020-12-01 Alibaba Group Holding Limited Method and device for upgrading virtual switch

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109450676B (zh) * 2018-10-29 2022-04-26 锐捷网络股份有限公司 一种交换机升级方法及装置、电子设备、计算机可读介质
CN109450701B (zh) * 2018-12-07 2020-04-17 北京金山云网络技术有限公司 一种虚拟交换机切换方法、装置、宿主机及计算机可读存储介质
CN113595802A (zh) * 2021-08-09 2021-11-02 山石网科通信技术股份有限公司 分布式防火墙的升级方法及其装置
CN113746761A (zh) * 2021-09-01 2021-12-03 北京东土科技股份有限公司 一种网络交换设备
CN114710408A (zh) * 2022-03-18 2022-07-05 阿里云计算有限公司 实现虚拟交换机热升级的方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217678A (zh) * 2007-12-28 2008-07-09 华为技术有限公司 一种系统升级方法、系统及装置
CN102694672A (zh) * 2011-03-24 2012-09-26 华为技术有限公司 虚拟机参数迁移的方法、设备和虚拟机服务器
US20140181984A1 (en) * 2012-12-21 2014-06-26 International Business Machines Corporation Method and apparatus for authentication of solution topology
CN103930873A (zh) * 2011-11-10 2014-07-16 思科技术公司 用于虚拟化环境的基于动态策略的接口配置
US20150163196A1 (en) * 2013-12-05 2015-06-11 Vmware, Inc. System and method for dynamically configuring a dhcp server in a virtual network environment

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5180729B2 (ja) * 2008-08-05 2013-04-10 株式会社日立製作所 計算機システム及びバス割当方法
CN101387976B (zh) * 2008-11-07 2010-06-02 清华大学 一种基于数据差异的逻辑卷快速同步方法
JP5069732B2 (ja) * 2009-10-05 2012-11-07 株式会社日立製作所 計算機装置、計算機システム、アダプタ承継方法
US8335236B2 (en) * 2010-05-06 2012-12-18 Cisco Technology, Inc. FCoE isolated port channels and FCoE session resynchronization in vPC/MCEC environments using DCBXP
CN101980484B (zh) * 2010-10-14 2016-02-10 中兴通讯股份有限公司 一种实现路由器全保护的方法及系统
US20120320918A1 (en) * 2011-06-14 2012-12-20 International Business Business Machines Bridge port between hardware lan and virtual switch
US8797914B2 (en) * 2011-09-12 2014-08-05 Microsoft Corporation Unified policy management for extensible virtual switches
CN102438042B (zh) * 2011-11-04 2014-04-02 中国工商银行股份有限公司 一种多点接入设备的动态参数同步方法及系统
JP5906896B2 (ja) * 2012-03-29 2016-04-20 富士通株式会社 ネットワークシステム及び通信制御方法
CN102761615A (zh) * 2012-06-29 2012-10-31 浪潮(北京)电子信息产业有限公司 一种实现远程复制系统数据同步的方法及装置
US8943490B1 (en) * 2012-09-28 2015-01-27 Juniper Networks, Inc. Intelligent non-stop software upgrade
CN103856349A (zh) * 2012-12-07 2014-06-11 华为技术有限公司 多核路由器的版本升级处理方法及多核路由器
CN103036907B (zh) * 2012-12-28 2015-08-19 北京星网锐捷网络技术有限公司 一种会话流老化方法及装置
US9513970B2 (en) * 2013-03-01 2016-12-06 Cisco Technology, Inc. Optimizing handling of virtual machine mobility in data center environments
US9733968B2 (en) * 2015-03-16 2017-08-15 Oracle International Corporation Virtual machine (VM) migration from switched fabric based computing system to external systems
CN105245470B (zh) * 2015-11-05 2019-05-17 深圳市网心科技有限公司 一种数据传输方法和装置
CN107493180B (zh) * 2016-06-13 2021-04-30 阿里巴巴集团控股有限公司 一种虚拟交换机的升级方法以及装置
CN108023756B (zh) 2016-10-28 2021-09-28 阿里巴巴集团控股有限公司 一种虚拟交换机的升级方法和装置
CN114826913A (zh) * 2017-11-30 2022-07-29 华为技术有限公司 业务不中断的虚拟交换机升级方法以及相关设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217678A (zh) * 2007-12-28 2008-07-09 华为技术有限公司 一种系统升级方法、系统及装置
CN102694672A (zh) * 2011-03-24 2012-09-26 华为技术有限公司 虚拟机参数迁移的方法、设备和虚拟机服务器
CN103930873A (zh) * 2011-11-10 2014-07-16 思科技术公司 用于虚拟化环境的基于动态策略的接口配置
US20140181984A1 (en) * 2012-12-21 2014-06-26 International Business Machines Corporation Method and apparatus for authentication of solution topology
US20150163196A1 (en) * 2013-12-05 2015-06-11 Vmware, Inc. System and method for dynamically configuring a dhcp server in a virtual network environment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10855557B2 (en) 2016-10-28 2020-12-01 Alibaba Group Holding Limited Method and device for upgrading virtual switch
WO2019217216A1 (en) * 2018-05-11 2019-11-14 Microsoft Technology Licensing, Llc Maintaining apparent connectivity during virtual switch servicing
US10666560B2 (en) 2018-05-11 2020-05-26 Microsoft Technology Licensing, Llc Maintaining apparent connectivity during virtual switch servicing
CN112136113A (zh) * 2018-05-11 2020-12-25 微软技术许可有限责任公司 在虚拟交换机维修期间维持表观连接性
CN111414236A (zh) * 2020-03-23 2020-07-14 佳讯飞鸿(北京)智能科技研究院有限公司 Cpu和内存的在线调整方法、装置和虚拟电子设备

Also Published As

Publication number Publication date
CN108023756A (zh) 2018-05-11
US10855557B2 (en) 2020-12-01
US20190253326A1 (en) 2019-08-15
CN108023756B (zh) 2021-09-28
TWI742131B (zh) 2021-10-11
TW201817197A (zh) 2018-05-01

Similar Documents

Publication Publication Date Title
WO2018077052A1 (zh) 一种虚拟交换机的升级方法和装置
US10630779B2 (en) System and method for using VoIP session continuity information using logical scalable units
US10063443B2 (en) System and method for managing VoLTE session continuity information using logical scalable units
US11537419B2 (en) Virtual machine migration while maintaining live network links
JP5710779B2 (ja) 非同期仮想マシン複製
US9426072B2 (en) Traffic flow classification
US9529623B2 (en) Method, migration management apparatus, network device, and virtual machine server for migrating virtual machine parameters
US11582118B2 (en) Real-time scalable virtual session and network analytics
JP2020113924A (ja) モニタリングプログラム,プログラマブルデバイス及びモニタリング方法
WO2023011254A1 (zh) 基于远程直接数据存储的热迁移方法、装置及设备
WO2022148363A1 (zh) 数据传输方法及数据传输服务器
WO2014186940A1 (zh) 一种硬盘和数据处理方法
US20220210005A1 (en) Synchronizing communication channel state information for high flow availability
WO2024037296A1 (zh) 基于协议族的quic数据传输方法及装置
EP2670112B1 (en) System and Method for Communicating in a Telecommunication Network via Common Key Routing and Proxies
US20220210086A1 (en) Managing network state for high flow availability within distributed network platform
EP3065379A1 (en) System and method for volte session continuation using logical scalable units
WO2015024373A1 (zh) 一种虚拟机通信方法及装置
WO2017071430A1 (zh) 处理报文的方法、网卡及系统、更新信息的方法及主机
Peuster et al. A flow handover protocol to support state migration in softwarized networks
CN109413118A (zh) 一种实现会话同步的方法、装置及存储介质、程序产品
Mann et al. Ncp: Service replication in data centers through software defined networking
US11223869B2 (en) Content stream multicasting with relative latency for media devices
US10868758B1 (en) Enabling bypass flows for network traffic between devices
US9674282B2 (en) Synchronizing SLM statuses of a plurality of appliances in a cluster

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17864893

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17864893

Country of ref document: EP

Kind code of ref document: A1