A test method, device and equipment of an open virtual network cluster and a medium
By configuring a pressure model logical network and binding ports in the northbound database of the OVN cluster, and monitoring the health information of control nodes and compute nodes, the timeliness and accuracy of data interaction in the OVN cluster are resolved. This enables automatic balanced pressure application of large-scale business data, displays cluster health and performance, and simplifies the location, analysis, and optimization of performance bottlenecks.
Patent Information
- Application Number
- CN202410545965.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-04-30
AI Technical Summary
In large-scale OVN clusters, the timeliness and accuracy of data interaction between OVN components and between the cloud platform and OVN are easily affected, leading to abnormal situations such as processing delays, cluster leader oscillations, data backlogs, and data synchronization timeouts, making it difficult to effectively detect cluster performance and stability.
By configuring a stress model logical network in the northbound database of the OVN cluster and binding the ports to the compute nodes, the health information of the control nodes and compute nodes is monitored, including the cluster status, master-slave status of the control nodes, memory consumption and CPU consumption, etc. The reconnection success time and reconnection count of the compute nodes are obtained, and visualization charts are generated to display the cluster health and performance.
It enables automatic load balancing of large-scale business data, displays the health, performance, and stability of the OVN cluster, facilitates the location, analysis, and optimization of performance bottlenecks, and saves manpower costs for development and testing.
Smart Images

Figure CN118433061B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud computing technology, and in particular to a testing method, apparatus, equipment, and medium for an open virtual network cluster. Background Technology
[0002] OVN (Open Virtual Network) is a component of Open vSwitch (OVS), providing many native virtual networking functionalities. OVN offers excellent compatibility with Open vSwitch and OpenStack (a cloud computing software) and significantly simplifies the implementation of Neutron (the component responsible for providing network services), improving network performance. OVN can support environments with over 1000 physical machines, and building network models based on OVN is a common solution for cloud computing network virtualization.
[0003] Currently, OVN components in an OVN cluster work collaboratively and interact with the cloud management platform via APIs (Application Programming Interfaces). The cloud management database and the OVN database also need to maintain data synchronization. During large-scale production, due to the massive scale of compute nodes and the surge in data volume, the timeliness and accuracy of data interaction between OVN components and between the cloud platform and OVN are highly susceptible to disruptions, leading to processing delays, cluster leader (master node) oscillations, data backlogs, and data synchronization timeouts. Therefore, how to conduct large-scale testing of the OVN cluster to detect its performance and stability, facilitating subsequent analysis and optimization of performance bottlenecks, is a pressing issue that needs to be addressed. Summary of the Invention
[0004] The purpose of this invention is to provide a testing method, apparatus, device, and computer-readable storage medium for Open Virtual Network (OVN) clusters, so as to detect the performance and stability of the cluster through testing, and facilitate subsequent analysis and optimization of performance bottlenecks.
[0005] To address the aforementioned technical problems, this invention provides a testing method for an open virtual network cluster, comprising:
[0006] Configure a stress model logical network in the northbound database of the open virtual network cluster, and bind the ports in the stress model logical network to the computing nodes in the open virtual network cluster to complete the stress configuration of the open virtual network cluster; wherein, the stress model logical network includes ports corresponding to each project, and the number of ports bound to each computing node is within a preset range.
[0007] During the pressurization configuration process, the control nodes in the open virtual network cluster are monitored to obtain cluster health information; wherein, the cluster health information includes at least one of the following: cluster status, control node master-slave status, cluster memory consumption information, and cluster CPU consumption information;
[0008] During the pressurization configuration process, each computing node is monitored to obtain the computing node monitoring information corresponding to the computing node; wherein, the computing node monitoring information includes at least one of the following for each computing node: the last successful reconnection time, the number of reconnections, the number of drops, the number of timeouts, the overall reconnection success time and the reconnection success rate of all computing nodes.
[0009] On the other hand, the stress model logic network includes a first number of items, a second number of routes corresponding to each item, a third number of networks and subnets corresponding to each route, and a fourth number of ports corresponding to each subnet; the number of ports in the stress model logic network = the first number * the second number * the third number * the fourth number.
[0010] On the other hand, binding the ports in the stress model logical network to the computing nodes in the open virtual network cluster includes:
[0011] Obtain the list of unbound ports and the host codes of all the compute nodes; wherein, the list of unbound ports includes the identification information of all ports in the stress model logical network;
[0012] Based on the unbound port list and the host code, the ports in the unbound port list are bound to the compute nodes; wherein each compute node is bound to a preset number of ports in the unbound port list, the preset number being the quotient of the number of ports and the number of compute nodes in the open virtual network cluster.
[0013] On the other hand, configuring the stress model logical network in the northbound database of the open virtual network cluster includes:
[0014] Obtain a pressure test command; wherein the pressure test command includes the first quantity and pressure model resource ratio information, the pressure model resource ratio information is 1:i:j:k; i is the quotient of the second quantity and the first quantity, j is the quotient of the third quantity and the second quantity, and k is the quotient of the fourth quantity and the third quantity;
[0015] Create the first number of projects according to the pressure test instructions;
[0016] Determine if the number of routes under the current project has reached i; where the current project is any one of the projects in the first number of projects.
[0017] If i is reached, then the port corresponding to the current project has been created.
[0018] If the number of networks under the newly created route is not reached (i), then create one route and check if the number of networks under the newly created route is j.
[0019] If j is reached, then execute the step of determining whether the number of routes under the current project has reached i;
[0020] If j is not reached, create one network under the newly created route, and then create one subnet under the newly created network;
[0021] Determine if the number of ports in the newly created subnet has reached k.
[0022] If k is reached, then the step of determining whether the number of networks under the newly created route is j is executed;
[0023] If k is not reached, create one port under the newly created subnet and execute the step of determining whether the number of ports under the newly created subnet reaches k.
[0024] On the other hand, the method also includes:
[0025] During the pressure configuration process, the configuration monitoring information and binding monitoring information of the pressure model logical network are acquired. The configuration monitoring information includes at least one of the following: configuration time and success rate of each type of pre-embedded resource and error log. The pre-embedded resources include projects, routes, networks, subnets, and ports in the pressure model logical network. The binding monitoring information includes the binding results of each port in the pressure model logical network with its corresponding computing node and / or the activation time of each port.
[0026] On the other hand, the cluster health information includes the cluster status, control node master-slave status, cluster memory consumption information, and cluster CPU consumption information monitored at preset time intervals. After monitoring the control nodes in the open virtual network cluster and obtaining the cluster health information, the process further includes:
[0027] Based on the cluster memory consumption information and cluster CPU consumption information, generate memory visualization charts and CPU visualization charts by time dimension; and / or
[0028] Based on the cluster status and the master-slave status of the control node, the master-slave switching time and switching interval of the open virtual network cluster are obtained.
[0029] On the other hand, monitoring each of the computing nodes and obtaining the computing node monitoring information corresponding to the computing node includes:
[0030] The test equipment will send the acquisition script to each of the aforementioned computing nodes;
[0031] Receive log files returned by each of the computing nodes when executing the acquisition script; wherein, the log files are log files corresponding to the controller connection data collected during the pressurization configuration process;
[0032] After the pressure configuration is completed, the monitoring information of the computing nodes is analyzed and obtained based on the log file, using the node name of each computing node as the key.
[0033] The present invention also provides a testing device for an open virtual network cluster, comprising:
[0034] The pressure module is used to configure a pressure model logical network in the northbound database of the open virtual network cluster, and bind the ports in the pressure model logical network to the computing nodes in the open virtual network cluster to complete the pressure configuration of the open virtual network cluster; wherein, the pressure model logical network includes ports corresponding to each project, and the number of ports bound to each computing node is within a preset range.
[0035] The cluster monitoring module is used to monitor the control nodes in the open virtual network cluster and obtain cluster health information during the pressure configuration process; wherein, the cluster health information includes at least one of the following: cluster status, control node master-slave status, cluster memory consumption information, and cluster CPU consumption information.
[0036] The data acquisition and analysis module is used to monitor each computing node during the pressurization configuration process and obtain the computing node monitoring information corresponding to the computing node; wherein, the computing node monitoring information includes at least one of the following for each computing node: the last successful reconnection time, the number of reconnections, the number of drops, the number of timeouts, and the overall successful reconnection time and reconnection success rate of all computing nodes.
[0037] This invention also provides a testing device for an open virtual network cluster, comprising:
[0038] Memory, used to store computer programs;
[0039] A processor, used to execute the computer program to implement the steps of the test method for the open virtual network cluster as described above.
[0040] Furthermore, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the test method for the open virtual network cluster described above.
[0041] The present invention provides a testing method for an open virtual network cluster, comprising: configuring a stress model logical network in the northbound database of the open virtual network cluster, and binding the ports in the stress model logical network to the compute nodes in the open virtual network cluster to complete the stress configuration of the open virtual network cluster; wherein, the stress model logical network includes ports corresponding to each project, and the number of ports bound to each compute node is within a preset range; during the stress configuration process, monitoring the control node in the open virtual network cluster to obtain cluster health information; wherein, the cluster health information includes at least one of the following: cluster status, master-slave status of control nodes, cluster memory consumption information, and cluster CPU consumption information; during the stress configuration process, monitoring each compute node to obtain the compute node monitoring information corresponding to the compute node; wherein, the compute node monitoring information includes at least one of the following: the last successful reconnection time, the number of reconnections, the number of drops, the number of timeouts, and the overall successful reconnection time and reconnection success rate of all compute nodes for each compute node;
[0042] As can be seen, this invention, by configuring a stress model logical network in the northbound database of an Open Virtual Network (OVN) cluster and binding the ports in the stress model logical network to the compute nodes in the OVN cluster, can achieve automatic load balancing for large-scale business data. By monitoring the control nodes and compute nodes in the OVN cluster, the health, performance, and stability of the large-scale OVN cluster under the pressure of large-scale business data can be displayed, facilitating subsequent analysis and optimization of performance bottlenecks and saving development and testing manpower costs. Furthermore, this invention also provides a testing device, equipment, and computer-readable storage medium for an OVN cluster, which also possesses the aforementioned beneficial effects. Attached Figure Description
[0043] 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 embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0044] Figure 1 A flowchart illustrating a testing method for an open virtual network cluster provided in an embodiment of the present invention;
[0045] Figure 2This is a schematic diagram of the framework of a test system for an open virtual network cluster provided in an embodiment of the present invention;
[0046] Figure 3 This is a schematic diagram of the interface pressure application process for another open virtual network cluster testing method provided in an embodiment of the present invention;
[0047] Figure 4 This is a schematic diagram of the computing node monitoring of another open virtual network cluster testing method provided in an embodiment of the present invention;
[0048] Figure 5 This is a structural block diagram of a test device for an open virtual network cluster provided in an embodiment of the present invention;
[0049] Figure 6 This is a simplified structural diagram of a test device for an open virtual network cluster provided in an embodiment of the present invention;
[0050] Figure 7 This is a schematic diagram of the specific structure of a test device for an open virtual network cluster provided in an embodiment of the present invention. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a testing method for an open virtual network cluster provided in an embodiment of the present invention. The method may include:
[0053] Step 101: Configure the stress model logical network in the northbound database of the Open Virtual Network Cluster, and bind the ports in the stress model logical network to the compute nodes in the Open Virtual Network Cluster to complete the stress configuration of the Open Virtual Network Cluster.
[0054] The stress model logic network includes ports corresponding to each project, and the number of ports bound to each computing node is within a preset range.
[0055] It should be noted that the Open Virtual Network (OVN) cluster in this embodiment can be a cluster that needs to be tested. The specific cluster size of the OVN cluster in this embodiment can be set by the designer or user according to the practical scenario and user needs. For example, the number of control nodes in the OVN cluster can be 3, meaning the OVN cluster can be a three-controller cluster; the number of control nodes in the OVN cluster can also be other values, such as 1 or 5, meaning the OVN cluster can also be a single-controller cluster or a five-controller cluster. The number of compute nodes in the OVN cluster (i.e., the number of compute nodes) can be greater than or equal to the preset number of compute nodes (e.g., 100 or 1000) to perform stress testing on large-scale OVN clusters, such as... Figure 2 As shown, an OVN cluster can be configured with controllers (ovn-control 001-1000) and 1000 virtual machines (vm 1-x), meaning the number of compute nodes in an OVN cluster can be 1000. In this embodiment, all compute nodes in the OVN cluster can be virtual machine nodes in one or more electronic devices (such as servers), and all compute nodes in the OVN cluster can be located on the same server. This embodiment does not impose any restrictions on this.
[0056] Correspondingly, this embodiment may also include the OVN cluster creation process. For example, the processor of the test device can obtain compute node configuration instructions; according to the number of compute nodes in the compute node configuration instructions, the test device creates compute nodes in the number of compute nodes on the server where the OVN cluster is located to facilitate subsequent testing. In other words, in this embodiment, the test device can not only directly test the created OVN cluster, but also automatically create the OVN cluster that needs to be tested, so that users can conveniently configure OVN clusters of different sizes according to their own needs.
[0057] Accordingly, the testing method for the Open Virtual Network Cluster (OVN) provided in this embodiment can be applied to a testing device. That is, the processor in the testing device can execute the steps of the method provided in this embodiment to perform stress testing on the OVN cluster. The testing device can be a device other than the electronic device (such as a server) where the OVN cluster resides; that is, the testing device can communicate with the OVN cluster. For example, the testing device can be on the same network segment as all the computing nodes of the OVN cluster and be able to communicate with each other. The testing device can also be the electronic device where the OVN cluster resides; that is, the testing device can perform stress testing on its own configured OVN cluster. This embodiment does not impose any limitations on this.
[0058] Understandably, in this step, the test equipment can automatically pressurize the OVN cluster by configuring the pressure model logic network and binding the ports in the pressure model logic network to the computing nodes; and ensure that the number of ports bound to each computing node is within a preset range, so as to balance the pre-embedded pressure distribution.
[0059] In this embodiment, the stress model logical network can be the logical network configured for testing by the test device in the Northbound DB of the OVN cluster. The specific network structure of the stress model logical network in this embodiment can be set by the designer. For example, to facilitate the configuration of the stress model logical network, it can include a first number of projects, a second number of routes corresponding to each project, a third number of networks and subnets corresponding to each route, and a fourth number of ports corresponding to each subnet. This further simplifies the configuration by creating only one subnet under each network of the route. That is, the number of ports in the stress model logical network = first number * second number * third number * fourth number. Alternatively, the stress model logical network can include a first number of projects, a second number of routes corresponding to each project, a third number of networks corresponding to each route, a fifth number of subnets corresponding to each route, and a fourth number of ports corresponding to each subnet. That is, the number of ports in the stress model logical network = first number * second number * third number * fourth number * fifth number. This embodiment does not impose any limitations on this.
[0060] Accordingly, in this embodiment, the number of ports in the stress model logic network can be greater than or equal to the preset number of ports (e.g., 10,000), or the ratio of the number of ports to the number of computing nodes can be greater than a threshold (e.g., 10), so as to perform large-scale business data stress tests on the OVN cluster.
[0061] Correspondingly, the specific method for configuring the stress model logical network in the northbound database of the Open Virtual Network Cluster (OVN) in this step can be set by the designer according to the practical scenario and user needs. For example, the processor can configure the stress model logical network in the northbound database of the OVN cluster through the cloud management platform of the OVN cluster. To facilitate the configuration of the stress model logical network, the test device can configure the stress model logical network in the northbound database of the OVN cluster through the cloud management platform of the OVN cluster, based on the number of projects (i.e., the first number) and the stress model resource ratio information of the OVN cluster to be configured. Among them, the stress model resource ratio information can include the number of routes, networks, subnets and ports corresponding to each project. For example, if the number of ports in the stress model logical network = the first number * the second number * the third number * the fourth number, the stress model resource ratio information can be as follows: Figure 3The expression 1:i:j:k shows that i is the quotient of the second quantity and the first quantity, j is the quotient of the third quantity and the second quantity, and k is the quotient of the fourth quantity and the third quantity.
[0062] like Figure 3 As shown, the processor sets up an interface stress-boosting script based on the acquired resource proportion information of the stress model. Specifically, it creates *i* routes under each project, *j* networks and subnets under each route, and *k* ports under each subnet. This ensures a balanced distribution of pre-installed stress, reducing the impact of uneven stress on test results. The processor concurrently executes the interface stress-boosting script, creating *n* (the initial number) projects concurrently. Each project pre-installs resources according to the resource proportion information of the stress model, significantly improving efficiency even with a large number of ports (e.g., 20,000).
[0063] For example, in this step, the processor can obtain a stress test command; the stress test command includes a first quantity and stress model resource ratio information, the stress model resource ratio information is 1:i:j:k; i is the quotient of the second quantity and the first quantity, j is the quotient of the third quantity and the second quantity, and k is the quotient of the fourth quantity and the third quantity; according to the stress test command, the first quantity of projects is created; it is determined whether the number of routes under the current project has reached i; where the current project is any one of the projects in the first quantity; if i is reached, it is determined that the port corresponding to the current project has been created, and the creation of the current project can be terminated. Establish the process; if the number of routes is less than i, create one route and check if the number of networks under the newly created route is j; if the number of networks is j, proceed to check if the number of routes under the current project is i; if the number of networks is less than j, create one network under the newly created route and one subnet under the newly created network; check if the number of ports under the newly created subnet is k; if the number of ports is k, proceed to check if the number of networks under the newly created route is j; if the number of ports is less than k, create one port under the newly created subnet and proceed to check if the number of ports under the newly created subnet is k.
[0064] Correspondingly, when it is necessary to adjust the logic network of the stress model for gradient stress testing, only the number of projects (n) and the resource allocation information of the stress model need to be adjusted. For example... Figure 2 As shown, in this embodiment, a preset number of pressure models (m) can be set in advance. The number of projects and / or the resource ratio of pressure models are different for different pressure models, so that the test equipment can use the preset number of pressure models to perform pressure tests on the OVN cluster in turn, thereby realizing the gradient pressure test of the OVN cluster.
[0065] The specific method for binding ports in the stress model logical network to compute nodes in the Open Virtual Network Cluster (AVN) in this step can be configured by the designer according to the usage scenario and user requirements. For example, the processor can obtain a list of unbound ports and the host codes of all compute nodes. The list of unbound ports includes the identification information of all ports in the stress model logical network. Based on the list of unbound ports and the host codes, the ports in the list of unbound ports are bound to compute nodes. Each compute node is bound to a preset number of ports in the list of unbound ports. When the number of ports in the stress model logical network is an integer multiple of the number of compute nodes, the preset number can be the quotient of the number of ports and the number of compute nodes in the AVN cluster, that is, the number of ports bound to each compute node can be the preset number. For example, after the interface stress-boosting script is executed, the processor can trigger the execution of the controller stress-boosting script, obtain the list of unbound ports (i.e., the unbound port list) through the underlying OpenStack commands, and obtain the host codes (host_id) of all compute nodes. The controllers (ovn-control) of the compute nodes are bound to the ports according to a preset ratio of 1:h (h = number of ports / number of compute nodes), so that each compute node is bound to h ports. like Figure 2 As shown, when 1000 compute nodes are set up in an OVN cluster, the execution of the controller pressure script can bind the 20,000 ports pre-embedded in the interface pressure script to the controller (ovn-control 1-1000) of the compute nodes, so that each compute node is bound to 20 ports.
[0066] Correspondingly, the specific method for binding ports in the unbound port list to compute nodes based on the unbound port list and host code can be set by the designer. For example, the processor can directly bind the ports in the unbound port list to each compute node sequentially, so that each compute node is bound to a preset number of ports. The processor can also bind according to certain rules to better suit the actual use of the OVN cluster and improve test accuracy; for example, the processor can bind the ports in the unbound port list to each compute node based on the project information corresponding to each port in the unbound port list, so that ports corresponding to the same project can be bound to the same compute node as much as possible. For example, the difference between the number of projects corresponding to any two compute nodes can be less than 1 (or 2). This embodiment does not impose any restrictions on this.
[0067] Step 102: During the pressure configuration process, monitor the control node in the open virtual network cluster and obtain cluster health information; wherein, the cluster health information includes at least one of the following: cluster status, master-slave status of control node, cluster memory consumption information, and cluster CPU consumption information.
[0068] It is understandable that the control node (such as the master node) in the OVN cluster... Figure 2 The ovn-sb (southbound database) in ovn-nb / sb-db (1-5) can include ovn-northd (OVN's northbound component, used to monitor changes in the northbound database), neutron-server (neutron service), and ovn-controller (OVN's controller). ovn-sb actively sends heartbeat messages to connected clients. During the process of pre-burying large-scale business data and binding a large number of compute nodes, the large volume of business data can lead to client delays and abnormal situations such as repeated client reconnections to ovn-sb and frequent master switching due to excessive pressure on ovn-sb. In this step, the processor can monitor the control nodes to obtain cluster health information such as cluster status, master-slave status of the control nodes (i.e., leader switching), cluster memory consumption, and cluster CPU (central processing unit) consumption.
[0069] Correspondingly, the specific content of the cluster health information in this step can be set by the designer. For example, the cluster health information includes the cluster status, the master-slave status of the control nodes, the cluster memory consumption information, and the cluster CPU consumption information. For instance, during the stress configuration process, the processor can monitor the control nodes in the open virtual network cluster at preset time intervals to obtain the cluster health information. That is, the cluster health information includes the cluster status, the master-slave status of the control nodes, the cluster memory consumption information, and the cluster CPU consumption information obtained by monitoring at preset time intervals.
[0070] Accordingly, to further facilitate user viewing, in this embodiment, after obtaining cluster health information, the processor can also generate memory visualization charts and CPU visualization charts by time dimension based on cluster memory consumption information and cluster CPU consumption information; and / or obtain the master-slave switching time and switching interval of the open virtual network cluster based on the cluster status and the master-slave status of the control nodes. Figure 2 As shown, the processor can use the cluster monitoring module to obtain the cluster status, the service role (master-slave status) of each node in the cluster, and the cluster memory and CPU consumption every 3 seconds and write them to the log. After the pressure configuration is completed, the log is analyzed, and a visualization chart of CPU and memory is generated according to the time dimension. The cluster leader switching time and switching interval are also obtained. Through accurate time recording and visualization chart display, the workload of development analysis is reduced and the testing efficiency is improved.
[0071] Step 103: During the pressure configuration process, monitor each computing node and obtain the corresponding computing node monitoring information; wherein, the computing node monitoring information includes at least one of the following for each computing node: the last successful reconnection time, the number of reconnections, the number of drops, the number of timeouts, the overall reconnection success time and the reconnection success rate of all computing nodes.
[0072] Understandably, in this step, the processor can monitor each compute node in the OVN cluster to obtain the status of each compute node during the stress-compression configuration process. The specific method by which the processor monitors each compute node and obtains its corresponding compute node monitoring information can be configured by the designers. For example, the test device can monitor the compute nodes by sending collection scripts to them. For instance, in this step, the test device can send collection scripts to each compute node and receive the log files returned by each compute node when executing the collection scripts. These log files are the log files corresponding to the controller connection data collected during the stress-compression configuration process. After the stress-compression configuration is completed, the processor can analyze and obtain the compute node monitoring information based on the log files, using the node name as the key.
[0073] Correspondingly, this embodiment does not limit the specific content of the computing node monitoring information. For example, the computing node monitoring information may include the last successful reconnection time, number of reconnections, number of drops, number of timeouts, and the overall reconnection success time and reconnection success rate of all computing nodes for each computing node. This allows for accurate acquisition of the health of the computing node controller under large-scale pressure from multiple dimensions, clearly demonstrating the performance and stability of the OVN cluster.
[0074] like Figure 4 As shown, the test equipment can use the acquisition and analysis module to complete the acquisition and analysis of monitoring data. The acquisition process can send the acquisition script to all compute nodes in the OVN cluster. After the acquisition script is sent to the compute nodes, it will be executed automatically on the compute nodes, collecting all controller connection data during the pressure configuration period, performing preliminary filtering on this data, classifying the data and converting it into a standard format for storage in log files, and sending the log files back to the test equipment after the pressure configuration is completed. After all the compute node acquisition scripts have been executed, the test equipment can store the log files of all compute nodes in a preset directory according to the compute node directory classification.
[0075] Correspondingly, the monitoring data analysis process can perform statistical analysis on the log files of all compute nodes in the preset directory. Using the name of the compute node as the key, the analysis can obtain the last successful reconnection time, number of reconnections, number of timeouts, number of timeouts, and the overall reconnection success time of the controller (ovn-control) in each compute node (such as the difference between the maximum last successful reconnection time and the execution start time of the controller pressure script) and reconnection success rate. By using this compute node monitoring information, the performance and stability of the OVN cluster can be clearly displayed.
[0076] Furthermore, the method provided in this embodiment may also include monitoring the acquisition of configuration monitoring information and binding monitoring information of the pressure model logical network during the pressure configuration process, so as to monitor the status of pre-embedded resources during the pressure configuration process. The configuration monitoring information includes at least one of the following: configuration time and success rate of each type of pre-embedded resource, and error logs. Pre-embedded resources include projects, routes, networks, subnets, and ports in the pressure model logical network. The binding monitoring information includes the binding results of each port in the pressure model logical network with its corresponding computing node and / or the activation time of each port.
[0077] like Figure 2 As shown, the processor can trigger the operation of the business monitoring module after running the pressure module. The business monitoring module can monitor the configuration time of various pre-embedded resources and the success rate of pre-embedded resource execution during the execution of the interface pressure script, and record detailed error logs. During the execution of the controller pressure script, the binding results of the port and the controller (ovn-control) of the computing node are monitored, and the time when the port status of each port changes from DOWN to UP (i.e., the activation time) is detected and recorded, which facilitates subsequent large-scale optimization.
[0078] In this embodiment, the present invention configures a stress model logical network in the northbound database of the Open Virtual Network Cluster and binds the ports in the stress model logical network to the computing nodes in the Open Virtual Network Cluster. This enables automatic load balancing of large-scale business data. By monitoring the control nodes and computing nodes in the OVN cluster, the health, performance, and stability of the large-scale OVN cluster under the pressure of large-scale business data can be displayed, facilitating subsequent analysis and optimization of performance bottlenecks and saving development and testing manpower costs.
[0079] Corresponding to the above method embodiments, this invention also provides a testing device for an open virtual network cluster. The testing device for an open virtual network cluster described below and the testing method for an open virtual network cluster described above can be referred to each other.
[0080] Please refer to Figure 5 , Figure 5 This is a structural block diagram of a testing device for an open virtual network cluster provided in an embodiment of the present invention. The device may include:
[0081] The pressure module 10 is used to configure the pressure model logical network in the northbound database of the open virtual network cluster and bind the ports in the pressure model logical network to the computing nodes in the open virtual network cluster to complete the pressure configuration of the open virtual network cluster; wherein, the pressure model logical network includes the ports corresponding to each project, and the number of ports bound to each computing node is within a preset range.
[0082] The cluster monitoring module 20 is used to monitor the control nodes in the open virtual network cluster and obtain cluster health information during the pressure configuration process; wherein, the cluster health information includes at least one of the following: cluster status, master-slave status of control nodes, cluster memory consumption information, and cluster CPU consumption information.
[0083] The data acquisition and analysis module 30 is used to monitor each computing node during the pressure configuration process and obtain the computing node monitoring information corresponding to the computing node. The computing node monitoring information includes at least one of the following for each computing node: the last successful reconnection time, the number of reconnections, the number of drops, the number of timeouts, the overall reconnection success time and the reconnection success rate of all computing nodes.
[0084] In some embodiments, the stress model logical network may include a first number of items, a second number of routes corresponding to each item, a third number of networks and subnets corresponding to each route, and a fourth number of ports corresponding to each subnet; the number of ports in the stress model logical network = the first number * the second number * the third number * the fourth number.
[0085] On the other hand, the pressurization module 10 may include:
[0086] The acquisition submodule is used to obtain the list of unbound ports and the host codes of all compute nodes; the list of unbound ports includes the identification information of all ports in the stress model logical network;
[0087] The binding submodule is used to bind ports in the unbound port list to compute nodes based on the unbound port list and host code; each compute node is bound to a preset number of ports in the unbound port list, the preset number being the quotient of the number of ports and the number of compute nodes in the open virtual network cluster.
[0088] On the other hand, the pressurization module 10 may include:
[0089] The instruction acquisition submodule is used to acquire the pressure test instruction; wherein, the pressure test instruction includes a first quantity and pressure model resource ratio information, the pressure model resource ratio information is 1:i:j:k; i is the quotient of the second quantity and the first quantity, j is the quotient of the third quantity and the second quantity, k is the quotient of the fourth quantity and the third quantity;
[0090] The first creation submodule is used to create a first number of projects according to the pressure test instructions;
[0091] The first judgment submodule is used to determine whether the number of routes under the current project has reached i; where the current project is any one of the projects in the first number of projects;
[0092] The submodule is defined to determine that if i is reached, the port corresponding to the current project has been created.
[0093] The second creation submodule is used to create one route if route i is not reached.
[0094] The third judgment submodule is used to determine whether the number of networks under the newly created route is j; if it reaches j, it sends a start signal to the first judgment submodule.
[0095] The fourth creation submodule is used to create a network under the newly created route and a subnet under the newly created network if j is not reached.
[0096] The fourth judgment submodule is used to determine whether the number of ports under the newly created subnet has reached k; if it has reached k, a start signal is sent to the third judgment submodule.
[0097] The fifth creation submodule is used to create one port under the newly created subnet if k is not reached, and send a start signal to the fourth judgment submodule.
[0098] On the other hand, the device may also include:
[0099] The business monitoring module is used to monitor and acquire configuration monitoring information and binding monitoring information of the pressure model logical network during the pressure configuration process. The configuration monitoring information includes at least one item from the configuration time and success rate of each type of pre-embedded resource and the error log. The pre-embedded resources include projects, routes, networks, subnets and ports in the pressure model logical network. The binding monitoring information includes the binding results of each port in the pressure model logical network with its corresponding computing node and / or the activation time of each port.
[0100] On the other hand, the cluster health information includes the cluster status, master-slave status of the control nodes, cluster memory consumption information, and cluster CPU consumption information obtained by monitoring at preset time intervals. The cluster monitoring module 20 can also be used to monitor the control nodes in the open virtual network cluster, obtain the cluster health information, and then generate memory visualization charts and CPU visualization charts in the time dimension based on the cluster memory consumption information and cluster CPU consumption information; and / or obtain the master-slave switching time and switching interval of the open virtual network cluster based on the cluster status and the master-slave status of the control nodes.
[0101] On the other hand, the acquisition and analysis module 30 may include:
[0102] The sending submodule is used to send the acquisition script to each computing node;
[0103] The receiving submodule is used to receive the log files returned by each computing node when executing the acquisition script; the log files are the log files corresponding to the controller connection data collected during the pressure configuration process;
[0104] The analysis submodule is used to analyze and obtain the monitoring information of the compute nodes based on the log files after the pressure configuration is completed, using the node name of each compute node as the key.
[0105] In this embodiment, the present invention configures a pressure model logical network in the northbound database of the Open Virtual Network Cluster (OVN) through the pressure module 10, and binds the ports in the pressure model logical network to the computing nodes in the OVN cluster. This enables automatic balanced pressure application for large-scale business data. By monitoring the control nodes and computing nodes in the OVN cluster, the health, performance, and stability of the large-scale OVN cluster under the pressure of large-scale business data can be displayed, facilitating subsequent analysis and optimization of performance bottlenecks and saving development and testing manpower costs.
[0106] Corresponding to the above method embodiments, this invention also provides a test device for an open virtual network cluster. The test device for an open virtual network cluster described below and the test method for an open virtual network cluster described above can be referred to each other.
[0107] Please refer to Figure 6 , Figure 6 This is a simplified structural diagram of a test device for an open virtual network cluster provided in an embodiment of the present invention. The device may include:
[0108] Memory D1 is used to store computer programs;
[0109] Processor D2 is used to execute computer programs to implement the steps of the test method for the open virtual network cluster provided in the above method embodiments.
[0110] Accordingly, please refer to Figure 7 , Figure 7 This is a schematic diagram illustrating the specific structure of a test device for an open virtual network cluster provided in an embodiment of the present invention. The test device 310 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 322 (e.g., one or more processors) and a memory 332, and one or more storage media 330 (e.g., one or more mass storage devices) for storing application programs 342 or data 344. The memory 332 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more units (not shown in the diagram), each unit may include a series of instruction operations on the host. Furthermore, the central processing unit 322 may be configured to communicate with the storage media 330 and execute the series of instruction operations in the storage media 330 on the test device 310.
[0111] The test device 310 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input / output interfaces 358, and / or one or more operating systems 341, such as Linux systems.
[0112] The steps in the testing method for open virtual network clusters described above can be implemented by the structure of the testing equipment for open virtual network clusters.
[0113] Corresponding to the above method embodiments, this invention also provides a computer program product. The computer program product described below and the test method for an open virtual network cluster described above can be referred to each other.
[0114] A computer program product includes a computer program / instructions that, when executed by a processor, implement the steps of the test method for the open virtual network cluster provided in the above-described method embodiments.
[0115] Corresponding to the above method embodiments, this invention also provides a computer-readable storage medium. The computer-readable storage medium described below and the test method for an open virtual network cluster described above can be referred to and correspond to each other.
[0116] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the test method for the open virtual network cluster described in the above method embodiments.
[0117] The computer-readable storage medium can specifically be a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or any other readable storage medium capable of storing program code.
[0118] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatuses, devices, computer program products, and computer-readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant details can be found in the method section.
[0119] The foregoing has provided a detailed description of the testing method, apparatus, device, and computer-readable storage medium for an open virtual network cluster provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the present invention.
Claims
1. A testing method for an open virtual network cluster, characterized in that, include: Configure a stress model logical network in the northbound database of the open virtual network cluster, and bind the ports in the stress model logical network to the computing nodes in the open virtual network cluster to complete the stress configuration of the open virtual network cluster; wherein, the stress model logical network includes ports corresponding to each project, and the number of ports bound to each computing node is within a preset range. During the pressurization configuration process, the control nodes in the open virtual network cluster are monitored to obtain cluster health information; wherein, the cluster health information includes at least one of the following: cluster status, control node master-slave status, cluster memory consumption information, and cluster CPU consumption information; During the pressurization configuration process, each computing node is monitored to obtain the computing node monitoring information corresponding to the computing node; wherein, the computing node monitoring information includes at least one of the following for each computing node: the last successful reconnection time, the number of reconnections, the number of drops, the number of timeouts, the overall reconnection success time and the reconnection success rate of all computing nodes.
2. The testing method for an open virtual network cluster according to claim 1, characterized in that, The stress model logical network includes a first number of projects, a second number of routes corresponding to each project, a third number of networks and subnets corresponding to each route, and a fourth number of ports corresponding to each subnet; the number of ports in the stress model logical network = the first number * the second number * the third number * the fourth number.
3. The testing method for an open virtual network cluster according to claim 2, characterized in that, The step of binding the ports in the stress model logical network to the computing nodes in the open virtual network cluster includes: Obtain the list of unbound ports and the host codes of all the compute nodes; wherein, the list of unbound ports includes the identification information of all ports in the stress model logical network; Based on the unbound port list and the host code, the ports in the unbound port list are bound to the compute nodes; wherein each compute node is bound to a preset number of ports in the unbound port list, the preset number being the quotient of the number of ports and the number of compute nodes in the open virtual network cluster.
4. The testing method for an open virtual network cluster according to claim 2, characterized in that, The configuration of the stress model logical network in the northbound database of the open virtual network cluster includes: Obtain a pressure test command; wherein the pressure test command includes the first quantity and pressure model resource ratio information, the pressure model resource ratio information is 1:i:j:k; i is the quotient of the second quantity and the first quantity, j is the quotient of the third quantity and the second quantity, and k is the quotient of the fourth quantity and the third quantity; Create the first number of projects according to the pressure test instructions; Determine if the number of routes under the current project has reached i; where the current project is any one of the projects in the first number of projects. If i is reached, then the port corresponding to the current project has been created. If the number of networks under the newly created route is not reached (i), then create one route and check if the number of networks under the newly created route is j. If j is reached, then execute the step of determining whether the number of routes under the current project has reached i; If j is not reached, create one network under the newly created route, and then create one subnet under the newly created network; Determine if the number of ports in the newly created subnet has reached k. If k is reached, then the step of determining whether the number of networks under the newly created route is j is executed; If k is not reached, create one port under the newly created subnet and execute the step of determining whether the number of ports under the newly created subnet reaches k.
5. The testing method for an open virtual network cluster according to claim 1, characterized in that, Also includes: During the pressure configuration process, the configuration monitoring information and binding monitoring information of the pressure model logical network are acquired. The configuration monitoring information includes at least one of the following: configuration time and success rate of each type of pre-embedded resource and error log. The pre-embedded resources include projects, routes, networks, subnets, and ports in the pressure model logical network. The binding monitoring information includes the binding results of each port in the pressure model logical network with its corresponding computing node and / or the activation time of each port.
6. The testing method for an open virtual network cluster according to claim 1, characterized in that, The cluster health information includes cluster status, control node master-slave status, cluster memory consumption information, and cluster CPU consumption information monitored at preset time intervals. After monitoring the control nodes in the open virtual network cluster to obtain the cluster health information, the process further includes: Based on the cluster memory consumption information and cluster CPU consumption information, generate memory visualization charts and CPU visualization charts by time dimension; and / or Based on the cluster status and the master-slave status of the control node, the master-slave switching time and switching interval of the open virtual network cluster are obtained.
7. The testing method for an open virtual network cluster according to any one of claims 1 to 6, characterized in that, The monitoring of each computing node, and the acquisition of computing node monitoring information corresponding to the computing node, including: The test equipment will send the acquisition script to each of the aforementioned computing nodes; Receive log files returned by each of the computing nodes when executing the acquisition script; wherein, the log files are log files corresponding to the controller connection data collected during the pressurization configuration process; After the pressure configuration is completed, the monitoring information of the computing nodes is analyzed and obtained based on the log file, using the node name of each computing node as the key.
8. A testing device for an open virtual network cluster, characterized in that, include: The pressure module is used to configure a pressure model logical network in the northbound database of the open virtual network cluster, and bind the ports in the pressure model logical network to the computing nodes in the open virtual network cluster to complete the pressure configuration of the open virtual network cluster; wherein, the pressure model logical network includes ports corresponding to each project, and the number of ports bound to each computing node is within a preset range. The cluster monitoring module is used to monitor the control nodes in the open virtual network cluster and obtain cluster health information during the pressure configuration process; wherein, the cluster health information includes at least one of the following: cluster status, control node master-slave status, cluster memory consumption information, and cluster CPU consumption information. The data acquisition and analysis module is used to monitor each computing node during the pressurization configuration process and obtain the computing node monitoring information corresponding to the computing node; wherein, the computing node monitoring information includes at least one of the following for each computing node: the last successful reconnection time, the number of reconnections, the number of drops, the number of timeouts, and the overall successful reconnection time and reconnection success rate of all computing nodes.
9. A testing device for an open virtual network cluster, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the test method for an open virtual network cluster as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the test method for an open virtual network cluster as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Large-scale automatic cluster performance testing method and system based on cloud service
CN113986719A
Virtual-real hybrid networking device based on port mapping and networking method thereof
CN117499248A