Node testing method and device, storage medium and electronic device

By testing actual business scenarios based on virtual machines on the computing nodes, combined with the business modules, virtual machine scenarios and abnormal scenarios of the target node, the problem of incomplete testing caused by inconsistent LTP tool versions is solved, and the stability of the computing node kernel is achieved. comprehensive and accurate testing.

CN111813495BActive Publication Date: 2024-09-13BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202010538251.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-12
Publication Date
2024-09-13
Estimated Expiration
2040-06-12

AI Technical Summary

Technical Problem

The LTP version of the existing computing node kernel stability testing tool is not completely consistent with the kernel version, resulting in module error messages and low-level error reports not being supported. It is also divorced from the actual online operating environment and the test is not comprehensive enough.

Method used

Use actual business scenarios based on virtual machines to conduct standard process kernel testing. By testing the target business module of the target node, the target business scenario of the target virtual machine, and the abnormal scenario of the target node, comprehensive test results are obtained to ensure that all aspects of the test are obtained from the physical machine and the target node. Both aspects of the virtual machine cover normal operation and abnormal scenarios.

Benefits of technology

It achieves a comprehensive test of the stability of the computing node kernel, covering normal operation and abnormal scenarios, improving the comprehensiveness and accuracy of the test, and avoiding incomplete problems caused by test tool limitations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111813495B
    Figure CN111813495B
Patent Text Reader

Abstract

The present application relates to a node testing method and device, a storage medium and an electronic device, wherein the method comprises: testing a target business module of a target node to obtain a first test result of a target kernel, wherein the target business module is used to process a target business of the target node, and the target kernel is a kernel corresponding to the target node; testing a target business scenario of a target virtual machine to obtain a second test result of the target kernel, wherein the target virtual machine is a virtual machine on the target node; testing a node abnormality scenario of the target node to obtain a third test result of the target kernel, wherein the test result of the target kernel includes a first test result, a second test result and a third test result. The present application solves the problem that the computing node kernel method in the related art is incompletely tested due to the limitation of the test tool.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a node testing method and device, a storage medium, and an electronic device. Background Art

[0002] At present, when performing kernel stability tests on computing nodes, the existing open source LTP (LinuxTest Project, a group of projects designed to test and improve Linux systems) tools are usually used to perform kernel initialization tests, mainly including: hard disk, I / O testing, memory management stress testing, IPC (Inter-Process Communication) stress testing, SCHED testing, command function verification testing, and system call function verification testing.

[0003] However, when using the LTP tool to test the stability of the new version of the kernel of the computing node, there is often a situation where the LTP (Linux Test Project) version is not completely consistent with the kernel version, and some error messages about unsupported modules (LTP version is not supported) appear; or some low-level error messages that do not affect the running stability appear, and the above information is meaningless for the test conclusion. At the same time, only using LTP for stability testing is out of touch with the actual online running environment, and some important scenarios may be missed, resulting in an incomplete test.

[0004] Therefore, the computing node kernel method in the related art has the problem of incomplete testing due to the limitation of the testing tools. Summary of the invention

[0005] The present application provides a node testing method and device, a storage medium and an electronic device, so as to at least solve the problem of incomplete testing caused by the limitation of the testing tool in the computing node kernel method in the related art.

[0006] According to one aspect of an embodiment of the present application, a node testing method is provided, comprising: testing a target business module of a target node to obtain a first test result of a target kernel, wherein the target business module is used to process a target business of the target node, and the target kernel is a kernel corresponding to the target node; testing a target business scenario of a target virtual machine to obtain a second test result of the target kernel, wherein the target virtual machine is a virtual machine on the target node; testing a node abnormality scenario of the target node to obtain a third test result of the target kernel, wherein the test results of the target kernel include the first test result, the second test result and the third test result.

[0007] Optionally, testing the target business module of the target node to obtain the first test result of the target kernel includes: obtaining a target test case, wherein the target test case is a test case for the target business module; controlling the target node to run the target test case to obtain the first test result, wherein the first test result is used to indicate the virtual machine state of the target virtual machine and the node state of the target node.

[0008] Optionally, the target test case includes: a first test case, the first test case is a test case for a first service module of the target node, and controlling the target node to run the target test case to obtain the first test result includes: controlling the target node to run the first test case; when the running time of the first test case is greater than or equal to a first time threshold, obtaining a first sub-test result, wherein the first test result includes the first sub-test result, and the first sub-test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0009] Optionally, the target test case includes: a second test case, the second test case is a test case of the virtual gateway of the target node, and controlling the target node to run the target test case to obtain the first test result includes: controlling the target node to run the second test case; when the running time of the second test case is greater than or equal to a second time threshold, obtaining a second sub-test result, wherein the first test result includes the second sub-test result, and the second sub-test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0010] Optionally, the testing of the target business scenario of the target virtual machine to obtain the second test result of the target kernel includes: controlling the target virtual machine to run the target business scenario, wherein the target business scenario includes at least one of the following: a first business scenario associated with virtual machine migration, and a second business scenario unrelated to virtual machine migration; when the running time of the target business scenario is greater than or equal to a third time threshold, obtaining the second test result, wherein the second test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0011] Optionally, when the target business scenario includes the first business scenario, controlling the target virtual machine to run the target business scenario includes: when the target virtual machine includes multiple first virtual machines, controlling the multiple first virtual machines to run the first business scenario, wherein the first business scenario includes at least one of the following: round-trip migration of a virtual machine, concurrent round-trip migration of multiple virtual machines, virtual machine migration that calls one or more migration interfaces, continuous migration of virtual machines between multiple nodes in a virtual machine cluster, each of the first virtual machines is used to run at least one of the first business scenarios under at least one load mode, and the load mode includes at least one of the following: full load, no load, jump load, and gradual load.

[0012] Optionally, when the target business scenario includes the second business scenario, controlling the target virtual machine to run the target business scenario includes: when the target virtual machine includes multiple second virtual machines, controlling a first part of the multiple second virtual machines to run a first sub-business scenario, wherein the first sub-business scenario includes: running a load with at least one load mode, the load mode including at least one of the following: full load, no load, jump load, gradual load; controlling a second part of the multiple second virtual machines to run a second sub-business scenario, wherein the second sub-business scenario is to create an image file while continuously performing read and write operations inside the virtual machine, and the second business scenario includes the first sub-business scenario and the second sub-business scenario.

[0013] Optionally, before testing the target business scenario of the target virtual machine to obtain the second test result of the target kernel, the method also includes: creating the target virtual machine using a target image file, wherein the target image file is pre-installed with a target load tool and load scripts of multiple load modes, and the target load tool is used to use the load script to build the target business scenario, and the load mode includes at least one of the following: full load, empty load, jump load, and gradual load.

[0014] Optionally, the testing of the node abnormality scenario of the target node to obtain the third test result of the target kernel includes: controlling the target node to run the node abnormality scenario, wherein the node abnormality scenario includes at least one of the following: node memory leakage, repeated restarts of the second service module on the node, and continuous backup of data to a target cluster, wherein the target cluster is used for data storage; when the running time of the node abnormality scenario is greater than or equal to a fourth time threshold, obtaining the third test result, wherein the third test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0015] Optionally, controlling the target node to run the node abnormal scenario includes: using a target memory tool to occupy the memory of the target node, continuously executing a first sub-time, and obtaining a third sub-test result, wherein the target memory tool is used to perform a memory stress test; controlling the second service module to restart repeatedly, continuously executing a second sub-time, and obtaining a fourth sub-test result; controlling the target node to continuously back up data to the target cluster, continuously executing a third sub-time, and obtaining a fifth sub-test result, wherein the third test result includes the third sub-test result, the fourth sub-test result, and the fifth sub-test result.

[0016] According to another aspect of an embodiment of the present application, a node testing device is provided, including: a first testing unit, used to test a target business module of a target node to obtain a first test result of a target kernel, wherein the target business module is used to process a target business of the target node, and the target kernel is a kernel corresponding to the target node; a second testing unit, used to test a target business scenario of a target virtual machine to obtain a second test result of the target kernel, wherein the target virtual machine is a virtual machine on the target node; a third testing unit, used to test a node abnormality scenario of the target node to obtain a third test result of the target kernel, wherein the test results of the target kernel include the first test result, the second test result and the third test result.

[0017] Optionally, the first test unit includes: a first acquisition module, used to acquire a target test case, wherein the target test case is a test case of the target business module; a first control module, used to control the target node to run the target test case to obtain the first test result, wherein the first test result is used to indicate the virtual machine status of the target virtual machine and the node status of the target node.

[0018] Optionally, the target test case includes: a first test case, which is a test case for a first service module of the target node, and the first control module includes: a first control submodule, used to control the target node to run the first test case; a first acquisition submodule, used to obtain a first sub-test result when the running time of the first test case is greater than or equal to a first time threshold, wherein the first test result includes the first sub-test result, and the first sub-test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0019] Optionally, the target test case includes: a second test case, the second test case is a test case of the virtual gateway of the target node, and the first control module includes: a second control submodule, used to control the target node to run the second test case; a second acquisition submodule, used to obtain a second sub-test result when the running time of the second test case is greater than or equal to a second time threshold, wherein the first test result includes the second sub-test result, and the second sub-test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0020] Optionally, the second test unit includes: a second control module, used to control the target virtual machine to run the target business scenario, wherein the target business scenario includes at least one of the following: a first business scenario associated with virtual machine migration, and a second business scenario unrelated to virtual machine migration; a second acquisition module, used to obtain the second test result when the running time of the target business scenario is greater than or equal to a third time threshold, wherein the second test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0021] Optionally, the second control module includes: a third control submodule, used to control multiple first virtual machines to run the first business scenario when the target business scenario includes the first business scenario, wherein the target virtual machine includes the multiple first virtual machines, and the first business scenario includes at least one of the following: round-trip migration of a virtual machine, concurrent round-trip migration of multiple virtual machines, virtual machine migration that calls one or more migration interfaces, and continuous migration of virtual machines between multiple nodes in a virtual machine cluster, each of the first virtual machines is used to run at least one of the first business scenarios under at least one load mode, and the load mode includes at least one of the following: full load, no load, jump load, and gradual load.

[0022] Optionally, the second control module includes: a fourth control submodule, used to control the first part of the multiple second virtual machines to run a first sub-business scenario when the target business scenario includes the second business scenario, wherein the target virtual machine includes the multiple second virtual machines, and the first sub-business scenario includes: running a load of at least one load mode, and the load mode includes at least one of the following: full load, no load, jump load, and gradual load; a fifth control submodule, used to control the second part of the multiple second virtual machines to run a second sub-business scenario, wherein the second sub-business scenario is to create an image file while continuously performing read and write operations inside the virtual machine, and the second business scenario includes the first sub-business scenario and the second sub-business scenario.

[0023] Optionally, the device also includes: a creation unit, used to create the target virtual machine using a target image file before testing the target business scenario of the target virtual machine and obtaining the second test result of the target kernel, wherein the target image file is pre-installed with a target load tool and load scripts of multiple load modes, and the target load tool is used to use the load script to build the target business scenario, and the load mode includes at least one of the following: full load, empty load, jump load, and gradual load.

[0024] Optionally, the third test unit includes: a third control module, used to control the target node to run the node abnormality scenario, wherein the node abnormality scenario includes at least one of the following: node memory leakage, repeated restart of the second service module on the node, and continuous backup of data to a target cluster, and the target cluster is used for data storage; a third acquisition module, used to obtain the third test result when the running time of the node abnormality scenario is greater than or equal to a fourth time threshold, wherein the third test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0025] Optionally, the third control module includes: an occupation submodule, used to use a target memory tool to occupy the memory of the target node, continuously execute for a first sub-time, and obtain a third sub-test result, wherein the target memory tool is used to perform a memory stress test; a sixth control submodule, used to control the second service module to restart repeatedly, continuously execute for a second sub-time, and obtain a fourth sub-test result; a seventh control submodule, used to control the target node to continuously back up data to the target cluster, continuously execute for a third sub-time, and obtain a fifth sub-test result, wherein the third test result includes the third sub-test result, the fourth sub-test result and the fifth sub-test result.

[0026] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0027] According to another aspect of the embodiments of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0028] In an embodiment of the present application, a standard process-based kernel testing method based on actual business scenarios of virtual machines on computing nodes is adopted. By testing the target business module of the target node, a first test result of the target kernel is obtained, wherein the target business module is used to process the target business of the target node, and the target kernel is the kernel corresponding to the target node; the target business scenario of the target virtual machine is tested to obtain a second test result of the target kernel, wherein the target virtual machine is a virtual machine on the target node; the node abnormality scenario of the target node is tested to obtain a third test result of the target kernel, wherein the test results of the target kernel include the first test result, the second test result and the third test result. Since the kernel stability test is performed from both the physical machine and the virtual machine, the basic functions of the computing node are tested, and the test scenarios of the normal operation and abnormality of the computing node are covered, thereby achieving the technical effect of improving the comprehensiveness of the node test, and further solving the problem of incomplete testing caused by the limitation of the testing tool in the computing node kernel method in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0031] Figure 1 is a schematic diagram of a hardware environment of a node testing method according to an embodiment of the present application;

[0032] Figure 2 is a flowchart of an optional node testing method according to an embodiment of the present application;

[0033] Figure 3 is a flowchart of another optional node testing method according to an embodiment of the present application;

[0034] Figure 4 is a schematic diagram of an optional node testing device according to an embodiment of the present application;

[0035] Figure 5 It is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0038] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretation:

[0039] 1) Compute Node

[0040] In the OpenStack (an open source cloud computing management platform project) distributed framework, it can be divided into control nodes and computing nodes. The control node is responsible for scheduling resources to the corresponding computing nodes, and the computing node is responsible for allocating actual resources to the virtual machine. Both the control node and the computing node are physical machines of the Linux system.

[0041] 2) Kernel

[0042] The kernel is the core module of the Linux operating system and can be responsible for all or part of the following processing: storage management, CPU (Central Processing Unit) and process management, file system, device management and drivers, network communication, system initialization (booting), and system calls.

[0043] 3) Stability test

[0044] Stability testing can also be called reliability testing. It tests whether the system can run stably by loading a certain amount of business pressure on the system and letting the system run continuously for a period of time.

[0045] 4) LTP

[0046] LTP is a collaborative project between SGI, IBM, OSDL and Bull. Its purpose is to provide a test suite for the open source community to verify the reliability, robustness and stability of Linux systems.

[0047] 5) Nova (virtual server deployment and business computing module developed by NASA)

[0048] Nova is the core service module in OpenStack, responsible for managing and maintaining the computing resources of the cloud computing environment, as well as the life cycle management of the entire cloud environment virtual machine.

[0049] 6) VGW (Virtual Gateway)

[0050] 7) Chaosblade, an open source chaos engineering tool, can provide rich fault scenario implementations and help distributed systems improve fault tolerance and recoverability.

[0051] 8) Distributed object storage cluster, a backend storage, mainly used to store images and backup files.

[0052] According to one aspect of an embodiment of the present application, a node testing method is provided. Optionally, in this embodiment, the node testing method can be applied to Figure 1 In the hardware environment composed of the terminal 101 and the server 103 shown in FIG. Figure 1 As shown, the server 103 is connected to the terminal 101 through a network, and can be used to provide services (such as game services, application services, etc.) for the terminal or the client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 103. The above network includes but is not limited to: a wide area network, a metropolitan area network or a local area network, and the terminal 101 is not limited to a PC, a mobile phone, a tablet computer, etc. The node testing method of the embodiment of the present application can be performed by the server 103, or by the terminal 101, or by the server 103 and the terminal 101. Among them, the node testing method of the embodiment of the present application performed by the terminal 101 can also be performed by the client installed thereon.

[0053] Figure 2 is a flowchart of an optional node testing method according to an embodiment of the present application, such as Figure 2 As shown, the method may include the following steps:

[0054] Step S202, testing a target service module of a target node to obtain a first test result of a target kernel, wherein the target service module is used to process a target service of the target node, and the target kernel is a kernel corresponding to the target node;

[0055] Step S204, testing the target business scenario of the target virtual machine to obtain a second test result of the target kernel, wherein the target virtual machine is a virtual machine on the target node;

[0056] Step S206, testing the node abnormality scenario of the target node to obtain a third test result of the target kernel, wherein the test result of the target kernel includes the first test result, the second test result and the third test result.

[0057] Through the above steps S202 to S206, the target business module of the target node is tested to obtain a first test result of the target kernel, wherein the target business module is used to process the target business of the target node, and the target kernel is the kernel corresponding to the target node; the target business scenario of the target virtual machine is tested to obtain a second test result of the target kernel, wherein the target virtual machine is a virtual machine on the target node; the node exception scenario of the target node is tested to obtain a third test result of the target kernel, wherein the test result of the target kernel includes the first test result, the second test result and the third test result, which solves the problem of incomplete testing caused by the limitation of the test tool in the computing node kernel method in the related art, and improves the comprehensiveness of the node test.

[0058] In the technical solution provided in step S202, the target business module of the target node is tested to obtain a first test result of the target kernel, wherein the target business module is used to process the target business of the target node, and the target kernel is the kernel corresponding to the target node.

[0059] The node testing method in this embodiment can be applied to the scenario of performing kernel stability testing on computing nodes of a cloud computing platform.

[0060] In the related art, when using the LTP tool to test the stability of the new version of the kernel of the computing node, there is often a situation where the LTP version is not completely consistent with the kernel version (that is, the kernel version that the LTP version can test is inconsistent with the tested kernel version), and some error messages about unsupported modules appear (LTP does not support modules in the kernel), or there are some low-level error messages that do not affect the stability of operation (for example, usage or performance prompts will report errors, but these prompts do not affect the stability of operation), which is also meaningless to the test conclusion. At the same time, only using LTP for stability testing is divorced from the actual online operating environment and may miss some important scenarios (online business scenarios).

[0061] The node to be tested is the target node, which can be a computing node in a cloud computing platform. The kernel of the target node is the target kernel, and the node is tested for the stability of the node kernel. When testing the target node, the tester can control the test through his own terminal device. The tester can configure the data required for the test and the corresponding test parameters by operating the terminal device, and trigger the start of the test on the target node by performing a predetermined operation on the terminal device. The target node can be a computing node on the server side.

[0062] In this embodiment, the kernel stability test is carried out from three aspects: preliminary basic function verification, simulation node online business scenario test and special situation test of node abnormality.

[0063] The tests performed on the target node may include: preliminary basic function verification, which is achieved by testing the target business module of the node: the target business module of the target node can be tested to obtain a first test result of the target kernel, which is used to indicate the stability of the target kernel.

[0064] The target service module is used to process the target service of the target node. For example, the target service module may be responsible for at least one of the following services: managing and maintaining computing resources of the cloud computing environment; managing the life cycle of cloud environment virtual machines; and controlling signaling transmission in the network.

[0065] It should be noted that the target business module can be a physical module on the computing node or a program module on the computing node that relies on the hardware module. The target business module can realize the basic functions of the target node. The basic functions realized by different nodes can be the same or different.

[0066] In the technical solution provided in step S204, the target business scenario of the target virtual machine is tested to obtain a second test result of the target kernel, wherein the target virtual machine is a virtual machine on the target node.

[0067] The node kernel stability test in the related art only tests the performance of the node physical machine, which is separated from the actual online operating environment, making the test incomplete.

[0068] Optionally, in this embodiment, the test performed on the target node may include: simulating the node online business scenario test. By simulating the online environment as much as possible, covering the business scenarios in multiple dimensions, and reducing the workload of manual testing, the comprehensiveness and efficiency of the test are taken into account.

[0069] The simulated online business scenario mainly simulates the business scenario of the target virtual machine on the target node, that is, the target business scenario. The simulated node online business scenario test can be: testing the target business scenario of the target virtual machine to obtain a second test result of the target kernel, and the second test result is used to indicate the stability of the target kernel.

[0070] In the technical solution provided in step S206, the node abnormality scenario of the target node is tested to obtain a third test result of the target kernel, wherein the test result of the target kernel includes a first test result, a second test result and a third test result.

[0071] The test performed on the target node may include: a special case test of node abnormality. In addition to the test scenario of the normal operation of the target node, a test scenario when the target node is abnormal can also be tested. The abnormal test scenario can be used to test the target node's ability to handle abnormalities.

[0072] The special case test of node anomaly may include: testing the node anomaly scenario of the target node to obtain a third test result of the target kernel, where the third test result is used to indicate the stability of the target kernel.

[0073] The test results of the target kernel may include a first test result, a second test result and a third test result. By analyzing the first test result, the second test result and the third test result, it can be determined whether the kernel can run stably, thereby providing a basis for improving the performance of the kernel.

[0074] As an optional embodiment, testing a target service module of a target node to obtain a first test result of a target kernel includes:

[0075] S11, obtaining a target test case, wherein the target test case is a test case of a target business module;

[0076] S12, controlling the target node to run the target test case to obtain a first test result, wherein the first test result is used to indicate the virtual machine state of the target virtual machine and the node state of the target node.

[0077] The test of the target business module may be automated testing using a preset test case. In order to test the target business module, a test case for testing the target business module may be obtained.

[0078] The target test case may be an automated test case of a target business module. The target test case may be obtained by retrieving the stored target test case from a local memory or receiving the target test case from another device. The target test case may be generated by a test case generation tool.

[0079] After obtaining the target test case, the target node can be controlled to run the target test case to obtain a first test result, which is used to indicate the virtual machine state of the target virtual machine and the node state of the target node. For example, the target node can be controlled to run the target test case for a period of time, and then the virtual machine and computing node states can be checked.

[0080] The virtual machine state of a virtual machine can be used to represent the state of the virtual machine, which can be the running state of the virtual machine, or other states, and the node state of a node can be used to represent the state of the node, which can be the running state of the node, or other states. All virtual machine states and node states that can be used to characterize kernel stability can be used in the node testing method in this embodiment.

[0081] Through this embodiment, by using the target test case to test the target service module, the target service module can be automatically tested, thereby improving the test efficiency of the target node.

[0082] As an optional embodiment, controlling the target node to run the target test case to obtain the first test result includes:

[0083] S21, controlling the target node to run the first test case;

[0084] S22, when the running time of the first test case is greater than or equal to the first time threshold, obtain a first sub-test result, wherein the first test result includes a first sub-test result, and the first sub-test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0085] Optionally, in this embodiment, the target test case includes: a first test case, which is a test case of a first service module of the target node. The first service module may be Nova under the OpenStack distributed framework, and correspondingly, the first test case may be an existing Nova automated test case.

[0086] Nova automated testing is a test for resource allocation and scheduling of virtual machines at the OpenStack layer. Nova automated test cases mainly test part or all of the following process operations: creation, shutdown, startup, restart, reinstallation, configuration change, backup, snapshot, migration, key pair binding, auxiliary network card mounting, etc. of two types of virtual machine hosts. The above two types of virtual machines include: SSD (Solid State Disk, local disk) and EBS (Elastic Block Storage, elastic block storage, cloud disk).

[0087] When performing Nova automated testing, you can use existing Nova automated test cases to specify a computing node (an example of a target node) deployed with a specific kernel version (for example, a new kernel version) to start up and run the automated test case.

[0088] When the running time of the first test case is greater than or equal to the first time threshold, a first subtest result representing the virtual machine state of the target virtual machine and the node state of the target node can be obtained to complete the test of the first service module.

[0089] For example, for Nova automated testing, you can control the computing node to run Nova automated test cases, and after running for 24 hours, check the status of the virtual machine and computing node. The optional implementation of the test case can be: call the nova API based on the TestNG framework, and after the API returns successfully, the code verifies whether the virtual machine status meets expectations.

[0090] It should be noted that the business modules tested by the basic functional test can be configured as needed, and may include but is not limited to the above-mentioned Nova. For other service modules in the cloud computing network architecture, they can be tested in a similar manner to the above, which will not be repeated here.

[0091] Through this embodiment, after the target node is controlled to run the first test case for a certain period of time, the test result of the kernel is obtained, thereby completing the test of the first service module, and the reliability of the service module test can be improved.

[0092] As an optional embodiment, controlling the target node to run the target test case to obtain the first test result includes:

[0093] S31, controlling the target node to run the second test case;

[0094] S32, when the running time of the second test case is greater than or equal to the second time threshold, obtain a second sub-test result, wherein the first test result includes the second sub-test result, and the second sub-test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0095] Optionally, in this embodiment, the target test case includes: a second test case, which is a test case of a virtual gateway of the target node. The target service module may include a virtual gateway on the target node, and correspondingly, the test case used for testing the virtual gateway may be: an existing VGW automated test case.

[0096] The VGW automated test case tests the virtual gateway. This test case can test all or part of the following functions or indicators of the virtual gateway: VXLAN (Virtual eXtensible LAN) tunnel initialization; VGW domain; VXLAN subnet; route; neighbor; route capacity / boundary value; neighbor capacity / boundary value; DHCP (Dynamic Host Configuration Protocol) function; access control list function; security group function; network status and other VGW ADM (admin) functions (other VGW functions are mainly help, version, config, install, uninstall these functions), etc.

[0097] When performing VGW automated testing, existing VGW automated test cases can be used to specify a computing node (an example of a target node) deployed with a specific kernel version (eg, a new kernel version) to start up and run the automated test case.

[0098] When the running time of the second test case is greater than or equal to the second time threshold, a second subtest result representing the virtual machine state of the target virtual machine and the node state of the target node can be obtained to complete the test of the VGW.

[0099] For example, for VGW automated testing, you can control the computing nodes to run VGW automated test cases, run them for 24 hours, and then check the status of the virtual machines and computing nodes.

[0100] Through this embodiment, after the target node is controlled to run the second test case for a certain period of time, the test result of the kernel is obtained, thereby completing the test of the virtual gateway, and the reliability of the virtual gateway test can be improved.

[0101] As an optional embodiment, testing the target business scenario of the target virtual machine to obtain the second test result of the target kernel includes:

[0102] S41, controlling the target virtual machine to run a target business scenario, wherein the target business scenario includes at least one of the following: a first business scenario associated with virtual machine migration, and a second business scenario unrelated to virtual machine migration;

[0103] S42: When the running time of the target business scenario is greater than or equal to a third time threshold, obtain a second test result, wherein the second test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0104] When testing the target business scenario of the target virtual machine, the target virtual machine can be controlled to run the target business scenario, that is, to simulate the operation of the target business scenario. The above target business scenario can be one or more, and can include: a business scenario involving virtual machine migration (a first business scenario) and a business scenario not involving virtual machine migration (a second business scenario).

[0105] The number of target virtual machines may be one or more, and the same virtual machine may run at least one or more business scenarios. The running of different business scenarios may be simultaneous (i.e., different virtual machines run different business scenarios) or sequential (the same virtual machine runs different business scenarios, or different virtual machines run different business scenarios).

[0106] When the time for the target virtual machine to run the target business scenario reaches a third time threshold, a second test result representing the virtual machine state of the target virtual machine and the node state of the target node may be obtained.

[0107] When there are multiple target business scenarios, the total running time of the target virtual machine can be: the sum of the running time of multiple business scenarios, for example, the sum of the running time of the first business scenario and the running time of the second business scenario. When there are multiple target virtual machines, different virtual machines or combinations of virtual machines can execute different business scenarios simultaneously. In the above case, the total running time of the target virtual machine is related to the number of business scenarios executed simultaneously, which can be determined according to the actual test scenario, and is not specifically limited in this embodiment.

[0108] Through this embodiment, by running business scenarios associated with virtual machine migration and business scenarios unrelated to virtual machine migration for a certain period of time, the test results of the kernel are obtained, thereby completing the test of the virtual machine online business scenarios, which can improve the reliability of virtual machine testing.

[0109] As an optional embodiment, when the target business scenario includes the first business scenario, controlling the target virtual machine to run the target business scenario includes:

[0110] S51, in the case that the target virtual machine includes multiple first virtual machines, control the multiple first virtual machines to run a first business scenario, wherein the first business scenario includes at least one of the following: round-trip migration of a virtual machine, concurrent round-trip migration of multiple virtual machines, virtual machine migration that calls one or more migration interfaces, and continuous migration of virtual machines between multiple nodes in a virtual machine cluster, each first virtual machine is used to run at least one first business scenario under at least one load mode, and the load mode includes at least one of the following: full load, empty load, jump load, and gradual load.

[0111] The target business scenario may include a first business scenario related to virtual machine migration. The first business scenario may include at least one of the following: round-trip migration of a virtual machine, concurrent round-trip migration of multiple virtual machines, virtual machine migration that calls one or more migration interfaces, and continuous migration of virtual machines between multiple nodes in a virtual machine cluster.

[0112] Some virtual machines (first virtual machines) in the target virtual machine can be selected to run the first business scenario. The above virtual machine migration is a virtual machine under different load modes, and the load mode includes at least one of the following: full load, empty load, jump load, and gradual load (gradually changing load). Different first virtual machines can run at least one first business scenario under at least one load mode to model the migration of virtual machines under different load modes.

[0113] When testing the first business scenario, multiple first virtual machines may be controlled to run the first business scenario. To improve test efficiency, one first virtual machine may be controlled to run one first business scenario under one load mode. Correspondingly, the number of virtual machines to be created may be determined based on the number of load modes and the number of virtual machines involved in the first business scenario.

[0114] It should be noted that the above-mentioned virtual machine migration that calls one or more migration interfaces can be: migration test with data disk / without data disk. With data disk / without data disk is mainly used to test the migration operation of local disk hosts with different configurations. With data disk, pre-migration operation (migration of data disk) must be performed first, and online migration operation can be performed only after the pre-migration is successful, while without data disk, online migration can be performed directly. With data disk / without data disk can be understood as different scenarios of calling multiple different migration interface combinations and calling a single migration interface.

[0115] It should also be noted that the continuous migration of virtual machines between multiple nodes in a virtual machine cluster can be the migration of virtual machines between two computing nodes / three computing nodes. Two computing nodes / three computing nodes are mainly tested for the migration scheduling scenario of virtual machines. Nova's scheduling strategy is involved in the migration of virtual machines. The nova-schedule service selects the optimal computing node (that is, the physical machine) according to the resource usage of each computing node in the cluster and schedules the virtual machine to the node. Generally, scheduling is performed in the same cluster. If there are only two computing nodes in the cluster and the virtual machine is currently on node A, the scheduling strategy triggered by online migration will definitely schedule the virtual machine to node B. In the case of three computing nodes, the first migration scheduling may be to B or C (based on the scheduling algorithm to sort the nodes and select the best), and the continued migration scheduling is to C or B, and then to A. The continuous migration of virtual machines between multiple nodes in a virtual machine cluster can be understood as round-trip migration between two nodes and round-trip migration between multiple nodes.

[0116] Through this embodiment, multiple business scenarios of virtual machine migration are simulated by multiple first virtual machines, which can ensure the comprehensiveness of the test while taking into account the test efficiency.

[0117] As an optional embodiment, when the target business scenario includes the second business scenario, controlling the target virtual machine to run the target business scenario includes:

[0118] S61, when the target virtual machine includes multiple second virtual machines, controlling a first part of the multiple second virtual machines to run a first sub-business scenario, wherein the first sub-business scenario includes: running a load of at least one load mode, the load mode includes at least one of the following: full load, empty load, jump load, and gradual load;

[0119] S61, controlling the second part of the multiple second virtual machines to run a second sub-business scenario, wherein the second sub-business scenario is to create an image file while continuously executing read and write operations inside the virtual machine, and the second business scenario includes a first sub-business scenario and a second sub-business scenario.

[0120] The target business scenario may include a second business scenario that is not related to virtual machine migration. Some virtual machines (second virtual machines) in the target virtual machine may be selected to run the second business scenario. The second business scenario may include at least one of the following: running different mode loads, and making images while performing internal I / O.

[0121] The first sub-business scenario may be a business scenario for running different load modes. The first sub-business scenario may be: a virtual machine executes loads of different load modes, and the load mode may include but is not limited to at least one of the following: full load, empty load, jump load, and gradual load.

[0122] When testing the first sub-business scenario, the first part of the plurality of second virtual machines may be controlled to run the first sub-business scenario. To improve the test efficiency, a second virtual machine may be controlled to run a first sub-business scenario under a load mode. Correspondingly, the number of virtual machines to be created may be determined according to the number of load modes.

[0123] The second sub-business scenario can be a scenario where an image is created while the virtual machine is performing I / O, that is, the image file is created while the read and write operations are continuously performed inside the virtual machine. The second sub-business scenario can simulate the second sub-business scenario by calling nova-API to create a custom image during the continuous read and write operations inside the virtual machine.

[0124] When testing the first sub-business scenario, multiple first virtual machines may be controlled to run the first business scenario. To improve test efficiency, one first virtual machine may be controlled to run one first business scenario under one load mode. Correspondingly, the number of virtual machines to be created may be determined based on the number of load modes and the number of virtual machines involved in the first business scenario.

[0125] When performing the second sub-business scenario test, the second part of the plurality of second virtual machines may be controlled to run the second sub-business scenario. The second part of the plurality of second virtual machines may include one virtual machine.

[0126] Through this embodiment, multiple business scenarios unrelated to virtual machine migration are simulated by multiple second virtual machines, which can ensure the comprehensiveness of the test while taking into account the test efficiency.

[0127] As an optional embodiment, before testing the target business scenario of the target virtual machine to obtain the second test result of the target kernel, the method further includes:

[0128] S71, create a target virtual machine using a target image file, wherein a target load tool and load scripts of multiple load modes are pre-installed in the target image file, the target load tool is used to build a target business scenario using the load script, and the load mode includes at least one of the following: full load, empty load, jump load, and gradual load.

[0129] In order to test the target business scenario, a target virtual machine required for the test can be created in advance. The target virtual machine can be created using a target image file, in which a target load tool and load scripts of multiple load modes are pre-installed. The target load tool can use the load script to build a target business scenario. The load mode can include but is not limited to at least one of the following: full load, empty load, jump load, and gradual load.

[0130] For example, you can use a custom image with Chaosblade tools pre-installed and scripts for different load modes to create multiple virtual machines. The virtual machines running on the compute nodes use the Chaosblade tool to apply different load stress modes, and other tools or stress commands can also be used to simulate loads.

[0131] Through this embodiment, by installing a target load tool and a target image file with load scripts of various load modes to create a target virtual machine, the efficiency of virtual machine creation can be improved, and the simulation capability for target business scenarios can be improved.

[0132] As an optional embodiment, testing the node abnormality scenario of the target node to obtain a third test result of the target kernel includes:

[0133] S81, controlling the target node to run a node abnormality scenario, wherein the node abnormality scenario includes at least one of the following: node memory leakage, repeated restart of the second service module on the node, and continuous data backup to a target cluster, where the target cluster is used for data storage;

[0134] S82: When the running time of the node abnormality scenario is greater than or equal to a fourth time threshold, obtain a third test result, wherein the third test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0135] The node abnormality scenario may include multiple abnormal scenarios, and the above abnormal scenarios may include but are not limited to at least one of the following: node memory leakage, repeated restart of the second service module on the node, and continuous data backup to the target cluster.

[0136] The second service module and the first service module may be the same service module. For example, both may be Nova. The target cluster is used for data storage. The stored data may be: image files and backup files. An example of the target cluster may be a distributed object storage cluster.

[0137] The target node may be controlled to run a node abnormality scenario, and when the running time of the node abnormality scenario is greater than or equal to a fourth time threshold, a third test result representing the virtual machine state of the target virtual machine and the node state of the target node is obtained. In the case where there are multiple node abnormality scenarios, the target node may be controlled to execute each node abnormality scenario sequentially. Correspondingly, the fourth time threshold may be the sum of the execution times of multiple node abnormality scenarios.

[0138] Through this embodiment, by controlling the target node to run the node abnormality scenario for a certain period of time, the test result of the kernel is obtained, thereby completing the test of the node abnormality scenario, and the reliability of the node abnormality scenario test can be improved.

[0139] As an optional embodiment, controlling the target node to run a node abnormality scenario includes:

[0140] S91, using a target memory tool to occupy the memory of a target node, continuously executing the first sub-time, and obtaining a third sub-test result, wherein the target memory tool is used to perform a memory stress test;

[0141] S92, controlling the second service module to repeatedly restart, continuously executing the second sub-time, and obtaining a fourth sub-test result;

[0142] S93, controlling the target node to continuously back up data to the target cluster, continuously executing the third sub-time, and obtaining a fifth sub-test result, wherein the third test result includes a third sub-test result, a fourth sub-test result, and a fifth sub-test result.

[0143] Node abnormality scenarios include: a memory leak on the node, repeated restarts of the second service module on the node (for example, the Nova service), and continuous data backup to the target cluster (for example, a distributed object storage cluster).

[0144] For the node memory leak scenario, you can use the target memory tool (for example, the memtester tool) to occupy the memory of the target node, continue to execute the first sub-time and then return to normal, check the virtual machine status of the target virtual machine and the node status of the target node, and thus obtain the third sub-test result.

[0145] For the scenario where the second service module on the node is repeatedly restarted, the service abnormality of the second service module on the target node can be controlled, and it can be restarted repeatedly. After the second sub-time is continued, it will return to normal. The virtual machine status of the target virtual machine and the node status of the target node can be checked to obtain the fourth sub-test result.

[0146] For the scenario of continuously backing up data to the target cluster, the target node can be controlled to connect to the target cluster, and the data can be continuously backed up through the communication connection between the two. After the third sub-time is continuously executed, it returns to normal, and the virtual machine status of the target virtual machine and the node status of the target node are checked to obtain the fifth sub-test result. In addition, in addition to the target cluster, other devices capable of data storage can also be applied to the above abnormal scenario of continuous data backup.

[0147] The first sub-time, the second sub-time and the third sub-time may be the same or different, and the sum of the first sub-time, the second sub-time and the third sub-time may be less than or equal to the fourth time threshold. The third test result may include: the third sub-test result, the fourth sub-test result and the fifth sub-test result

[0148] Through this embodiment, by simulating various node abnormality scenarios and obtaining the test results of each node abnormality scenario, the comprehensiveness of the node kernel test can be ensured.

[0149] It should be noted that, in this embodiment, checking the virtual machine status may include at least one of the following:

[0150] 1) Check whether the virtual machine returns to the ACTIVE state after the operation is completed;

[0151] 2) Check whether the power is in SHUTOFF state after shutdown operation;

[0152] 3) Check whether you can ping the IP address of the virtual machine;

[0153] 4) Log in to the virtual machine and execute shell commands to check whether the CPU and memory usage are normal.

[0154] The corresponding first test result may include at least one of the following: the state of the virtual machine after the operation is completed (for example, it is in the activated state, not in the activated state), the state of the virtual machine after the shutdown operation (for example, it is in the closed state, not in the closed state), the state of the virtual machine after the ping operation (for example, the IP can be pinged, the IP cannot be pinged); the CPU and memory utilization after the shell command is executed inside the virtual machine (for example, the actual CPU and memory utilization, normal, abnormal).

[0155] Checking the target node status may include at least one of the following:

[0156] 1) Check the CPU and memory utilization of the target node;

[0157] 2) Check whether each service restarts abnormally.

[0158] The corresponding first test result may include at least one of the following: CPU and memory utilization of the target node (eg, actual CPU and memory utilization, normal, abnormal); abnormal restart of each service (eg, yes, no).

[0159] The stability of the target kernel can be characterized by the VM state of the target VM and the node state of the target node. If the VM state and the node state are normal, it means the stability of the target kernel is good, and if the VM state and the node state are abnormal, it means the stability of the target kernel is poor.

[0160] The node testing method in the embodiment of the present application is explained below in conjunction with optional examples. In this example, the target node is a computing node configured with a new kernel version (kernel version not less than the target kernel version) in the OpenStack distributed framework, and the target business modules include: Nova and VGW.

[0161] The node testing method provided in this example is a cloud computing computing node kernel stability testing method. This method is based on the actual business scenarios of virtual machines on computing nodes. It develops standard process verification from both physical and virtual machines to ensure the stability of the new kernel version. It simulates the online environment as much as possible, covers business scenarios in multiple dimensions, and has a small manual testing workload, taking into account both the comprehensiveness and efficiency of the test.

[0162] like Figure 3 As shown, the node testing method in this example may include the following process steps:

[0163] Step S302: preliminary basic function verification.

[0164] The initial basic functional verification verified Nova automation and VGW network automation.

[0165] You can use the existing Nova automated test cases to specify the compute nodes deployed with this new kernel version to start up and run automated test cases. After running for 24 hours (the first time threshold), check the status of the virtual machines and compute nodes.

[0166] Use the existing VGW automated test cases of the target to run on the computing node deployed with this new kernel version. After running for 24 hours (the second time threshold), check the status of the virtual machine and computing node.

[0167] The time required for preliminary basic function verification is 2x24h.

[0168] Step S304: simulate an online business scenario and test the online business scenario.

[0169] It can operate on virtual machines on computing nodes, including various migration scenarios (concurrency, round-trip, running different modes of load inside the virtual machine), and scenarios without migration (different modes of load, internal I / O mirroring at the same time).

[0170] You can use a custom image with the Chaosblade tool pre-installed and load scripts in different modes (same as the above load modes) to create multiple virtual machines, so that you can use the created multiple virtual machines to simulate online business scenarios.

[0171] After creating multiple virtual machines, you can select some of them to execute different load scripts, such as full load, no load, jump load, and gradually changing load. Select a virtual machine to call nova-API to create a custom image when continuous read and write operations are performed. After running for 24 hours, you can view the status of the virtual machine and computing node.

[0172] You can select another part of the virtual machines to not only execute different modes of load scripts internally, but also execute migration scripts on the computing nodes (single virtual machine / multiple virtual machines concurrently, with data disk / without data disk, two computing nodes / three nodes). After running continuously for 24 hours, you can view the status of the virtual machines and computing nodes.

[0173] The total time required to test the online business scenario is 2x24h (the third time threshold).

[0174] Step S306, testing the special situation of node abnormality.

[0175] Testing special situations of node abnormalities can be performed on physical machines. Special situations of node abnormalities include: abnormal memory leaks, repeated restarts of nova services, and connecting to a distributed object storage cluster for continuous data backup.

[0176] Use the memtester tool to occupy the memory of the computing node and simulate a memory leak. After running for 24 hours (the first sub-time), it returns to normal and checks the status of the virtual machine and computing node.

[0177] The nova-compute service on the control computing node is abnormal. Restart it repeatedly and restore it to normal after 24 hours. Check the status of the virtual machine and computing node.

[0178] Control the computing nodes to connect to the distributed object storage cluster to continuously back up data, and restore to normal after 24 hours, and check the status of the virtual machine and computing nodes.

[0179] The total time required to test the special case of node anomaly is 2x24h (the fourth time threshold).

[0180] The above kernel stability test method is to perform 7x24h stability test on the new version of the kernel of the computing node. The chaosblade tool is used to perform different modes of load pressure inside the virtual machine running on the computing node. Other tools or stress commands can also be used to simulate the load. Similarly, the test of special situations of computing node abnormalities can also be expanded, such as node network abnormalities, repeated restarts of proxy services, etc.

[0181] This example provides a set of standard test processes for kernel stability testing of computing nodes of cloud services. By combining automated testing with functional testing of actual business, 7x24h stability testing is performed in multiple scenarios from two dimensions: virtual machines and physical machines. This not only ensures the basic functions of cloud services, but also covers the test scenarios when computing nodes operate normally and when abnormalities occur. The original single stability test form is made more comprehensive and scalable. The test scope can be continuously fine-tuned according to the continuous increase in business, and there will be no major omissions due to being out of touch with the actual online environment, ensuring the comprehensiveness and efficiency of the test.

[0182] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0183] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0184] According to another aspect of an embodiment of the present application, a node testing device for implementing the above-mentioned node testing method is also provided. Figure 4 is a schematic diagram of an optional node testing device according to an embodiment of the present application, such as Figure 4 As shown, the device may include:

[0185] (1) a first testing unit 42, configured to test a target service module of a target node to obtain a first test result of a target kernel, wherein the target service module is configured to process a target service of the target node, and the target kernel is a kernel corresponding to the target node;

[0186] (2) a second testing unit 44, configured to test a target business scenario of a target virtual machine to obtain a second test result of the target kernel, wherein the target virtual machine is a virtual machine on the target node;

[0187] (3) A third test unit 46, configured to test a node abnormality scenario of the target node to obtain a third test result of the target kernel, wherein the test result of the target kernel includes the first test result, the second test result and the third test result.

[0188] It should be noted that the first test unit 42 in this embodiment can be used to execute the above step S202, the second test unit 44 in this embodiment can be used to execute the above step S204, and the third test unit 46 in this embodiment can be used to execute the above step S206.

[0189] Through the above modules, the target business module of the target node is tested to obtain a first test result of the target kernel, wherein the target business module is used to process the target business of the target node, and the target kernel is the kernel corresponding to the target node; the target business scenario of the target virtual machine is tested to obtain a second test result of the target kernel, wherein the target virtual machine is the virtual machine on the target node; the node abnormality scenario of the target node is tested to obtain a third test result of the target kernel, wherein the test result of the target kernel includes the first test result, the second test result and the third test result, which solves the problem of incomplete testing caused by the limitation of the test tool in the computing node kernel method in the related art, and improves the comprehensiveness of the node test.

[0190] As an optional embodiment, the first testing unit 42 includes:

[0191] A first acquisition module is used to acquire a target test case, wherein the target test case is a test case of a target business module;

[0192] The first control module is used to control the target node to run the target test case to obtain a first test result, wherein the first test result is used to indicate the virtual machine state of the target virtual machine and the node state of the target node.

[0193] As an optional embodiment, the target test case includes: a first test case, the first test case is a test case of a first service module of the target node,

[0194] The first control module includes:

[0195] A first control submodule, used to control the target node to run a first test case;

[0196] The first acquisition submodule is used to obtain a first sub-test result when the running time of the first test case is greater than or equal to a first time threshold, wherein the first test result includes the first sub-test result, and the first sub-test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0197] As an optional embodiment, the target test case includes: a second test case, the second test case is a test case of the virtual gateway of the target node,

[0198] The first control module includes:

[0199] A second control submodule, used to control the target node to run a second test case;

[0200] The second acquisition submodule is used to obtain a second sub-test result when the running time of the second test case is greater than or equal to the second time threshold, wherein the first test result includes the second sub-test result, and the second sub-test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0201] As an optional embodiment, the second testing unit 44 includes:

[0202] A second control module is used to control the target virtual machine to run a target business scenario, wherein the target business scenario includes at least one of the following: a first business scenario associated with virtual machine migration, and a second business scenario unrelated to virtual machine migration;

[0203] The second acquisition module is used to obtain a second test result when the running time of the target business scenario is greater than or equal to a third time threshold, wherein the second test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0204] As an optional embodiment, the second control module includes:

[0205] The third control submodule is used to control multiple first virtual machines to run the first business scenario when the target business scenario includes the first business scenario, wherein the target virtual machine includes multiple first virtual machines, and the first business scenario includes at least one of the following: round-trip migration of a virtual machine, concurrent round-trip migration of multiple virtual machines, virtual machine migration that calls one or more migration interfaces, and continuous migration of virtual machines between multiple nodes in a virtual machine cluster, and each first virtual machine is used to run at least one first business scenario under at least one load mode, and the load mode includes at least one of the following: full load, no load, jump load, and gradual load.

[0206] As an optional embodiment, the second control module includes:

[0207] a fourth control submodule, configured to control a first part of the plurality of second virtual machines to run a first sub-business scenario when the target business scenario includes the second business scenario, wherein the target virtual machine includes the plurality of second virtual machines, and the first sub-business scenario includes: running a load of at least one load mode, and the load mode includes at least one of the following: full load, empty load, jump load, and gradual load;

[0208] The fifth control submodule is used to control the second part of the multiple second virtual machines to run the second sub-business scenario, wherein the second sub-business scenario is to create an image file while continuously performing read and write operations inside the virtual machine, and the second business scenario includes the first sub-business scenario and the second sub-business scenario.

[0209] As an optional embodiment, the above device also includes:

[0210] A creation unit is used to create a target virtual machine using a target image file before testing the target business scenario of the target virtual machine and obtaining a second test result of the target kernel, wherein the target image file is pre-installed with a target load tool and load scripts of multiple load modes, the target load tool is used to use the load script to build the target business scenario, and the load mode includes at least one of the following: full load, empty load, jump load, and gradual load.

[0211] As an optional embodiment, the third testing unit 66 includes:

[0212] A third control module is used to control the target node to run a node abnormality scenario, wherein the node abnormality scenario includes at least one of the following: node memory leakage, repeated restart of the second service module on the node, and continuous data backup to the target cluster, where the target cluster is used for data storage;

[0213] The third acquisition module is used to obtain a third test result when the running time of the node abnormality scenario is greater than or equal to a fourth time threshold, wherein the third test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

[0214] As an optional embodiment, the third control module includes:

[0215] An occupation submodule, used to occupy the memory of the target node using a target memory tool, continuously execute the first sub-time, and obtain a third sub-test result, wherein the target memory tool is used to perform a memory stress test;

[0216] A sixth control submodule, used for controlling the second service module to restart repeatedly, continuously executing the second sub-time, and obtaining a fourth sub-test result;

[0217] The seventh control submodule is used to control the target node to continuously back up data to the target cluster, continuously execute the third sub-time, and obtain the fifth sub-test result, wherein the third test result includes the third sub-test result, the fourth sub-test result and the fifth sub-test result.

[0218] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.

[0219] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned node testing method is also provided. The electronic device may be a server, a terminal, or a combination thereof.

[0220] Figure 5 is a structural block diagram of an electronic device according to an embodiment of the present application, such as Figure 5 As shown, the electronic device includes a memory 502 and a processor 504. The memory 502 stores a computer program, and the processor 504 is configured to execute the steps in any of the above method embodiments through the computer program.

[0221] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.

[0222] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0223] S1, testing a target service module of a target node to obtain a first test result of a target kernel, wherein the target service module is used to process a target service of the target node, and the target kernel is a kernel corresponding to the target node;

[0224] S2, testing a target business scenario of a target virtual machine to obtain a second test result of a target kernel, wherein the target virtual machine is a virtual machine on a target node;

[0225] S3, testing the node abnormality scenario of the target node to obtain a third test result of the target kernel, wherein the test result of the target kernel includes the first test result, the second test result and the third test result.

[0226] Alternatively, a person skilled in the art may understand that: Figure 5 The structure shown is for illustration only, and the electronic device may also be a smart device (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, and a terminal device such as an MID (Mobile Internet Devices) and a PAD. Figure 5 The structure of the electronic device is not limited. Figure 5 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 5 in different configurations.

[0227] Among them, the memory 502 can be used to store software programs and modules, such as the program instructions / modules corresponding to the node testing method and device in the embodiment of the present application, and the processor 504 executes various functional applications and data processing by running the software programs and modules stored in the memory 502, that is, realizing the above-mentioned node testing method. The memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 502 may further include a memory remotely arranged relative to the processor 504, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0228] The memory 502 may be specifically but not limited to being used to store data change record information of one or more objects.

[0229] As an example, Figure 5 As shown, the memory 502 may include but is not limited to the first test unit 42, the second test unit 44 and the third test unit 46 in the node test device. In addition, it may also include but is not limited to other module units in the node test device, which will not be repeated in this example.

[0230] Optionally, the transmission device 506 is used to receive or send data via a network. Specific examples of the network may include wired networks and wireless networks. In one example, the transmission device 506 includes a NIC (Network Interface Controller), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 506 is an RF (Radio Frequency) module, which is used to communicate with the Internet wirelessly.

[0231] In addition, the electronic device may further include: a connection bus 508 for connecting various module components in the electronic device.

[0232] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.

[0233] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a ROM (Read-Only Memory), a RAM (Random Access Memory), a disk or an optical disk, etc.

[0234] According to another aspect of the embodiment of the present application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of the node testing method.

[0235] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.

[0236] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:

[0237] S1, testing a target service module of a target node to obtain a first test result of a target kernel, wherein the target service module is used to process a target service of the target node, and the target kernel is a kernel corresponding to the target node;

[0238] S2, testing a target business scenario of a target virtual machine to obtain a second test result of a target kernel, wherein the target virtual machine is a virtual machine on a target node;

[0239] S3, testing the node abnormality scenario of the target node to obtain a third test result of the target kernel, wherein the test result of the target kernel includes the first test result, the second test result and the third test result.

[0240] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.

[0241] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.

[0242] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0243] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.

[0244] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0245] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0246] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.

[0247] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0248] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A node testing method, characterized in that: include: Testing a target service module of a target node to obtain a first test result of a target kernel, wherein the target service module is used to process a target service of the target node, the target kernel is a kernel corresponding to the target node, and the first test result is used to indicate a virtual machine state of a target virtual machine on the target node and a node state of the target node; Testing a target business scenario of the target virtual machine to obtain a second test result of the target kernel, wherein the target business scenario includes at least one of the following: a first business scenario associated with virtual machine migration and a second business scenario unrelated to virtual machine migration, and the second test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node; A node abnormality scenario of the target node is tested to obtain a third test result of the target kernel, wherein the node abnormality scenario includes at least one of the following: node memory leakage, repeated restart of the second service module on the node, and continuous data backup to a target cluster, the target cluster is used for data storage, the third test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node, and the test results of the target kernel include the first test result, the second test result and the third test result.

2. The method according to claim 1, characterized in that The testing of the target service module of the target node to obtain a first test result of the target kernel includes: Obtaining a target test case, wherein the target test case is a test case of the target business module; The target node is controlled to run the target test case to obtain the first test result.

3. The method according to claim 2, characterized in that The target test case includes: a first test case, the first test case is a test case of a first service module of the target node, The controlling the target node to run the target test case to obtain the first test result includes: Controlling the target node to run the first test case; When the running time of the first test case is greater than or equal to a first time threshold, a first sub-test result is obtained, wherein the first test result includes the first sub-test result, and the first sub-test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

4. The method according to claim 2, characterized in that: The target test case includes: a second test case, wherein the second test case is a test case of the virtual gateway of the target node, The controlling the target node to run the target test case to obtain the first test result includes: Controlling the target node to run the second test case; When the running time of the second test case is greater than or equal to a second time threshold, a second sub-test result is obtained, wherein the first test result includes the second sub-test result, and the second sub-test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node.

5. The method according to claim 1, characterized in that The testing of the target business scenario of the target virtual machine to obtain a second test result of the target kernel includes: Controlling the target virtual machine to run the target business scenario; When the running time of the target business scenario is greater than or equal to a third time threshold, the second test result is obtained.

6. The method according to claim 5, characterized in that In a case where the target business scenario includes the first business scenario, controlling the target virtual machine to run the target business scenario includes: In the case that the target virtual machine includes multiple first virtual machines, the multiple first virtual machines are controlled to run the first business scenario, wherein the first business scenario includes at least one of the following: round-trip migration of a virtual machine, concurrent round-trip migration of multiple virtual machines, virtual machine migration that calls one or more migration interfaces, and continuous migration of virtual machines between multiple nodes in a virtual machine cluster, and each of the first virtual machines is used to run at least one of the first business scenarios under at least one load mode, and the load mode includes at least one of the following: full load, empty load, jump load, and gradual load.

7. The method according to claim 5, characterized in that In a case where the target business scenario includes the second business scenario, controlling the target virtual machine to run the target business scenario includes: In the case where the target virtual machine includes a plurality of second virtual machines, controlling a first part of the plurality of second virtual machines to run a first sub-business scenario, wherein the first sub-business scenario includes: running a load of at least one load mode, the load mode including at least one of the following: full load, empty load, jump load, and gradual load; Control a second part of the multiple second virtual machines to run a second sub-business scenario, wherein the second sub-business scenario is to create an image file while continuously performing read and write operations inside the virtual machine, and the second business scenario includes the first sub-business scenario and the second sub-business scenario.

8. The method according to claim 1, characterized in that Before testing the target business scenario of the target virtual machine to obtain a second test result of the target kernel, the method further includes: The target virtual machine is created using a target image file, wherein a target load tool and load scripts of multiple load modes are pre-installed in the target image file, and the target load tool is used to use the load script to build the target business scenario, and the load mode includes at least one of the following: full load, empty load, jump load, and gradual load.

9. The method according to any one of claims 1 to 8, characterized in that The testing of the node abnormality scenario of the target node to obtain a third test result of the target kernel includes: Control the target node to run the node abnormal scenario; When the running time of the node abnormality scenario is greater than or equal to the fourth time threshold, the third test result is obtained.

10. The method according to claim 9, characterized in that The controlling the target node to run the node abnormal scenario includes: Using a target memory tool to occupy the memory of the target node, continuously executing the first sub-time, and obtaining a third sub-test result, wherein the target memory tool is used to perform a memory stress test; Controlling the second service module to restart repeatedly, continuously executing for a second sub-time, and obtaining a fourth sub-test result; The target node is controlled to continuously back up data to the target cluster, and the third sub-time is continuously executed to obtain a fifth sub-test result, wherein the third test result includes the third sub-test result, the fourth sub-test result and the fifth sub-test result.

11. A node testing device, characterized in that: include: a first test unit, configured to test a target service module of a target node to obtain a first test result of a target kernel, wherein the target service module is configured to process a target service of the target node, the target kernel is a kernel corresponding to the target node, and the first test result is configured to indicate a virtual machine state of a target virtual machine on the target node and a node state of the target node; a second testing unit, configured to test a target business scenario of the target virtual machine to obtain a second test result of the target kernel, wherein the target business scenario includes at least one of the following: a first business scenario associated with virtual machine migration and a second business scenario unrelated to virtual machine migration, and the second test result is used to represent a virtual machine state of the target virtual machine and a node state of the target node; The third test unit is used to test the node abnormality scenario of the target node to obtain the third test result of the target kernel, wherein the node abnormality scenario includes at least one of the following: node memory leakage, repeated restart of the second service module on the node, and continuous data backup to the target cluster, the target cluster is used for data storage, the third test result is used to represent the virtual machine state of the target virtual machine and the node state of the target node, and the test results of the target kernel include the first test result, the second test result and the third test result.

12. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 10 when executed.

13. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 10 through the computer program.

Citation Information

Patent Citations

  • Automatic testing platform for virtual computing system

    CN101986280A

  • Virtual machine recovering method and virtual machine migration method , device and system

    CN103440160A

  • Method for testing storage performance using virtual machine

    CN107092541A

  • Exception handling method and device for virtual machine thermal migration, and storage medium

    CN108255576A

  • A virtual machine security migration method

    CN109684037A