Fault drill method, device, computer equipment and storage medium

The fault drill method is used to identify potential fault problems in system testing, which solves the problem of being unable to identify vulnerable links in the system in the existing technology, and improves the fault tolerance and recoverability of the system.

CN112631846BActive Publication Date: 2024-10-01GUANGZHOU PINWEI SOFTWARE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202011574272.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-25
Publication Date
2024-10-01
Estimated Expiration
2040-12-25

AI Technical Summary

Technical Problem

The existing technology can only perform fixed tests based on predetermined scenarios during system testing, and cannot identify fragile and failure-prone links in the system before abnormal behavior is triggered, making it difficult to discover potential robustness issues in complex production environments.

Method used

Provide a fault drill method that receives user requests, generates drill tasks, determines target equipment, performs fault injection operations, and generates reports based on fault drill results to identify potential fault issues. The method includes a task generation module, a fault injection module, a task execution module and a report generation module, and supports multiple fault activity types such as network, JVM, CPU, memory and disk.

Benefits of technology

By simulating multiple fault scenarios, we can identify vulnerable links in the system, improve the system's fault tolerance and recoverability, reduce business losses, and improve the system's fault tolerance for extreme scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112631846B_ABST
    Figure CN112631846B_ABST
Patent Text Reader

Abstract

The present invention discloses a fault drill method, device, computer equipment and storage medium, the method comprising: receiving a drill request from a user, generating a drill task according to the drill request, determining a target device to be drilled in a target system to be drilled according to the drill task, performing a fault injection operation on the target device, performing a fault drill operation on the target device after the fault injection using the drill task, obtaining a fault drill result of the target device, generating a drill report according to the fault drill result, so as to subsequently determine whether there is a potential fault problem in the target system according to the drill report. The present invention simulates various types of fault scenarios, identifies vulnerable and fault-prone links in the system before abnormal behavior is triggered, discovers potential robustness problems, and improves the fault tolerance and recoverability of the system in the production environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a fault drill method, device, computer equipment and storage medium. Background Art

[0002] With the rapid development of digitalization in the computer service and software industries, more and more technologies (big data, distributed, blockchain, artificial intelligence, etc.) are being applied in the Internet field. However, since large websites in the Internet industry have many users, large traffic, high concurrency, massive data, high service availability, poor security environment, and are vulnerable to network attacks, they have many functions, change faster, and release frequently, which puts higher requirements on technology.

[0003] At present, when conducting system testing, only fixed tests can be performed according to the predetermined test scenarios. However, in a complex production environment, there are many accidental factors, and it is necessary to discover the robustness problems of the production system from multiple dimensions. For example, since distributed systems contain a large number of interactions and dependencies, there are countless places where errors may occur, such as hard disk failure, network failure, and traffic surges that overwhelm the system. When actually running distributed systems in a production environment, manpower cannot completely prevent failures from occurring.

[0004] Therefore, it is urgent to propose a new fault drill method to solve the above problems. Summary of the invention

[0005] In order to solve the problems of the prior art, an embodiment of the present invention provides a fault drill method, apparatus, computer equipment and storage medium to overcome the problems in the prior art that when conducting system testing, only fixed tests can be performed according to predetermined test scenarios, and the fragile and fault-prone links in the system cannot be identified before abnormal behavior is triggered.

[0006] In order to solve one or more of the above technical problems, the technical solution adopted by the present invention is:

[0007] In a first aspect, a fault drill method is provided, the method comprising the following steps:

[0008] Receiving a drill request from a user, and generating a drill task according to the drill request;

[0009] Determine a target device to be drilled in the target system to be drilled according to the drill task, and perform a fault injection operation on the target device;

[0010] Using the drill task, a fault drill operation is performed on the target device after the fault is injected, and a fault drill result of the target device is obtained;

[0011] A drill report is generated according to the fault drill result, so as to subsequently determine whether the target system has a potential fault problem according to the drill report.

[0012] Further, the receiving a drill request from a user and generating a drill task according to the drill request includes:

[0013] Receive a drill request from a user, and determine a corresponding fault activity type and an environment type for performing a drill operation according to the drill request;

[0014] Selecting a corresponding fault activity from a plurality of pre-configured fault activities according to the fault activity type, and configuring an execution environment according to the environment type;

[0015] A drill task corresponding to the drill request is generated according to the fault activity and the execution environment.

[0016] Furthermore, the method also includes a configuration process of the fault activity, including:

[0017] A corresponding initial fault activity is created for each activity type, parameters are configured for the initial fault activity, and a final fault activity is generated in combination with a preset drill tool.

[0018] Further, configuring the execution environment according to the environment type includes:

[0019] Matching a corresponding execution environment from a pre-configured functional environment list according to the environment type;

[0020] Or, configure the corresponding execution environment in real time according to the environment type.

[0021] Furthermore, the fault activity type includes at least one of network, JVM, CPU, memory, disk, and process.

[0022] Further, performing a fault injection operation on the target device includes:

[0023] A preset drill tool is started in the target device, and a corresponding fault is injected into the target device.

[0024] In a second aspect, a fault drill device is provided, the device comprising:

[0025] A task generation module, used to receive a drill request from a user and generate a drill task according to the drill request;

[0026] A fault injection module, used to determine a target device to be drilled in a target system to be drilled according to the drill task, and perform a fault injection operation on the target device;

[0027] A task execution module, used to perform a fault drill operation on the target device after the fault is injected using the drill task, and obtain a fault drill result of the target device;

[0028] The report generation module is used to generate a drill report according to the fault drill result, so as to judge whether the target system has potential fault problems according to the drill report.

[0029] Furthermore, the task generation module is specifically used to:

[0030] Receive a drill request from a user, and determine a corresponding fault activity type and an environment type for performing a drill operation according to the drill request;

[0031] Selecting a corresponding fault activity from a plurality of pre-configured fault activities according to the fault activity type, and configuring an execution environment according to the environment type;

[0032] A drill task corresponding to the drill request is generated according to the fault activity and the execution environment.

[0033] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:

[0034] Receiving a drill request from a user, and generating a drill task according to the drill request;

[0035] Determine a target device to be drilled in the target system to be drilled according to the drill task, and perform a fault injection operation on the target device;

[0036] Using the drill task, a fault drill operation is performed on the target device after the fault is injected, and a fault drill result of the target device is obtained;

[0037] A drill report is generated according to the fault drill result, so as to subsequently determine whether the target system has a potential fault problem according to the drill report.

[0038] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0039] Receiving a drill request from a user, and generating a drill task according to the drill request;

[0040] Determine a target device to be drilled in the target system to be drilled according to the drill task, and perform a fault injection operation on the target device;

[0041] Using the drill task, a fault drill operation is performed on the target device after the fault is injected, and a fault drill result of the target device is obtained;

[0042] A drill report is generated according to the fault drill result, so as to subsequently determine whether the target system has a potential fault problem according to the drill report.

[0043] The technical solution provided by the embodiment of the present invention has the following beneficial effects:

[0044] The fault drill method, apparatus, computer equipment and storage medium provided in the embodiments of the present invention receive a drill request from a user, generate a drill task according to the drill request, determine a target device to be drilled in the target system to be drilled according to the drill task, perform a fault injection operation on the target device, use the drill task to perform a fault drill operation on the target device after the fault is injected, obtain the fault drill result of the target device, generate a drill report according to the fault drill result, so as to subsequently judge whether the target system has potential fault problems according to the drill report, and by simulating various types of fault scenarios, identify the vulnerable and fault-prone links in the system before abnormal behavior is triggered, discover potential robustness problems, and improve the fault tolerance and recoverability of the system in the production environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0046] Figure 1 is an architecture diagram of a chaos engineering-based fault drill platform according to an exemplary embodiment;

[0047] Figure 2 is a flow chart of a fault drill method according to an exemplary embodiment;

[0048] Figure 3 is a structural schematic diagram of a fault drill device according to an exemplary embodiment;

[0049] Figure 4 It is a schematic diagram of the internal structure of a computer device according to an exemplary embodiment. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0051] As described in the background technology, traditional testing usually starts from the user's perspective and conducts a series of test behaviors. It cannot be fully automated and requires manual participation. It can only perform fixed tests according to the predetermined test scenarios. However, in a complex production environment, there are many accidental factors, and it is easy to miss tests. In addition, traditional tests are all performed in a production-like environment, not directly in a production environment, so the test results cannot be guaranteed to be accurate.

[0052] To solve the above problems, the embodiment of the present invention creatively proposes a fault drill method, which simulates any possible faults, such as hardware faults, application faults, network faults, and cluster fault lights, by implementing fault injection in specific scenarios. It can simulate the possibility of failures in the actual operation of the production system, discover production system problems from multiple dimensions, and perform operation and maintenance to meet the needs of identifying faults in the system. Automated testing can be performed to discover potential robustness issues and prevent testers from missing tests, which can reduce business losses, expose major risks in advance within a controllable range, improve system elasticity, and continuously verify the system's fault tolerance for extreme scenarios.

[0053] In order to execute the above fault drill method, an embodiment of the present invention further provides a fault drill platform based on chaos engineering. The overall architecture of the platform is as follows: Figure 1 As shown, the platform is implemented based on VUE+SpringMVC. The platform can have the following functions, and the implementation process of each function is as follows:

[0054] 1. Automated operation and maintenance process.

[0055] The user triggers the message on the front end or schedules the message, and the backend service generates a message based on the parameters passed by the user, and passes it to the automated executor through RabbitMq. After receiving the message, the executor parses the message, finds the corresponding operation and maintenance template, and passes the parameters to the execution template for execution. During the execution process, the application execution log is fed back to the executor, and the executor inserts the log into the Redis cache. The front-end page reads the cache in seconds, displays the front-end page in real time, feeds back to the user, and records it in the database.

[0056] 2. Monitoring system integration.

[0057] Users can classify all hosts through the front-end user asset management. After classification, users trigger monitoring on the asset management page, and the system will install and automatically configure the monitoring client for the target host through the automated operation and maintenance system. After the configuration is completed, the system pushes the host information to the Zabbix system and adds it to the corresponding group. Zabbix monitors and alerts the discovered automatic monitoring points based on the automatic discovery strategy in the group. OEOP displays all monitoring points in a centralized dashboard.

[0058] 3. Automatic installation of physical machine operating system.

[0059] The user selects the target operating system on the front-end page, and the system will automatically generate an operating system template based on the user's network configuration and provide a preview for custom modifications to meet different installation requirements. After the user confirms the template, the system pushes it to the automated executor, which triggers Cobbler to broadcast DHCP and add installation program configuration. The executor then remotely triggers the physical machine to enter the automated installation system mode, completes the automated installation under the control of Cobbler, and reports the installation status in stages. The executor will continue to monitor the system installation until it is completed.

[0060] 4. Test database management.

[0061] The user adds the target managed database in the management interface and authorizes it. After the developer submits the test, the DDL is submitted for review in the production database management system. After the manager and DBA review it, the DDL is pushed to OEOP. After receiving the message, OEOP will search for the database that needs to be automatically changed in the management list and automatically complete the change.

[0062] 5. Basic data management.

[0063] Implement classified management of machine information, including management IP, hardware information, classification and grouping. Regular management of the status of all machines.

[0064] 6. Self-service Q&A.

[0065] Managers classify all common questions and sort out keywords. When users ask questions on the front-end page, the system will segment the questions, match the keywords in the knowledge base, sort the matching degree of all matching keywords, and display several knowledge points with high matching degrees for the questioner to evaluate. If the matching accuracy reaches 90%, the answer will be directly output. In addition, self-service Q&A supports self-service matching. If a self-service is matched, a self-service entrance will be provided for users to use quickly.

[0066] The above-mentioned chaos engineering-based fault drill platform specifically includes the following steps in the process of performing fault drills:

[0067] Step 1: Create a fault activity.

[0068] Specifically, activities are the basic units of drill tasks, which are used to simulate the failures that the system may encounter in actual operation, such as hardware failures, application failures, network failures, cluster failures, etc. Platform administrators can create corresponding drill activities on the front-end page, define user input parameters, and cooperate with drill tools to form failure activities for each scenario. According to the failure scenario, the types of activities can also be roughly divided into network, JVM, CPU, memory, disk, process and other types. Among them, JVM is the abbreviation of Java Virtual Machine. JVM is a specification for computing devices. It is a fictional computer that is implemented by simulating various computer functions on an actual computer. The CPU (central processing unit) is the computing and control core of the computer system and is the final execution unit for information processing and program running.

[0069] When creating a fault activity, you need to configure parameters, including but not limited to the following:

[0070] Available configurations: Configure the stage in which the fault activity is executed in the drill task;

[0071] Association preparation phase: configure the preparation work required before executing the fault activity;

[0072] Associated recovery phase activities: configure the work to be done after the failure activity is completed;

[0073] Parameter configuration: configure the input parameters when executing specific drill tasks. Different types of fault activities correspond to different parameters.

[0074] It should be noted that when creating an activity, different types of faults correspond to different parameters. For example, when the JVM process CPU usage is full, two parameters are added:

[0075] 1. --process refers to the Java process, that is, the process for which the fault activity is executed;

[0076] 2. --cpu-count refers to the number of CPU cores, that is, specify how many cores are fully loaded.

[0077] Step 2: Implement environmental management.

[0078] Specifically, the scenarios supported by the platform support both offline and online, and support various machine types. Users can manage their own rehearsal environment in the platform. In an embodiment of the present invention, the execution environment can be automatically synchronized from a preset service, such as synchronizing the PAAS functional environment list of the PAAS platform, or it can be an environment manually created by the user, that is, it supports users to manually create an execution environment according to actual needs, and configures a separate host list for the execution environment manually created by the user. Among them, PAAS (Platform Asa Service) refers to Platform as a Service, which means providing the server platform as a service.

[0079] Step 3: Arrangement of drill tasks.

[0080] Specifically, a complete drill task usually includes preparation, execution, inspection, recovery, etc. Users create a drill task on the front-end page, select a fault activity that meets their actual needs from the fault activities created in the above steps, and provide all the parameters required for the fault activity to compose a complete drill task.

[0081] It should be noted that, in the embodiment of the present invention, each drill task has the following three stages:

[0082] 1. The preparation phase is a prerequisite for executing a task. For example, if an activity requires injecting JVM faults, it is necessary to install the JVM agent (i.e., the drill tool) before injecting the faults.

[0083] 2. The execution phase is a series of activities to inject faults into the target device;

[0084] 3. The recovery phase is the recovery action after fault injection. If the configured activity has automatic recovery, it will be automatically added to the recovery phase.

[0085] Step 4: Fault injection process.

[0086] Specifically, relevant drill tools (such as Agent) are started in all target devices. Users trigger drill tasks through the front-end page. The platform will find the host involved in the drill task and control its Agent to inject the fault. The target device is the device that executes the drill task in the target system to be drilled.

[0087] When performing fault injection operations, you also need to configure the following parameters:

[0088] 1. Exercise object parameters: including but not limited to exercise domain name, exercise host parameters, etc.;

[0089] 2. Specific activity parameters: The specific activity parameters of each fault activity are different. The specific parameter fields can be configured in the activity, such as the parameters "--process" and "--cpu-count" in the JVM process CPU usage full load activity. They are not listed here one by one.

[0090] 3. Common parameters: including but not limited to the waiting time before execution and the waiting time after execution. Each fault activity has its own parameters, which are used to determine the duration of the fault or activity. For example, if the waiting time after execution is 100 seconds, it means that the next activity will be executed 100 seconds after the execution of this activity.

[0091] Specifically, in the embodiment of the present invention, manual operation of the drill task is also supported. On the front-end page of creating the drill task, configure the "Is it a manual task" option. Checking it indicates that the drill task is performed manually. All operations are not completed through this system, but need to be manually operated on the host. This drill task method is mainly provided to record and track the results of the domain, which is convenient for users to view.

[0092] Step 5: Generate a drill report.

[0093] Specifically, after using the drill task to perform a fault drill operation on the target device after the fault is injected and obtaining the fault drill result of the target device, it is also necessary to generate a drill report based on the fault drill result. The drill report page is used to count and display information related to the drill results of each domain. In an embodiment of the present invention, the drill report can be exported and viewed in a table format (such as Excel).

[0094] Figure 2 is a flowchart of a fault drill method according to an exemplary embodiment. Figure 2 As shown, the method comprises the following steps:

[0095] S1: receiving a drill request from a user, and generating a drill task according to the drill request.

[0096] Specifically, a fault drill platform based on chaos engineering receives a drill request from a user, and the drill request includes, but is not limited to, information such as the fault activity type, the execution environment, and the target device for executing the drill task.

[0097] S2: determining a target device to be drilled in the target system to be drilled according to the drill task, and performing a fault injection operation on the target device.

[0098] Specifically, in the embodiment of the present invention, fault injection is implemented through code to solve the problem of difficulty in simulating related scenarios in manual testing.

[0099] S3: Perform a fault drill operation on the target device after the fault is injected using the drill task to obtain a fault drill result of the target device.

[0100] S4: Generate a drill report based on the fault drill results, so as to determine whether the target system has potential fault problems based on the drill report.

[0101] As a preferred implementation manner, in the embodiment of the present invention, the receiving of the drill request from the user and the generating of the drill task according to the drill request include:

[0102] Receive a drill request from a user, and determine a corresponding fault activity type and an environment type for performing a drill operation according to the drill request;

[0103] Selecting a corresponding fault activity from a plurality of pre-configured fault activities according to the fault activity type, and configuring an execution environment according to the environment type;

[0104] A drill task corresponding to the drill request is generated according to the fault activity and the execution environment.

[0105] As a preferred implementation, in the embodiment of the present invention, the method further includes a configuration process of the fault activity, including:

[0106] A corresponding initial fault activity is created for each activity type, parameters are configured for the initial fault activity, and a final fault activity is generated in combination with a preset drill tool.

[0107] Specifically, in the embodiment of the present invention, various types of failure scenarios are simulated, including but not limited to hardware failure, application failure, network failure, cluster failure, etc. Corresponding to each failure scenario, the types of fault activities created can also be roughly divided into network, JVM, CPU, memory, disk, process and other types.

[0108] As a preferred implementation, in an embodiment of the present invention, configuring the execution environment according to the environment type includes:

[0109] Matching a corresponding execution environment from a pre-configured functional environment list according to the environment type;

[0110] Or, configure the corresponding execution environment in real time according to the environment type.

[0111] Specifically, the execution environment can be automatically synchronized from a preset service, such as synchronizing the PAAS functional environment list of the PAAS platform, or it can be manually created by the user.

[0112] As a preferred implementation manner, in an embodiment of the present invention, the fault activity type includes at least one of network, JVM, CPU, memory, disk, and process.

[0113] As a preferred implementation manner, in an embodiment of the present invention, performing a fault injection operation on the target device includes:

[0114] A preset drill tool is started in the target device, and a corresponding fault is injected into the target device.

[0115] Figure 3 is a schematic diagram of a fault drill device according to an exemplary embodiment. Figure 3 As shown, the device comprises:

[0116] A task generation module, used to receive a drill request from a user and generate a drill task according to the drill request;

[0117] A fault injection module, used to determine a target device to be drilled in a target system to be drilled according to the drill task, and perform a fault injection operation on the target device;

[0118] A task execution module, used to perform a fault drill operation on the target device after the fault is injected using the drill task, and obtain a fault drill result of the target device;

[0119] The report generation module is used to generate a drill report according to the fault drill result, so as to judge whether the target system has potential fault problems according to the drill report.

[0120] As a preferred implementation, in the embodiment of the present invention, the task generation module is specifically used for:

[0121] Receive a drill request from a user, and determine a corresponding fault activity type and an environment type for performing a drill operation according to the drill request;

[0122] Selecting a corresponding fault activity from a plurality of pre-configured fault activities according to the fault activity type, and configuring an execution environment according to the environment type;

[0123] A drill task corresponding to the drill request is generated according to the fault activity and the execution environment.

[0124] As a preferred implementation, in the embodiment of the present invention, the device further includes:

[0125] The activity creation module is used to create a corresponding initial fault activity for each activity type, configure parameters for the initial fault activity, and generate a final fault activity in combination with a preset drill tool.

[0126] As a preferred implementation, in the embodiment of the present invention, the device further includes:

[0127] The environment configuration module is used to match the corresponding execution environment from a pre-configured functional environment list according to the environment type; or to configure the corresponding execution environment in real time according to the environment type.

[0128] As a preferred implementation manner, in an embodiment of the present invention, the fault activity type includes at least one of network, JVM, CPU, memory, disk, and process.

[0129] As a preferred implementation, in the embodiment of the present invention, the fault injection module is specifically used for:

[0130] A preset drill tool is started in the target device, and a corresponding fault is injected into the target device.

[0131] Figure 4 is a schematic diagram of the internal structure of a computer device according to an exemplary embodiment. Figure 4 As shown, the computer device includes a processor, a memory and a network interface connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an optimization method for an execution plan is implemented.

[0132] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0133] As a preferred implementation, in an embodiment of the present invention, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:

[0134] Receiving a drill request from a user, and generating a drill task according to the drill request;

[0135] Determine a target device to be drilled in the target system to be drilled according to the drill task, and perform a fault injection operation on the target device;

[0136] Using the drill task, a fault drill operation is performed on the target device after the fault is injected, and a fault drill result of the target device is obtained;

[0137] A drill report is generated according to the fault drill result, so as to subsequently determine whether the target system has a potential fault problem according to the drill report.

[0138] As a preferred implementation, in the embodiment of the present invention, the processor further implements the following steps when executing the computer program:

[0139] Receive a drill request from a user, and determine a corresponding fault activity type and an environment type for performing a drill operation according to the drill request;

[0140] Selecting a corresponding fault activity from a plurality of pre-configured fault activities according to the fault activity type, and configuring an execution environment according to the environment type;

[0141] A drill task corresponding to the drill request is generated according to the fault activity and the execution environment.

[0142] As a preferred implementation, in the embodiment of the present invention, the processor further implements the following steps when executing the computer program:

[0143] A corresponding initial fault activity is created for each activity type, parameters are configured for the initial fault activity, and a final fault activity is generated in combination with a preset drill tool.

[0144] As a preferred implementation, in the embodiment of the present invention, the processor further implements the following steps when executing the computer program:

[0145] Matching a corresponding execution environment from a pre-configured functional environment list according to the environment type;

[0146] Or, configure the corresponding execution environment in real time according to the environment type.

[0147] As a preferred implementation manner, in an embodiment of the present invention, the fault activity type includes at least one of network, JVM, CPU, memory, disk, and process.

[0148] As a preferred implementation, in the embodiment of the present invention, the processor further implements the following steps when executing the computer program:

[0149] A preset drill tool is started in the target device, and a corresponding fault is injected into the target device.

[0150] In an embodiment of the present invention, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0151] Receiving a drill request from a user, and generating a drill task according to the drill request;

[0152] Determine a target device to be drilled in the target system to be drilled according to the drill task, and perform a fault injection operation on the target device;

[0153] Using the drill task, a fault drill operation is performed on the target device after the fault is injected, and a fault drill result of the target device is obtained;

[0154] A drill report is generated according to the fault drill result, so as to subsequently determine whether the target system has a potential fault problem according to the drill report.

[0155] As a preferred implementation, in the embodiment of the present invention, when the computer program is executed by the processor, the following steps are also implemented:

[0156] Receiving a drill request from a user, and generating a drill task according to the drill request;

[0157] Determine a target device to be drilled in the target system to be drilled according to the drill task, and perform a fault injection operation on the target device;

[0158] Using the drill task, a fault drill operation is performed on the target device after the fault is injected, and a fault drill result of the target device is obtained;

[0159] A drill report is generated according to the fault drill result, so as to subsequently determine whether the target system has a potential fault problem according to the drill report.

[0160] As a preferred implementation, in the embodiment of the present invention, when the computer program is executed by the processor, the following steps are also implemented:

[0161] A corresponding initial fault activity is created for each activity type, parameters are configured for the initial fault activity, and a final fault activity is generated in combination with a preset drill tool.

[0162] As a preferred implementation, in the embodiment of the present invention, when the computer program is executed by the processor, the following steps are also implemented:

[0163] Matching a corresponding execution environment from a pre-configured functional environment list according to the environment type;

[0164] Or, configure the corresponding execution environment in real time according to the environment type.

[0165] As a preferred implementation manner, in an embodiment of the present invention, the fault activity type includes at least one of network, JVM, CPU, memory, disk, and process.

[0166] As a preferred implementation, in the embodiment of the present invention, when the computer program is executed by the processor, the following steps are also implemented:

[0167] A preset drill tool is started in the target device, and a corresponding fault is injected into the target device.

[0168] In summary, the technical solution provided by the embodiment of the present invention has the following beneficial effects:

[0169] The fault drill method, apparatus, computer equipment and storage medium provided in the embodiments of the present invention receive a drill request from a user, generate a drill task according to the drill request, determine a target device to be drilled in the target system to be drilled according to the drill task, perform a fault injection operation on the target device, use the drill task to perform a fault drill operation on the target device after the fault is injected, obtain the fault drill result of the target device, generate a drill report according to the fault drill result, so as to subsequently judge whether the target system has potential fault problems according to the drill report, and by simulating various types of fault scenarios, identify the vulnerable and fault-prone links in the system before abnormal behavior is triggered, discover potential robustness problems, and improve the fault tolerance and recoverability of the system in the production environment.

[0170] It should be noted that: the fault drill device provided in the above embodiment only uses the division of the above functional modules as an example when triggering the drill service. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the fault drill device provided in the above embodiment belongs to the same concept as the fault drill method embodiment, that is, the device is based on the fault drill method. The specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0171] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0172] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A fault drill method, characterized in that: The method comprises the following steps: Receiving a drill request from a user, and generating a drill task according to the drill request; Determine a target device to be drilled in the target system to be drilled according to the drill task, and perform a fault injection operation on the target device; Using the drill task, a fault drill operation is performed on the target device after the fault is injected, and a fault drill result of the target device is obtained; Generate a drill report according to the fault drill result, so as to judge whether there is a potential fault problem in the target system according to the drill report; The receiving a drill request from a user and generating a drill task according to the drill request includes: Receive a drill request from a user, and determine a corresponding fault activity type and an environment type for performing a drill operation according to the drill request; Selecting a corresponding fault activity from a plurality of pre-configured fault activities according to the fault activity type, and configuring an execution environment according to the environment type; Generate a drill task corresponding to the drill request according to the fault activity and the execution environment; When performing the fault injection operation, the method further includes: Configure the drill object parameters, wherein the drill object parameters include the drill domain name and the drill host parameters.

2. The fault drill method according to claim 1, characterized in that: The method also includes a configuration process of a fault activity, including: A corresponding initial fault activity is created for each activity type, parameters are configured for the initial fault activity, and a final fault activity is generated in combination with a preset drill tool.

3. The fault drill method according to claim 1, characterized in that: Configuring the execution environment according to the environment type includes: According to the environment type, a corresponding execution environment is matched from a pre-configured functional environment list; or, according to the environment type, a corresponding execution environment is configured in real time.

4. The fault drill method according to claim 1, characterized in that: The fault activity type includes at least one of network, JVM, CPU, memory, disk, and process.

5. The fault drill method according to claim 1, characterized in that: The performing a fault injection operation on the target device comprises: A preset drill tool is started in the target device, and a corresponding fault is injected into the target device.

6. A fault drill device for implementing the method of claim 1, characterized in that: The device comprises: A task generation module, used to receive a drill request from a user and generate a drill task according to the drill request; A fault injection module, used to determine a target device to be drilled in a target system to be drilled according to the drill task, and perform a fault injection operation on the target device; A task execution module, used to perform a fault drill operation on the target device after the fault is injected using the drill task, and obtain a fault drill result of the target device; A report generation module, used to generate a drill report according to the fault drill result, so as to judge whether the target system has a potential fault problem according to the drill report; The task generation module is specifically used for: Receive a drill request from a user, and determine a corresponding fault activity type and an environment type for performing a drill operation according to the drill request; Selecting a corresponding fault activity from a plurality of pre-configured fault activities according to the fault activity type, and configuring an execution environment according to the environment type; A drill task corresponding to the drill request is generated according to the fault activity and the execution environment.

7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Client application fault drill method and device

    CN108259244A

  • Service fault identification method and device,equipment and storage medium

    CN110851311A

  • Hardware circuit fault injection test method, device and system, equipment and medium

    CN111459735A

  • Fault injection method and device, electronic equipment and storage medium

    CN111651353A

  • Fault injection testing apparatus and method

    US20190205233A1