Fault injection system, method, medium and equipment

CN118567989APending Publication Date: 2024-08-30PINGAN YIQIANBAO E COMMERCE CO LTD
0 Cites 0 Cited by

Patent Information

Application Number
CN202410718524.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing technology makes it difficult to achieve fast and efficient process-level fault simulation in performance testing of product equipment, and fault injection and recovery require manual confirmation, which limits the efficiency of reliability testing and automated testing.

Method used

Using coordinated cluster Zookeeper, console units and executors, by pre-writing fault injection rules, monitoring task status, and selecting the executor with the lowest load for fault injection when the fault injection task is executed, automatic fault injection and task management are achieved to ensure Timely termination of failed tasks and high availability of resources.

Benefits of technology

It realizes fast and efficient process-level fault simulation, supports automated testing, avoids the problem of fault injection tasks not being terminated in time, improves the reliability and efficiency of the system, has horizontal expansion characteristics, and is suitable for large-scale fault injection drills.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567989A
    Figure CN118567989A
Patent Text Reader

Abstract

The invention provides a fault injection system and method, a medium and equipment, and the system comprises a coordination cluster Zookeeper which is used for controlling the registration of component cluster information and the registration of actuator cluster information; the console unit is used for pre-compiling a fault injection rule; constructing a complete fault injection rule for the control component to use according to parameters in the fault injection rule; the control component is used for monitoring the running state of the fault injection task; and the actuator is used for receiving the fault injection task and performing fault injection according to the type after receiving the task. The method comprises the following steps: registering cluster information of a control component and an actuator by utilizing a coordination cluster Zookeeper; pre-compiling a fault injection rule by using the console unit; a leader control component is selected from the control component; and selecting a fault injection with the lowest load by using the control component when the execution of the fault injection task begins, and registering a corresponding type of fault for the current ip machine by using the actuator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of fault injection, and more specifically, to a fault injection system, method, medium and device. Background Art

[0002] During the performance testing of product equipment, some fault scenario tests are needed to evaluate the reliability of the product. In order to complete these tests, it is necessary to simulate the faults of the processes in the equipment.

[0003] Fault injection drills are an essential testing step for medium and large companies, and they verify the reliability and availability of business system programs under fault scenarios.

[0004] Based on some open source fault injection tools (such as chaosblade or custom script tools), single machine fault injection can be well implemented. However, this purely manual operation method is not conducive to periodic and large-scale fault injection drills, and fault injection and recovery require manual confirmation.

[0005] In the related technology, methods such as killing the process, stopping the process, or changing the state of the process in the kernel state are generally used. However, these methods are all peripheral failures of the process, and most process-level failures cannot be simulated. Another method is to use a function container or ptrace (a debugging function) to replace the function to modify the execution function to simulate the process failure. However, this method is not suitable for all programming languages, and different programming languages ​​need to be re-implemented, and different functions also need to be re-modified and compiled before they can be used, which is inefficient and not conducive to reliability testing and automated testing.

[0006] Therefore, how to achieve fast and efficient process-level fault simulation to facilitate reliability testing and automated testing of product equipment is an urgent problem to be solved by those skilled in the art. Summary of the invention

[0007] To solve the problem that the fault injection test of the existing technology cannot meet the user's needs for manual verification; to solve the technical problem of achieving fast and efficient process-level fault simulation to facilitate reliability testing and automated testing of product equipment.

[0008] To achieve the above technical objectives, the present disclosure provides a fault injection system, including:

[0009] Coordinates the cluster Zookeeper, which is responsible for controlling the registration of component cluster information and executor cluster information;

[0010] A console unit, used to pre-write fault injection rules, wherein the fault injection rules include: application name, IP list, injection fault type, duration, start time and / or period;

[0011] Constructing a complete fault injection rule for use by the control component according to the parameters in the fault injection rule;

[0012] The control component is used to monitor the running status of the fault injection task;

[0013] The executor is used to receive fault injection tasks and perform fault injection according to the type after receiving the tasks.

[0014] Furthermore, the control component is specifically used to monitor the running status of the task, and when the processing end time is reached, a command is directly issued to terminate the execution of the faulty task, and the task status at this time is set to completed;

[0015] If the fault injection task fails, a log is recorded and the fault injection task is returned.

[0016] Furthermore, the control component is also used to set the task status to abnormal if the fault injection task is repeatedly triggered three times and is still abnormal, and will not be executed subsequently.

[0017] To achieve the above technical objectives, the present disclosure can also provide a fault injection method, which is applied to the above fault injection system, and the method includes:

[0018] Use the coordination cluster Zookeeper to register the cluster information of the control components and executors;

[0019] Pre-write fault injection rules using console units;

[0020] The control component elects a leading control component;

[0021] The control component is used to select a fault with the lowest load when the fault injection task starts to be executed, and the executor registers the corresponding type of fault to the current IP machine.

[0022] Furthermore, the fault injection rules specifically include:

[0023] Application name, IP list, injected fault type, duration, start time and / or period;

[0024] A complete fault injection rule is constructed according to the parameters in the fault injection rule for use by the control component.

[0025] Further, the control component election leadership control component specifically includes:

[0026] Determine whether the current control component has succeeded in the election. If successful, the current control component is the leader control component, which is used to monitor the survival status of other non-leader control components and determine whether there are any abnormalities. If there are any abnormalities, its tasks are reallocated to other control components. If there are no abnormalities, the current control component continues to execute the current fault injection task;

[0027] If unsuccessful, the current control component continues to execute the current fault injection task.

[0028] Further, in the step of using the control component to select a fault with the lowest load at the beginning of the fault injection task execution to inject the executor into the current IP machine to register the corresponding type of fault, the leader control component is used to monitor whether the fault injection task is executed successfully. If successful, the task execution status is set to success; if unsuccessful, the fault injection task is returned.

[0029] Further, the method of using the control component to select a fault with the lowest load when the fault injection task starts to be executed and injecting the executor into the current IP machine to register the corresponding type of fault specifically includes:

[0030] The executor registers component information in the coordination cluster Zookeeper;

[0031] Receive the fault injection task and register the running information to the coordination cluster Zookeeper, and synchronously modify the current load number data;

[0032] If the current task is completed, the task status in the coordination cluster Zookeeper is marked as completed.

[0033] To achieve the above technical objectives, the present disclosure can also provide a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, it is used to implement the steps of the above fault injection method.

[0034] To achieve the above technical objectives, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above fault injection method when executing the computer program.

[0035] The beneficial effects of the present disclosure are:

[0036] 1. The system and method disclosed in the present invention completes the writing of fault injection tasks through Platform.

[0037] 2. In the system and method disclosed in the present invention, the Controller node is elected by the Master node, and the Master node monitors other Controller nodes. When a Controller node is found to be down, the tasks it is managing are sorted out and assigned to other nodes to continue monitoring and terminate processing, thereby avoiding the failure of fault injection tasks to be terminated in time.

[0038] 3. In the system and method of the present invention, the Executor node serves as a fault injection executor and has the characteristic of horizontal scalability. The newly connected Executor node has the lowest load and can be quickly injected with tasks by the Controller node. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A schematic diagram of the process of embodiment 1 of the present disclosure is shown;

[0040] Figure 2 A schematic diagram showing the process of starting and executing tasks of the Controller component;

[0041] Figure 3 A schematic diagram showing the Executor starting the execution process;

[0042] Figure 4 A schematic diagram of the process of Embodiment 2 of the present disclosure is shown;

[0043] Figure 5 A structural schematic diagram of Example 4 of the present disclosure is shown. DETAILED DESCRIPTION

[0044] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0045] Various structural schematic diagrams according to embodiments of the present disclosure are shown in the accompanying drawings. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may further design regions / layers with different shapes, sizes, and relative positions according to actual needs.

[0046] Fault injection drills are an essential testing step for medium and large companies, and they verify the reliability and availability of business system programs under fault scenarios.

[0047] Based on some open source fault injection tools (such as chaosblade or custom script tools), single machine fault injection can be well implemented. However, this purely manual operation method is not conducive to periodic and large-scale fault injection drills, and fault injection and recovery require manual confirmation.

[0048] In the related technology, methods such as killing the process, stopping the process, or changing the state of the process in the kernel state are generally used. However, these methods are all peripheral failures of the process, and most process-level failures cannot be simulated. Another method is to use a function container or ptrace (a debugging function) to replace the function to modify the execution function to simulate the process failure. However, this method is not suitable for all programming languages, and different programming languages ​​need to be re-implemented, and different functions also need to be re-modified and compiled before they can be used, which is inefficient and not conducive to reliability testing and automated testing.

[0049] Therefore, how to achieve fast and efficient process-level fault simulation to facilitate reliability testing and automated testing of product equipment is an urgent problem to be solved by those skilled in the art.

[0050] In order to solve the above technical problems:

[0051] like Figure 1 As shown:

[0052] The present disclosure provides a fault injection system, comprising:

[0053] Coordinates the cluster Zookeeper, which is responsible for controlling the registration of component cluster information and executor cluster information;

[0054] Zookeeper is a distributed, open source distributed application coordination service. It is an open source implementation of Google's Chubby and an important component of Hadoop and Hbase. It is a software that provides consistency services for distributed applications. Its functions include configuration maintenance, domain name services, distributed synchronization, group services, etc.

[0055] The goal of Zookeeper is to encapsulate complex and error-prone critical services and provide users with simple, easy-to-use interfaces and efficient, stable systems.

[0056] Zookeeper consists of a simple set of primitives that provide interfaces in Java and C.

[0057] In Zookeeper, a znode is a node similar to a Unix file system path, where data can be stored or retrieved. If the Flag is set to EPHEMERAL when creating a znode, then when the node that created the znode loses connection with Zookeeper, the znode will no longer exist in Zookeeper. Zookeeper uses Watcher to detect event information. When the client receives event information, such as connection timeout, node data change, child node change, it can call the corresponding behavior to process the data. The Zookeeper Wiki page shows how to use Zookeeper to handle event notifications, queues, priority queues, locks, shared locks, revocable shared locks, and two-phase commits.

[0058] So what can Zookeeper do? Here is a simple example: suppose we have 20 search engine servers (each responsible for searching a portion of the total index) and a total server (responsible for sending search requests to these 20 search engine servers and merging the result sets), a spare total server (responsible for replacing the total server when it goes down), and a web cgi (sending search requests to the total server). 15 of the search engine servers provide search services, and 5 servers are generating indexes. These 20 search engine servers often require the servers that are providing search services to stop providing services and start generating indexes, or the servers generating indexes have already completed index generation and can provide search services. Using Zookeeper can ensure that the total server automatically senses how many servers are providing search engines and sends search requests to these servers, and automatically enables the spare total server when the total server goes down.

[0059] A console unit, used to pre-write fault injection rules, wherein the fault injection rules include: application name, IP list, injection fault type, duration, start time and / or period;

[0060] Constructing a complete fault injection rule for use by the control component according to the parameters in the fault injection rule;

[0061] The control component is used to monitor the running status of the fault injection task;

[0062] The executor is used to receive fault injection tasks and perform fault injection according to the type after receiving the tasks.

[0063] Furthermore, the control component is specifically used to monitor the running status of the task, and when the processing end time is reached, a command is directly issued to terminate the execution of the faulty task, and the task status at this time is set to completed;

[0064] If the fault injection task fails, a log is recorded and the fault injection task is returned.

[0065] Furthermore, the control component is also used to set the task status to abnormal if the fault injection task is repeatedly triggered three times and is still abnormal, and will not be executed subsequently.

[0066] The fault injection system consists of the following four components:

[0067] Coordinate the Zookeeper cluster:

[0068] The Zookeeper cluster is mainly responsible for registering the Controller cluster information and the Executor cluster information, and supports the election and monitoring of the Controller cluster Leader to better achieve high availability.

[0069] Console Unit Platform:

[0070] The console is mainly responsible for writing fault rules.

[0071] The main contents of the rule include: application name, IP list, injection fault type, duration, start time, and cycle;

[0072] A complete fault injection rule is constructed through the above parameters for use by subsequent Controller components.

[0073] Control component Controller cluster:

[0074] The process of starting the Controller component and executing tasks is as follows Figure 2 As shown:

[0075] After the Controller node is started, the current IP information is registered to Zookeeper;

[0076] The Controller node runs for the Leader. If the election is successful, it starts to monitor the survival status of other non-Leader nodes. If a node is found to be abnormal, its tasks are reallocated to other nodes to prevent the tasks from being left unmanaged.

[0077] All Controller nodes can pull fault injection tasks. After pulling the tasks, an Executor with the lowest load is selected to execute the fault injection task at the start time of task execution. At this time, the task status is set to running.

[0078] The Controller monitors the running status of the task. When the processing end time is reached, it directly initiates a command to terminate the execution of the faulty task. At this time, the task status is set to completed; if the task execution fails, the log is recorded and the task is returned to other Controllers to re-trigger the task. If the task is repeatedly triggered for 3 times and still fails, the task status is set to abnormal and will not be executed later.

[0079] Executor cluster:

[0080] This is the real fault injection executor. When the Executor receives the task, it directly registers the corresponding type of fault to the current IP machine.

[0081] The Executor startup execution process is as follows Figure 3 As shown:

[0082] After the Executor node is started, the current node information is registered in Zookeeper;

[0083] The Executor node mainly receives fault injection tasks, and after receiving the tasks, it performs fault injection according to the type;

[0084] The Executor will register the running tasks with Zookeeper, and will then synchronously modify the task execution load of the current Executor. The Controller node will determine the busyness of the Executor based on the load data.

[0085] After the task is completed, the task status is synchronized to the Controller. For tasks that have been executed, the Controller controls the end of the task.

[0086] In the fault injection system described in the present disclosure:

[0087] Both the Controller control platform and the Executor executor can be expanded horizontally. The Executor can be expanded according to the current system busyness. The connected Executor executor can quickly take over new injection tasks.

[0088] The relationship between Controller and Executor is as follows:

[0089] As a lightweight control node, the Controller does not handle heavy tasks.

[0090] All tasks are executed by Executor nodes, and the horizontal scalability of Executor is suitable for scaling up and down fault injection tasks.

[0091] The processing of tasks is done by the Executor node, while the management of tasks is controlled by the Controller node.

[0092] When the Controller node preempts the fault injection task, it selects an Executor with the lowest load to execute the task at the start time of the task execution. At this time, the Controller is responsible for monitoring the execution of the task. After the completion time is reached, it initiates a task termination command to terminate the fault injection.

[0093] If the Controller node crashes during the monitoring process, the Master node in the Controller cluster will detect the crash exception, then sort out the running tasks that the Controller node is monitoring, and assign these tasks to other Controller nodes, which will continue task monitoring and task termination.

[0094] 1. The system disclosed in the present invention completes the writing of fault injection tasks through Platform.

[0095] 2. In the system disclosed in the present invention, the Controller node is elected by the Master node, and the Master node monitors other Controller nodes. When a Controller node is found to be down, the tasks it is managing are sorted out and assigned to other nodes to continue monitoring and terminate processing, thereby avoiding the failure of fault injection tasks to be terminated in time.

[0096] 3. In the system disclosed in the present invention, the Executor node serves as a fault injection executor and has the characteristic of horizontal scalability. The newly connected Executor node has the lowest load and can be quickly injected with tasks by the Controller node.

[0097] Embodiment 2:

[0098] like Figure 4 As shown:

[0099] The present disclosure also provides a fault injection method, which is applied to a fault injection system.

[0100] The system comprises:

[0101] Coordinates the cluster Zookeeper, which is responsible for controlling the registration of component cluster information and executor cluster information;

[0102] A control console unit, used to pre-write fault injection rules; construct a complete fault injection rule for use by the control component according to the parameters in the fault injection rule;

[0103] The control component is used to monitor the running status of the fault injection task;

[0104] The executor is used to receive fault injection tasks and perform fault injection according to the type after receiving the tasks;

[0105] The method comprises:

[0106] S101: Use the coordination cluster Zookeeper to register the cluster information of the control components and executors;

[0107] S102: Pre-write fault injection rules using a console unit;

[0108] S103: The control components are elected as the leading control components;

[0109] S104: using the control component to select a fault with the lowest load when the fault injection task starts to be executed, and injecting the executor into the current IP machine to register the corresponding type of fault.

[0110] Furthermore, the fault injection rules specifically include:

[0111] Application name, IP list, injected fault type, duration, start time and / or period;

[0112] A complete fault injection rule is constructed according to the parameters in the fault injection rule for use by the control component.

[0113] Further, the control component election leadership control component specifically includes:

[0114] Determine whether the current control component has succeeded in the election. If successful, the current control component is the leader control component, which is used to monitor the survival status of other non-leader control components and determine whether there are any abnormalities. If there are any abnormalities, its tasks are reallocated to other control components. If there are no abnormalities, the current control component continues to execute the current fault injection task;

[0115] If unsuccessful, the current control component continues to execute the current fault injection task.

[0116] Further, in the step of using the control component to select a fault with the lowest load at the beginning of the fault injection task execution to inject the executor into the current IP machine to register the corresponding type of fault, the leader control component is used to monitor whether the fault injection task is executed successfully. If successful, the task execution status is set to success; if unsuccessful, the fault injection task is returned.

[0117] Further, the method of using the control component to select a fault with the lowest load when the fault injection task starts to be executed and injecting the executor into the current IP machine to register the corresponding type of fault specifically includes:

[0118] The executor registers component information in the coordination cluster Zookeeper;

[0119] Receive the fault injection task and register the running information to the coordination cluster Zookeeper, and synchronously modify the current load number data;

[0120] If the current task is completed, the task status in the coordination cluster Zookeeper is marked as completed.

[0121] 1. The method disclosed in the present invention completes the writing of fault injection tasks through Platform.

[0122] 2. In the method disclosed in the present invention, the Controller node is elected by the Master node, and the Master node completes the monitoring of other Controller nodes. When it is found that the Controller node is down, the tasks it is managing are sorted out and assigned to other nodes to continue monitoring and terminate processing, thereby avoiding the failure of fault injection tasks to be terminated in time.

[0123] 3. In the method disclosed in the present invention, the Executor node serves as a fault injection executor and has the characteristic of horizontal scalability. The newly connected Executor node has the lowest load and can be quickly injected with tasks by the Controller node.

[0124] In the fault injection method described in this disclosure:

[0125] Both the Controller control platform and the Executor executor can be expanded horizontally. The Executor can be expanded according to the current system busyness. The connected Executor executor can quickly take over new injection tasks.

[0126] The relationship between Controller and Executor is as follows:

[0127] As a lightweight control node, the Controller does not handle heavy tasks.

[0128] All tasks are executed by Executor nodes, and the horizontal scalability of Executor is suitable for scaling up and down fault injection tasks.

[0129] The processing of tasks is done by the Executor node, while the management of tasks is controlled by the Controller node.

[0130] When the Controller node preempts the fault injection task, it selects an Executor with the lowest load to execute the task at the start time of the task execution. At this time, the Controller is responsible for monitoring the execution of the task. After the completion time is reached, it initiates a task termination command to terminate the fault injection.

[0131] If the Controller node crashes during the monitoring process, the Master node in the Controller cluster will detect the crash exception, then sort out the running tasks that the Controller node is monitoring, and assign these tasks to other Controller nodes, which will continue task monitoring and task termination.

[0132] Embodiment three:

[0133] The present disclosure can also provide a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, it is used to implement the steps of the above-mentioned fault injection method.

[0134] The storage medium may be non-volatile or non-volatile. The storage medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory).

[0135] Furthermore, the storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0136] Embodiment 4:

[0137] The present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned fault injection method when executing the computer program.

[0138] Figure 5 FIG. 1 is a schematic diagram of the internal structure of an electronic device in one embodiment. Figure 5As shown, the electronic device includes a processor, a storage medium, a memory and a network interface connected via a system bus. Among them, the storage medium of the computer device stores an operating system, a database and computer-readable instructions, and the database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a fault injection method. The processor of the electrical device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute a fault injection method. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art can understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application 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.

[0139] The electronic device includes but is not limited to smart phones, computers, tablet computers, wearable smart devices, artificial intelligence devices, mobile power supplies, etc.

[0140] In some embodiments, the processor may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing programs or modules stored in the memory (for example, executing remote data reading and writing programs, etc.), and calling data stored in the memory.

[0141] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory and at least one processor, etc.

[0142] Figure 5 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 5The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0143] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0144] Furthermore, the electronic device may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used to establish a communication connection between the electronic device and other electronic devices.

[0145] Optionally, the electronic device may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0146] Furthermore, the computer-usable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0147] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0148] The modules described as separate components may or may not be physically separated, and the components shown as modules 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 modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0149] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, 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 hardware plus software functional modules.

[0150] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, a person skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A fault injection system, characterized in that: include: Coordinates the cluster Zookeeper, which is responsible for controlling the registration of component cluster information and executor cluster information; A console unit, used to pre-write fault injection rules, wherein the fault injection rules include: application name, IP list, injection fault type, duration, start time and / or period; Constructing a complete fault injection rule for use by the control component according to the parameters in the fault injection rule; The control component is used to monitor the running status of the fault injection task; The executor is used to receive fault injection tasks and perform fault injection according to the type after receiving the tasks.

2. The system according to claim 1, characterized in that The control component is specifically used to monitor the running status of the task. When the processing end time is reached, a command is directly issued to terminate the execution of the faulty task, and the task status at this time is set to completed; If the fault injection task fails, a log is recorded and the fault injection task is returned.

3. The system according to claim 2, characterized in that The control component is also used to set the task status to abnormal if the fault injection task is repeatedly triggered three times and still abnormal, and will not be executed subsequently.

4. A fault injection method, applied to the system as claimed in any one of claims 1 to 3, characterized in that: include: Use the coordination cluster Zookeeper to register the cluster information of the control components and executors; Pre-write fault injection rules using console units; The control component elects a leading control component; The control component is used to select a fault with the lowest load when the fault injection task starts to be executed, and the executor registers the corresponding type of fault to the current IP machine.

5. The method according to claim 4, characterized in that The fault injection rules specifically include: Application name, IP list, injected fault type, duration, start time and / or period; A complete fault injection rule is constructed according to the parameters in the fault injection rule for use by the control component.

6. The method according to claim 4, characterized in that The control component election leadership control component specifically includes: Determine whether the current control component has succeeded in the election. If successful, the current control component is the leader control component, which is used to monitor the survival status of other non-leader control components and determine whether there are any abnormalities. If there are any abnormalities, its tasks are reallocated to other control components. If there are no abnormalities, the current control component continues to execute the current fault injection task; If unsuccessful, the current control component continues to execute the current fault injection task.

7. The method according to claim 4, characterized in that In the step of using the control component to select a fault with the lowest load at the beginning of the fault injection task execution to inject the executor into the current IP machine to register the corresponding type of fault, the leader control component is used to monitor whether the fault injection task is executed successfully. If successful, the task execution status is set to success; if unsuccessful, the fault injection task is returned.

8. The method according to claim 4, characterized in that The method of using the control component to select a fault with the lowest load at the beginning of the fault injection task execution and injecting the executor into the current IP machine to register the corresponding type of fault specifically includes: The executor registers component information in the coordination cluster Zookeeper; Receive the fault injection task and register the running information to the coordination cluster Zookeeper, and synchronously modify the current load number data; If the current task is completed, the task status in the coordination cluster Zookeeper is marked as completed.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the computer program, the steps of the method described in any one of claims 4 to 8 are implemented.

10. A computer storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it is used to implement the steps corresponding to the method described in any one of claims 4 to 8.