A method and device for configuring open virtual network cluster timeout election time

By using readiness and liveness probes to automatically configure the OVN cluster timeout election time when deploying OVN services in Kubernetes, the problem of data processing failures caused by frequent leader identity changes in the OVN cluster was solved, thereby improving the reliability of OVN services and reducing operation and maintenance costs.

CN116506286BActive Publication Date: 2025-10-28JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310495550.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-27
Publication Date
2025-10-28
Estimated Expiration
2043-04-27

AI Technical Summary

Technical Problem

In an OVN cluster, setting the timeout election period too short leads to frequent changes in leader identity, causing data processing failures issued by the cloud management system, increasing the operational difficulty for delivery personnel and OVN performance risks.

Method used

When deploying OVN services in Kubernetes, the timeout election time of the OVN cluster is automatically modified through readiness probes and liveness probes. Kubernetes container technology is used to run the OVN service in containers, and modification scripts are built into the readiness probes to detect the startup and leader nodes of the OVN service to automatically configure the timeout election time.

Benefits of technology

This reduces the operational costs for delivery personnel, avoids performance degradation of the OVN cluster caused by manual modifications, and enhances the robustness and reliability of the OVN service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116506286B_ABST
    Figure CN116506286B_ABST
Patent Text Reader

Abstract

This invention provides a method, system, device, and storage medium for configuring the timeout election time of an Open Virtual Network (OVN) cluster. The method includes: deploying an OVN service using Kubernetes on each OVN node and setting up readiness probes and liveness probes; in response to the readiness probe detecting that the OVN service has fully started, checking whether the current OVN node is the leader node within the OVN cluster; in response to the current OVN node being the leader node, obtaining the target value for the OVN cluster election time configured in the OVN configuration file; and configuring the timeout election time of the OVN cluster according to the target election time value. This invention can automatically modify the timeout election time of the OVN cluster during deployment when using Kubernetes to deploy OVN services, reducing manual operation and maintenance costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud computing, and more specifically, to a method, system, device, and storage medium for configuring the timeout election time of an Open Virtual Network cluster. Background Technology

[0002] In the OVN (Open Virtual Network) cluster leader election mechanism, when the deployment environment is large-scale or experiences a large amount of high-concurrency data within a certain period, if the OVN cluster's timeout election period is set too short, frequent changes in leader identity can lead to the cloud management system's data being unable to be processed by the ovn-nb or ovn-sb programs. This results in upper layers failing to receive a response after the API request times out. Currently, the default timeout election period for OVN clusters is 1000ms, and this cannot be configured during deployment. It can only be modified manually by executing commands on the leader node after deployment, and this configuration may be lost after redeployment. Manually modifying this configuration after deployment is cumbersome and easy to forget, and requires modification again after redeployment. This not only increases the operational difficulty for delivery personnel but also increases the risk to OVN performance within the environment. Summary of the Invention

[0003] In view of this, the purpose of this invention is to provide a method, system, computer device, and computer-readable storage medium for configuring the timeout election time of an Open Virtual Network (OVN) cluster. This invention pre-plans the timeout election time of the OVN cluster, configures it in the Kubernetes OVN configuration file, and embeds the modification script into the OVN service's readiness probe. When deploying the OVN service using Kubernetes, the timeout election time of the OVN cluster can be automatically modified during the deployment process, reducing manual operation and maintenance costs.

[0004] To achieve the above objectives, one aspect of this invention provides a method for configuring the timeout election time of an Open Virtual Network (AVN) cluster, comprising the following steps: deploying an AVN service using Kubernetes on each AVN node and setting up readiness probes and liveness probes; in response to the readiness probe detecting that the AVN service has fully started, checking whether the current AVN node is the leader node within the AVN cluster; in response to the current AVN node being the leader node within the AVN cluster, obtaining the AVN cluster election time target value configured in the AVN configuration file; and configuring the timeout election time of the AVN cluster according to the election time target value.

[0005] In some implementations, the method further includes: continuously detecting the operational status of the Open Virtual Network Service using a liveness probe.

[0006] In some implementations, the continuous detection of the operating status of the Open Virtual Network Service (AVN) via the liveness probe includes: restarting the AVN in response to detecting an abnormal operating status of the AVN.

[0007] In some implementations, deploying Open Virtual Network Services (AVN) using Kubernetes on each Open Virtual Network node includes running the AVN service in a Kubernetes container using Kubernetes container technology.

[0008] In some implementations, deploying Open Virtual Network Services (AVN) using Kubernetes on each Open Virtual Network node includes saving the AVN as a container image for batch deployment.

[0009] In some implementations, deploying Open Virtual Network Services using Kubernetes on each Open Virtual Network node includes: in response to creating a pod, creating a container corresponding to the pod, and configuring the pod to manage Kubernetes container services.

[0010] In some implementations, setting up the readiness probe and the liveness probe includes: setting a script to modify the open virtual network cluster timeout election time, and setting the script in the readiness probe.

[0011] In another aspect, this invention provides a system for configuring the timeout election time of an Open Virtual Network (AVN) cluster, comprising: a deployment module configured to deploy an AVN service using Kubernetes on each AVN node and to set up readiness probes and liveness probes; a checking module configured to check whether the current AVN node is the leader node in the AVN cluster in response to the readiness probe detecting that the AVN service has fully started; an acquisition module configured to acquire the AVN cluster election time target value configured in the AVN configuration file in response to the current AVN node being the leader node in the AVN cluster; and an execution module configured to configure the timeout election time of the AVN cluster according to the election time target value.

[0012] In another aspect of the present invention, a computer device is provided, comprising: at least one processor; and a memory storing computer instructions executable on the processor, the instructions, when executed by the processor, implementing the steps of the method described above.

[0013] In another aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method steps.

[0014] The present invention has the following beneficial technical effects: it enables delivery personnel to deploy OVN services without having to wait until the OVN service deployment is completed before manually executing the modification command to configure the timeout election time of the OVN cluster, thereby reducing the operational costs of delivery personnel and avoiding the performance degradation of the OVN cluster caused by forgetting to manually modify the settings after deployment. Furthermore, placing the OVN service in a Kubernetes container also enhances the robustness of the OVN service. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of an embodiment of the method for configuring the timeout election time of an open virtual network cluster provided by the present invention;

[0017] Figure 2 A schematic diagram of an embodiment of the system for configuring the timeout election time of an open virtual network cluster provided by the present invention;

[0018] Figure 3 A schematic diagram of the hardware structure of a computer device for configuring the timeout election time of an open virtual network cluster, as provided by the present invention;

[0019] Figure 4 This is a schematic diagram of an embodiment of a computer storage medium for configuring the timeout election time of an open virtual network cluster, as provided by the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.

[0021] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two entities or parameters with the same name but different names. It is clear that "first" and "second" are only for the convenience of expression and should not be construed as limiting the embodiments of the present invention. Subsequent embodiments will not explain this in detail.

[0022] In a first aspect, an embodiment of a method for configuring the timeout election time of an Open Virtual Network cluster is proposed. Figure 1 This diagram illustrates an embodiment of the method for configuring the timeout election time of an open virtual network cluster provided by the present invention. Figure 1 As shown, the embodiments of the present invention include the following steps:

[0023] S1. Deploy Open Virtual Network Services using Kubernetes on each Open Virtual Network node and set up readiness probes and liveness probes.

[0024] S2. In response to the readiness probe detecting that the Open Virtual Network service has been fully started, check whether the current Open Virtual Network node is the leader node in the Open Virtual Network cluster.

[0025] S3. In response to the current Open Virtual Network node being the leader node within the Open Virtual Network cluster, obtain the Open Virtual Network cluster election time target value configured in the Open Virtual Network configuration file; and

[0026] S4. Configure the timeout election time of the open virtual network cluster according to the election time target value.

[0027] OVN is an SDN controller developed by the OpenvSwitch project (OpenvSwitch: OVS for short, is a high-quality, multi-layered virtual switching software. Its purpose is to support large-scale network automation through programmable extensions, while also supporting standard management interfaces and protocols). Therefore, compared with other SDN products, OVN has better compatibility and performance advantages with OVS and OpenStack. On the other hand, the development of Neutron (the component in the OpenStack project responsible for providing network services, which is based on the concept of software-defined networking and realizes resource management under network virtualization) for OVNPlugin is also very mature. OVN has no additional requirements for the running platform. It can be said that an environment that can run OVS can definitely run OVN, and an environment using OVS can be smoothly upgraded to the OVN architecture without losing the original network and routing data, and without the need for migration of the original data.

[0028] In the OVN working mechanism, there are two roles: OVN Central and OVN Host. They are responsible for the interaction between OVN and the CMS cloud management system and OVS, respectively, to connect the upper and lower layer services of the network in Open Stack to realize complete network functions.

[0029] The OVN Central node runs the core OVN services OVN Northbound DB, OVN Southbound DB, and OVN-northd. OVN Northbound DB, based on ovsdb-server, stores information such as logical switches, logical routers, ACLs, and logical ports. OVN-northd acts as a centralized controller, primarily responsible for translating various information from OVN Northbound DB into a format that OVN Southbound DB can understand and sending it to OVN Southbound DB. OVN Southbound DB stores network information sent from OVN-northd and sends it to ovn-controller.

[0030] The OVN Host node is the node that provides virtual machines or virtual networks. It runs the ovn-controller service, which connects to the OVN Southbound DB and serves as the authorized source for the physical network information it records. It uploads the underlying physical network and its correspondence with the logical network to the OVN Southbound DB. It connects to OVS as the OpenFlow controller and is responsible for translating the logical flow tables transmitted from the OVN Southbound DB into OVS flow tables and sending them to OVS for storage.

[0031] In the OVN architecture, communication between components is no longer via RPC but instead uses the ovsdb protocol. This eliminates the bottleneck of the RPC protocol. OVN itself also supports native Layer 3 functionality, so there is no need to rely on the Linux TCP / IP stack to implement Layer 3 network services, and thus no need to create a large number of namespaces that consume significant system overhead. However, OVN itself also has certain bottlenecks, which leads to another setting: the timeout election period within the OVN cluster.

[0032] The OVN Northbound DB and OVN Southbound DB services correspond to the programs ovn-nb and ovn-sb, respectively, each forming a cluster. Taking ovn-sb as an example, all ovn-sb nodes in the environment together constitute an ovn-sb cluster. One ovn-sb node acts as the leader, responsible for interacting with ovn-northd and various ovn-controllers. It receives logical flow tables and other information from ovn-northd and distributes the received logical flow tables and other information to the ovn-controllers. Of course, the leader within the cluster will continuously change. OVN has a heartbeat keep-alive mechanism. If keep-alive messages are not received from all non-leader ovn-sb nodes within the heartbeat keep-alive period, a leader re-election will be initiated. Although the election is fast, the election period will inevitably affect the processing performance of information sent from ovn-northd.

[0033] This invention discloses a method for automatically modifying the OVN cluster timeout election time during the deployment phase. The invention includes Kubernetes-based deployment of the OVN service, a Kubernetes readyness probe for the OVN service, and a script for modifying the OVN cluster timeout election time. Deploying the OVN service using Kubernetes is simpler and easier to manage, and it also provides robustness to the OVN service. Since the OVN cluster timeout election time can only be modified after the OVN service starts and only on the leader node, it needs to be combined with the Kubernetes readyness probe. This invention, when writing the Kubernetes readyness probe, not only checks whether the service has started normally, but also adds a check to see if it is the leader node. If it is the leader node, the built-in cluster timeout election time script is executed.

[0034] Ordinary OVN services, running only on physical machines or Docker containers, cannot automatically recover from program failures, nor can they automatically execute built-in scripts after starting the OVN service. This is because, for physical machines, starting the service simply involves executing the startup command, and once started, the page can only remain in the foreground and cannot execute scripts subsequently. In this case, one must manually modify the timeout election time of the OVN cluster. Deploying OVN services using Docker containers has the same effect on executing subsequent scripts as physical machine deployments, and both have inherent defects in subsequent operations.

[0035] Kubernetes (k8s) readiness probes perfectly address this shortcoming. Kubernetes container services are managed by pods. When a pod is created, its corresponding Docker containers are automatically created. k8s uses readiness and liveness probes to monitor the running status of services within the Docker containers under a pod. Readiness probes detect when the OVN service actually starts, while liveness probes continuously monitor the OVN service's running status, automatically restarting the service for recovery in case of failure. A script to modify the OVN cluster timeout election time is built into the k8s readiness probe. When the OVN service is detected to be running and the node is the OVN cluster leader, the script is executed, achieving automated modification. This eliminates the need for manual operation and allows for automatic configuration by retrieving user-defined target values ​​from the OVN configuration file each time an OVN service is deployed using k8s.

[0036] Deploy Open Virtual Network (AVN) services using Kubernetes on each AVN node and configure readiness and liveness probes. In response to the readiness probe detecting that the AVN service has fully started, check if the current AVN node is the leader node within the AVN cluster. If the current AVN node is the leader node, obtain the AVN cluster election time target value configured in the AVN configuration file. Configure the AVN cluster's timeout election period based on the election time target value.

[0037] In some implementations, the method further includes: continuously detecting the operational status of the Open Virtual Network Service using a liveness probe.

[0038] In some implementations, the continuous detection of the operating status of the Open Virtual Network Service (AVN) via the liveness probe includes: restarting the AVN in response to detecting an abnormal operating status of the AVN.

[0039] In some implementations, setting up the readiness probe and the liveness probe includes: setting a script to modify the open virtual network cluster timeout election time, and setting the script in the readiness probe.

[0040] The Kubernetes readiness probe is used to detect the deployment status of the OVN service. When it is detected that the OVN service has been successfully deployed and is ready to provide services, an OVN built-in command is executed to determine whether the current node is the leader node of the OVN cluster. If the current OVN node is detected as the leader node of the OVN cluster, a script built into the readiness probe is executed to modify the OVN cluster timeout election time.

[0041] In some implementations, deploying Open Virtual Network Services (AVN) using Kubernetes on each Open Virtual Network node includes running the AVN service in a Kubernetes container using Kubernetes container technology.

[0042] In some implementations, deploying Open Virtual Network Services (AVN) using Kubernetes on each Open Virtual Network node includes saving the AVN as a container image for batch deployment.

[0043] In some implementations, deploying Open Virtual Network Services using Kubernetes on each Open Virtual Network node includes: in response to creating a pod, creating a container corresponding to the pod, and configuring the pod to manage Kubernetes container services.

[0044] Using Kubernetes container technology transforms OVN services from traditional direct deployment to running within Kubernetes containers. This not only endows them with the characteristics of batch deployment, high portability, and low environmental dependency, but also gives them the self-healing properties of Kubernetes containers. By starting OVN services via command line, the container will automatically restart when the service encounters problems, thus improving the robustness of the service.

[0045] This invention utilizes Kubernetes (k8s) to deploy OVN services on each OVN node. Containerizing the OVN service, rather than deploying it directly on the server, allows the OVN service to benefit from the advantages of containers. Not only can the OVN service be saved as a container image for batch deployment, but the self-healing capabilities of k8s also provide a degree of self-healing for the containerized OVN service, reducing its operational costs. Combined with k8s' readiness probe, subsequent actions after the OVN service's startup command can be implemented. After the readiness probe detects that the OVN service has fully started, it checks whether the current node is the leader node in the OVN cluster. If it is the leader node, it first obtains the target value for the OVN cluster election time configured in the OVN configuration file, and then executes a modification script to automatically configure the OVN cluster's timeout election time. If it is not the leader node, it skips to perform other actions.

[0046] This invention enables delivery personnel to configure the timeout election time of the OVN cluster without having to wait until the OVN service is deployed before manually executing the modification command. This reduces the operational costs for delivery personnel, avoids the performance degradation of the OVN cluster caused by forgetting to manually modify the settings after deployment, and enhances the robustness of the OVN service by placing it in a Kubernetes container.

[0047] It should be noted that the steps in each embodiment of the above-described method for configuring the timeout election time of an open virtual network cluster can be interchanged, substituted, added, or deleted. Therefore, these reasonable permutations and combinations of the method for configuring the timeout election time of an open virtual network cluster should also fall within the protection scope of this invention, and the protection scope of this invention should not be limited to the embodiments.

[0048] Based on the above objectives, a second aspect of this invention proposes a system for configuring the timeout election time for an Open Virtual Network (AVN) cluster. For example... Figure 2 As shown, system 200 includes the following modules: a deployment module, configured to deploy Open Virtual Network Services using Kubernetes on each Open Virtual Network node, and set up readiness probes and liveness probes; a checking module, configured to check whether the current Open Virtual Network node is the leader node in the Open Virtual Network cluster in response to the readiness probe detecting that the Open Virtual Network Service has fully started; an acquisition module, configured to acquire the Open Virtual Network cluster election time target value configured in the Open Virtual Network configuration file in response to the current Open Virtual Network node being the leader node in the Open Virtual Network cluster; and an execution module, configured to configure the timeout election time of the Open Virtual Network cluster according to the election time target value.

[0049] In some implementations, the system further includes a status module configured to continuously detect the operational status of the Open Virtual Network Service using a liveness probe.

[0050] In some implementations, the status module is configured to restart the Open Virtual Network Service in response to detecting an abnormal operating status of the Open Virtual Network Service.

[0051] In some implementations, the deployment module is configured to run Open Virtual Network Services in Kubernetes containers using Kubernetes container technology.

[0052] In some implementations, the deployment module is configured to: save the Open Virtual Network Service as a container image for batch deployment.

[0053] In some implementations, the deployment module is configured to: create a container corresponding to the pod in response to the creation of the pod, and configure the pod to manage the Kubernetes container service.

[0054] In some implementations, the deployment module is configured to: set a script to modify the open virtual network cluster timeout election time, and set the script in the readiness probe.

[0055] Based on the above objectives, a third aspect of the present invention provides a computer device comprising: at least one processor; and a memory storing computer instructions executable by the processor to perform the following steps: S1, deploying an Open Virtual Network Service using Kubernetes in each Open Virtual Network node, and setting up readiness probes and liveness probes; S2, in response to the readiness probe detecting that the Open Virtual Network Service has fully started, checking whether the current Open Virtual Network node is the leader node in the Open Virtual Network cluster; S3, in response to the current Open Virtual Network node being the leader node in the Open Virtual Network cluster, obtaining the Open Virtual Network cluster election time target value configured in the Open Virtual Network configuration file; and S4, configuring the timeout election time of the Open Virtual Network cluster according to the election time target value.

[0056] In some implementations, the steps further include: continuously detecting the operational status of the Open Virtual Network Service using a liveness probe.

[0057] In some implementations, the continuous detection of the operating status of the Open Virtual Network Service (AVN) via the liveness probe includes: restarting the AVN in response to detecting an abnormal operating status of the AVN.

[0058] In some implementations, deploying Open Virtual Network Services (AVN) using Kubernetes on each Open Virtual Network node includes running the AVN service in a Kubernetes container using Kubernetes container technology.

[0059] In some implementations, deploying Open Virtual Network Services (AVN) using Kubernetes on each Open Virtual Network node includes saving the AVN as a container image for batch deployment.

[0060] In some implementations, deploying Open Virtual Network Services using Kubernetes on each Open Virtual Network node includes: in response to creating a pod, creating a container corresponding to the pod, and configuring the pod to manage Kubernetes container services.

[0061] In some implementations, setting up the readiness probe and the liveness probe includes: setting a script to modify the open virtual network cluster timeout election time, and setting the script in the readiness probe.

[0062] like Figure 3 The diagram shown is a hardware structure schematic of an embodiment of the computer device configured with the open virtual network cluster timeout election time provided by the present invention.

[0063] For example Figure 3 Taking the device shown as an example, the device includes a processor 301 and a memory 302.

[0064] Processor 301 and memory 302 can be connected via a bus or other means. Figure 3 Taking the example of a connection between China and Israel via a bus.

[0065] The memory 302, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the method for configuring the open virtual network cluster timeout election in this embodiment. The processor 301 executes various server functions and data processing by running the non-volatile software programs, instructions, and modules stored in the memory 302, thereby implementing the method for configuring the open virtual network cluster timeout election.

[0066] Memory 302 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created during use according to a method for configuring the Open Virtual Network Cluster timeout election. Furthermore, memory 302 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 302 may optionally include memory remotely located relative to processor 301, and these remote memories can be connected to the local module via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0067] One or more methods for configuring the open virtual network cluster timeout election time are stored in memory 302. When executed by processor 301, the method for configuring the open virtual network cluster timeout election time in any of the above method embodiments is executed.

[0068] Any embodiment of the computer device that performs the above-described method for configuring the timeout election time of an open virtual network cluster can achieve the same or similar effects as any of the aforementioned method embodiments.

[0069] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs a method for configuring the timeout election time of an Open Virtual Network Cluster.

[0070] like Figure 4The diagram shown is a schematic representation of an embodiment of the computer storage medium configured with the open virtual network cluster timeout election time provided by the present invention. Figure 4 Taking the computer storage medium shown as an example, the computer-readable storage medium 401 stores a computer program 402 that, when executed by a processor, performs the above method.

[0071] Finally, it should be noted that those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program for configuring the open virtual network cluster timeout election time can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The storage medium for the program can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. The above computer program embodiments can achieve the same or similar effects as any of the corresponding foregoing method embodiments.

[0072] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.

[0073] It should be understood that, as used herein, the singular form “a” is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, “and / or” refers to any and all possible combinations of one or more of the associated listed items.

[0074] The embodiment numbers disclosed in the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0075] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0076] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.

Claims

1. A method for configuring the timeout election time of an Open Virtual Network cluster, characterized in that, Includes the following steps: Deploy Open Virtual Network services using Kubernetes on each Open Virtual Network node, and set up readiness probes and liveness probes; In response to the readiness probe detecting that the Open Virtual Network service has been fully started, check whether the current Open Virtual Network node is the leader node in the Open Virtual Network cluster; In response to the current Open Virtual Network node being the leader node within the Open Virtual Network cluster, the target election time value for the Open Virtual Network cluster configured in the Open Virtual Network configuration file is obtained; and Configure the timeout election time of the Open Virtual Network Cluster according to the target election time value, wherein the running status of the Open Virtual Network Service is continuously detected by the liveness probe, and the Open Virtual Network Service is restarted in response to the detection of an abnormal running status of the Open Virtual Network Service.

2. The method for configuring the timeout election time of an open virtual network cluster according to claim 1, characterized in that, The deployment of Open Virtual Network services using Kubernetes on each Open Virtual Network node includes: Use Kubernetes container technology to run open virtual network services in Kubernetes containers.

3. The method for configuring the timeout election time of an open virtual network cluster according to claim 1, characterized in that, The deployment of Open Virtual Network services using Kubernetes on each Open Virtual Network node includes: Save the Open Virtual Network Service as a container image for batch deployment.

4. The method for configuring the timeout election time of an open virtual network cluster according to claim 1, characterized in that, The deployment of Open Virtual Network services using Kubernetes on each Open Virtual Network node includes: In response to the creation of a pod, a container corresponding to the pod is created, and the pod is configured to manage Kubernetes container services.

5. The method for configuring the timeout election time of an open virtual network cluster according to claim 1, characterized in that, The setup of the readiness probe and the liveness probe includes: Configure a script to modify the open virtual network cluster timeout election time, and set the script in the readiness probe.

6. A system for configuring the timeout election time for an Open Virtual Network cluster, characterized in that, include: The deployment module is configured to deploy Open Virtual Network services using Kubernetes on each Open Virtual Network node, and sets up readiness probes and liveness probes. The inspection module is configured to check whether the current Open Virtual Network node is the leader node within the Open Virtual Network cluster in response to the readiness probe detecting that the Open Virtual Network service has been fully started. The acquisition module is configured to respond to the current Open Virtual Network node being the leader node within the Open Virtual Network cluster by acquiring the target value for the Open Virtual Network cluster election time configured in the Open Virtual Network configuration file. as well as The execution module is configured to configure the timeout election time of the open virtual network cluster according to the election time target value. The module continuously detects the running status of the open virtual network service through a liveness probe, and restarts the open virtual network service in response to detecting an abnormal running status of the open virtual network service.

7. A computer device, characterized in that, include: At least one processor; as well as A memory storing computer instructions executable on the processor, which, when executed by the processor, implement the steps of the method according to any one of claims 1-5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Leader electing method, device and equipment

    CN108810046A

  • Deployment method and device for open virtual network

    CN113472575A