CN118012744A - Fault simulation method, control method, electronic equipment and storage medium of application - Google Patents

Fault simulation method, control method, electronic equipment and storage medium of application Download PDF

Info

Publication number
CN118012744A
CN118012744A CN202311841715.5A CN202311841715A CN118012744A CN 118012744 A CN118012744 A CN 118012744A CN 202311841715 A CN202311841715 A CN 202311841715A CN 118012744 A CN118012744 A CN 118012744A
Authority
CN
China
Prior art keywords
fault simulation
application
container
mirror image
probe
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311841715.5A
Other languages
Chinese (zh)
Inventor
陈宏�
刘泽
芦永昊
岳令
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xinao Xinzhi Technology Co ltd
Original Assignee
Xinao Xinzhi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xinao Xinzhi Technology Co ltd filed Critical Xinao Xinzhi Technology Co ltd
Priority to CN202311841715.5A priority Critical patent/CN118012744A/en
Publication of CN118012744A publication Critical patent/CN118012744A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present specification relates to a failure simulation method, a control method, an electronic device, and a storage medium for an application. The application management platform is configured with application container images corresponding to a plurality of application programs and probe container images corresponding to the monitoring probes respectively; the application container mirror image and the probe container mirror image belong to the same cluster; the method comprises the following steps: under the condition that the probe container mirror image receives a fault simulation instruction aiming at a specified application program, analyzing the fault simulation instruction to obtain fault simulation information; the probe container mirror image sends fault simulation information to the application management platform, so that the application management platform determines a target application container mirror image corresponding to the designated application program in the application container mirror image based on the fault simulation information, and distributes fault simulation operation resources for the target application container mirror image. By the method, the fault simulation process for the application program is simplified through the prior work, and a fault simulation code does not need to be specially written, so that the technical threshold is reduced.

Description

Fault simulation method, control method, electronic equipment and storage medium of application
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a fault simulation method, a control method, an electronic device, and a storage medium for an application.
Background
After some application programs of the business system are run online, system faults often occur due to code defects or service resource abnormality depending on the application programs. How to find potential system problems before an application program is online is important to reduce the number of failures of the online system.
In the related art, fault simulation of an application program for a service system is generally implemented by a developer developing a command line based on simulation faults, and executing the command line by a fault simulation tool. The fault simulation mode needs to have certain technical knowledge on the whole fault simulation link, and has a higher technical threshold for applied fault simulation.
Disclosure of Invention
The present specification aims to solve at least one of the technical problems in the related art to some extent. To this end, an object of the present specification is to propose a fault simulation method for an application.
A second object of the present specification is to propose a fault simulation control method for an application.
A third object of the present specification is to propose a fault simulation apparatus for application.
A fourth object of the present specification is to propose a fault simulation control apparatus for application.
A fifth object of the present specification is to propose an electronic device.
A sixth object of the present specification is to propose a computer readable storage medium.
To achieve the above objective, an embodiment of a first aspect of the present disclosure provides an applied fault simulation method. The application management platform is configured with application container images corresponding to a plurality of application programs and probe container images corresponding to the monitoring probes respectively; wherein the application container image and the probe container image belong to the same cluster; the method comprises the following steps: under the condition that the probe container mirror image receives a fault simulation instruction aiming at a specified application program, analyzing the fault simulation instruction to obtain fault simulation information; the designated application is at least part of the number of applications; the probe container mirror image sends the fault simulation information to the application management platform, so that the application management platform determines a target application container mirror image corresponding to the appointed application program in the application container mirror image based on the fault simulation information, and distributes fault simulation operation resources for the target application container mirror image.
In some embodiments of the present description, the fault simulation information includes a container identification and a fault simulation condition; the application management platform determines a target application container image corresponding to the designated application program in the application container images based on the fault simulation information, and allocates fault simulation running resources for the target application container image, and the method comprises the following steps: and the application management platform determines a target application container image corresponding to the appointed application program in the application container images based on the container identification, and allocates fault simulation running resources for the target application container image based on the fault simulation condition.
In some embodiments of the present description, the probe container image is configured by: acquiring a probe image file of the monitoring probe; and mounting the probe image file to the application management platform through a package management tool, and creating a container instance for the probe image file to obtain the probe container image.
In some embodiments of the present description, the application management platform is configured with a data collection interface for the target application container image; the method further comprises the steps of: and the probe container mirror image acquires and transmits basic information data of the target application container mirror image and running state data generated by running the target application container mirror image based on the fault simulation running resource through the data acquisition interface.
In some embodiments of the present specification, the fault simulation condition includes a fault simulation parameter set for at least one of a CPU resource, a memory resource, a disk resource, a network resource, an application process, a container resource, a process delay, a process exception, an in-process fault, and a process resource occupation of the specified application program.
In order to achieve the above object, an embodiment of a second aspect of the present disclosure provides an applied fault simulation control method. The method comprises the following steps: determining fault simulation information in response to a setting operation occurring on the fault condition setting interface for the specified application; the fault simulation information comprises a container identifier corresponding to the appointed application program and fault simulation conditions aiming at the appointed application program; generating a fault simulation instruction based on the fault simulation information, and sending the fault simulation instruction to a probe container mirror image in an application management platform, so that the application management platform determines a target application container mirror image corresponding to the designated application program in the application container mirror image based on the fault simulation information, and allocates fault simulation operation resources for the target application container mirror image.
In some embodiments of the present description, the method further comprises: receiving basic information data collected aiming at a target application container mirror image, wherein the target application container mirror image is based on running state data generated by fault simulation running resource running; the target application container image is an application container image corresponding to the specified application program determined in the application container images based on the container identification; the fault simulation operation resources are allocated based on the fault simulation conditions; and storing the operation state data.
In some embodiments of the present description, the method further comprises: and displaying the running state data based on a preset display form.
To achieve the above object, an embodiment of a third aspect of the present disclosure provides an applied fault simulation apparatus. The application management platform is configured with application container images corresponding to a plurality of application programs and probe container images corresponding to the monitoring probes respectively; wherein the application container image and the probe container image belong to the same cluster; the device comprises: the analysis module is used for analyzing the fault simulation instruction to obtain fault simulation information under the condition that the fault simulation instruction for the appointed application program is received by the probe container mirror image; the designated application is at least part of the number of applications; the first fault simulation module is used for sending the fault simulation information to the application management platform by the probe container mirror image, so that the application management platform determines a target application container mirror image corresponding to the appointed application program in the application container mirror image based on the fault simulation information, and distributes fault simulation operation resources for the target application container mirror image.
To achieve the above object, a fourth aspect of the present invention provides a fault simulation control apparatus for use in the present invention. The device comprises: the fault setting module is used for responding to the condition setting operation of the specified application program on the fault condition setting interface and determining fault simulation information; the fault simulation information comprises a container identifier corresponding to the appointed application program and fault simulation conditions aiming at the appointed application program; the second fault simulation module is used for generating a fault simulation instruction based on the fault simulation information and sending the fault simulation instruction to the probe container mirror image in the application management platform so that the application management platform determines a target application container mirror image corresponding to the appointed application program in the application container mirror image based on the fault simulation information, and distributes fault simulation operation resources for the target application container mirror image.
To achieve the above object, an embodiment of a fifth aspect of the present specification proposes an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the fault simulation method of the application according to any one of the first aspects and/or the fault simulation control method of the application according to any one of the second aspects when the computer program is executed.
To achieve the above object, an embodiment of a sixth aspect of the present specification proposes a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the fault simulation method of the application according to any one of the first aspects and/or the fault simulation control method of the application according to any one of the second aspects.
Through the embodiment, application container images corresponding to a plurality of application programs respectively are configured in the application management platform in advance, and probe container images corresponding to the monitoring probes are configured. When the fault simulation is carried out on the application program, only relevant staff is required to set fault simulation information aiming at the appointed application program in the fault simulation control terminal, and then the fault simulation information is sent to the probe container mirror image of the application management platform in the form of a fault simulation instruction through the fault simulation control terminal. After the probe container mirror image receives the fault simulation instruction, the fault simulation instruction is analyzed to obtain fault simulation information, and the fault simulation information is sent to the application management platform. The application management platform can determine the target application container image corresponding to the designated application program in the application container images based on the fault simulation information, so that fault simulation resources are distributed for the target application container images based on the fault simulation information. By the method, the fault simulation process for the application program is simplified through the prior work, and a fault simulation code does not need to be specially written, so that the technical threshold is reduced.
Additional aspects and advantages of the present description will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the present description.
Drawings
Fig. 1 is a schematic diagram of an application fault simulation system according to an embodiment of the present disclosure.
Fig. 2 is a flowchart of a fault simulation method of an application according to an embodiment of the present disclosure.
Fig. 3 is a flowchart of an applied fault simulation control method according to an embodiment of the present disclosure.
FIG. 4 is a schematic diagram of a fault condition setting interface according to one embodiment of the present disclosure.
Fig. 5 is a block diagram of a fault simulator according to an embodiment of the present disclosure.
Fig. 6 is a block diagram of a fault simulation control apparatus for an application according to an embodiment of the present disclosure.
Fig. 7 is a block diagram of an electronic device according to one embodiment of the present description.
Detailed Description
Embodiments of the present specification are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and intended for the purpose of illustrating the present description and are not to be construed as limiting the present description.
Since in the related art, fault simulation of an application for a service system is generally implemented by a developer developing a command line based on simulation faults, and executing the command line by a fault simulation tool. The fault simulation mode needs to have certain technical knowledge on the whole fault simulation link, and has a higher technical threshold for applied fault simulation. Therefore, the embodiment of the specification provides an applied fault simulation method, which simplifies the applied fault simulation process without higher technical threshold.
The embodiment of the specification provides a scene example of an application-based fault simulation method and an application-based fault simulation control method. The applied fault simulation method and the applied fault simulation control method are applied to the applied fault simulation system shown in fig. 1. Referring to fig. 1, the application fault simulation system includes a fault simulation control terminal 110 and an application management platform 120. The applied fault simulation method is applied to the application management platform 120, and the applied fault simulation control method is applied to the fault simulation control terminal 110.
The application management platform can manage a plurality of application programs in the form of containers, can be an open source platform for container arrangement, and can support automatic deployment, expansion and management of the containerized application programs. The application management platform is configured with application container images corresponding to a plurality of application programs respectively. Application container mirroring can be understood as a container instance created for an image file of an application program. One application may correspond to one container instance or multiple container instances, i.e., one application may correspond to one application container image or multiple application container images. The application management platform is also provided with a probe container mirror image corresponding to the monitoring probe. The probe container image and the application container image corresponding to the application program to be monitored belong to the same cluster. The container images in the same cluster can communicate through a pre-configured port.
The fault simulation control terminal 110 has a fault condition setting interface, and an operator can select a specified application program to be subjected to fault simulation on the fault condition setting interface, and select an application container image corresponding to the specified application program. Then, fault simulation setting is performed for the specified application program, and fault simulation information for the specified application program is generated. And generates fault simulation instructions based on the fault simulation information and transmits the fault simulation instructions to the probe container images in the application management platform 120. The probe container image is configured to communicate with the fault simulation control terminal 110 and the application management platform 120, respectively, and the probe container image may parse or convert a control instruction sent by the fault simulation control terminal 110 to obtain an instruction executable by the application management platform 120.
Then, when the probe container image receives the fault simulation instruction for the specified application program sent by the fault simulation control terminal 110, the fault simulation instruction is parsed, and fault simulation information contained in the fault simulation instruction is obtained. The application is designated as at least part of a number of applications. The probe container image sends fault simulation information to the application management platform 120, so that the application management platform 120 determines a target application container image corresponding to the designated application program in the application container image based on the fault simulation information, and allocates fault simulation running resources for the target application container image. The target application container image is enabled to run based on the fault simulation running resource.
Fig. 2 is a flowchart of a fault simulation method of an application according to an embodiment of the present disclosure. The application management platform is configured with application container images corresponding to a plurality of application programs and probe container images corresponding to the monitoring probes. Wherein the application container image and the probe container image belong to the same cluster. Referring to fig. 2, the fault simulation method includes:
s210, when the probe container mirror image receives the fault simulation instruction aiming at the appointed application program, analyzing the fault simulation instruction to obtain fault simulation information.
The application is designated as at least part of a number of applications.
S220, the probe container mirror image sends fault simulation information to the application management platform, so that the application management platform determines a target application container mirror image corresponding to the designated application program in the application container mirror image based on the fault simulation information, and distributes fault simulation operation resources for the target application container mirror image.
In embodiments of the present description, an application management platform may manage several applications in the form of containers, which may be an open source platform for container orchestration, capable of supporting automated deployment, extension, and management of containerized applications. By way of example, the application management platform may employ a Kubernetes management platform. The Kubernetes management platform is an open source for managing containerized applications on multiple hosts in a cloud platform. The goal of the Kubernetes management platform is to make deployment of containerized applications simple and efficient, which provides a mechanism for application deployment, planning, updating, and maintenance. The containers in the container management platform may provide an isolated operating environment so that applications may run in a separate space, independent of hosts or other containers.
The application management platform is configured with application container images corresponding to a plurality of application programs respectively. Application container mirroring can be understood as a container instance created for an image file of an application program. One application may correspond to one container instance or multiple container instances, i.e., one application may correspond to one application container image or multiple application container images. The application management platform is also provided with a probe container mirror image corresponding to the monitoring probe. The probe container image and the application container image corresponding to the application program to be monitored belong to the same cluster. The container images in the same cluster can communicate through a pre-configured port.
In embodiments of the present description, the monitoring probe may be a probe agent program pre-written by a technician. The monitoring probe can be used for instruction conversion between the fault simulation control terminal and the application management platform, and data of the application container mirror image are collected in the application management platform based on the requirement of the fault simulation control terminal and are simultaneously sent to the fault simulation control terminal.
Specifically, under the condition that the probe container mirror image corresponding to the monitoring probe receives the fault simulation instruction aiming at the appointed application program, the fault simulation instruction is analyzed, and the fault simulation information is obtained. Wherein the specified application is at least one of a number of applications. The fault simulation instructions may include an application identification specifying the application program. In the embodiment of the present specification, the fault simulation may be performed for one specific application program, or may be performed for a plurality of specific application programs at the same time. The probe container image may determine a specified application among a number of applications based on the application identification in the fault simulation instruction. And then analyzing the fault simulation instruction to obtain fault simulation information carried in the fault simulation instruction.
The probe container mirror image sends the analyzed fault simulation information to the application management platform, and the application management platform can determine a target application container mirror image corresponding to the appointed application program in the application container mirror image based on the fault simulation information. The target application container image is an application container image which is required to perform fault simulation in the application container images corresponding to the designated application programs. Then, the application management platform allocates fault simulation running resources for the target application container image based on the fault simulation information. For example, if the fault simulation information includes an occupancy condition set for the CPU resources of the target application container image, the application management platform may allocate a corresponding CPU occupancy for the target application container image based on the fault simulation information.
Through the embodiment, application container images corresponding to a plurality of application programs respectively are configured in the application management platform in advance, and probe container images corresponding to the monitoring probes are configured. When the fault simulation is carried out on the application program, only relevant staff is required to set fault simulation information aiming at the appointed application program in the fault simulation control terminal, and then the fault simulation information is sent to the probe container mirror image of the application management platform in the form of a fault simulation instruction through the fault simulation control terminal. After the probe container mirror image receives the fault simulation instruction, the fault simulation instruction is analyzed to obtain fault simulation information, and the fault simulation information is sent to the application management platform. The application management platform can determine the target application container image corresponding to the designated application program in the application container images based on the fault simulation information, so that fault simulation resources are distributed for the target application container images based on the fault simulation information. By the method, the fault simulation process for the application program is simplified through the prior work, and a fault simulation code does not need to be specially written, so that the technical threshold is reduced.
In some embodiments of the present description, the fault simulation information includes a container identification and fault simulation conditions. The application management platform determines a target application container image corresponding to a specified application program in the application container images based on the fault simulation information, and distributes fault simulation running resources for the target application container image, and the method comprises the following steps: the application management platform determines a target application container image corresponding to the designated application program in the application container images based on the container identification, and allocates fault simulation running resources for the target application container image based on the fault simulation conditions.
In an embodiment of the present description, the fault simulation information includes a container identification and a fault simulation condition. Wherein the target application container image corresponding to the container identifier is at least one of the application container images corresponding to the designated application program. After the application management platform receives the fault simulation information, a target application container image needing fault simulation can be determined based on the container identification. Then, failure simulation resources are allocated for the target application container image based on the failure simulation conditions.
In some cases, fault simulation information may apply identification, container identification, and fault simulation conditions. Wherein the application identifier is an application identifier of the specified application program. The application management platform may determine the specified application program based on the application identification, thereby determining the target application container image in the application container images corresponding to the specified application program based on the container identification.
In some embodiments of the present description, the fault simulation conditions include a fault simulation parameter set for at least one of a CPU resource, a memory resource, a disk resource, a network resource, an application process, a container resource, a process delay, a process exception, an in-process data manipulation, and a process resource occupation of the specified application.
In the embodiment of the present specification, the fault simulation condition set for the CPU resource of the specified application program may be a fault simulation parameter set for the CPU full load, for example, the fault simulation condition may be set such that the target application container image corresponding to the specified application program is run at the CPU occupancy of 80%. The CPU full load can check whether the CPU occupancy rate of the target application container mirror image reaches 80% through a top command.
The fault simulation conditions set for the memory resources of the specified application may include fault simulation parameters set for the memory load, e.g., a percentage of system memory usage set for the memory load.
The failure simulation conditions set for the disk resources of the specified application may include failure simulation parameters set for file movement, file attribute change, file deletion, disk population, file addition, and the like. For example, for file movement, scenes such as file loss, storage position error and the like in the target application container image can be set.
The fault simulation conditions set for the network resources of the specified application may include fault simulation parameters set for network delay, network packet loss, network corruption, network occupancy, network drop, network anomaly, network Dns anomaly, network duplication, network misordering, and the like. For example, for the network delay, the scenes of poor network environment, delay of request occurrence and the like in the target application container image can be set, and the scenes of delay of access of the target application container image to external resources and the like can be further set.
The fault simulation conditions set for an application process of a given application program may include fault simulation parameters set for process stop, process kill, etc. For example, for process stopping, a specified process suspension in the target application container image may be set to simulate the effect on its own services after the specified process suspension.
The failure simulation conditions set for the container resources of the specified application may include failure simulation parameters set for container cluster expansion, container cluster deletion, container removal, cluster failure, and the like.
The fault simulation conditions set for the process delay of a given application may include fault simulation parameters set for MYSQL delay, HBASE delay, TARS delay, LETTUCE delay, etc. within the container.
The fault simulation conditions set for process exceptions for a given application may include fault simulation parameters set for HTTP cast custom exceptions within a container, ROCKETMQ cast custom exceptions within a container, DUBBO cast custom exceptions within a container, RABBITMQ cast custom exceptions within a container, java cast custom exceptions within a container, HSF cast custom exceptions within a container, and so forth.
The fault simulation conditions set for in-process data manipulation of a given application may include fault simulation parameters set for in-container Java return value modifications, in-container DRUID connection pool SQL configuration, etc. For example, for a DRUID connection pool SQL configuration within a container, the value of the update field or the value of the insert field of the modified SQL in the target application container image may be set to simulate the scenario of target application container drain.
In the embodiment of the present disclosure, the fault simulation information may include a plurality of fault simulation conditions set for a target application container image corresponding to a specific application program, or may include a plurality of fault simulation conditions set for target application container images corresponding to a plurality of specific application programs, respectively. Specifically, the fault simulation information setting may be set based on the fault simulation requirements.
In some embodiments of the present description, probe container mirroring is configured by: and acquiring a probe image file of the monitoring probe. And mounting the probe image file to an application management platform through a package management tool, and creating a container instance for the probe image file to obtain a probe container image.
In embodiments of the present description, the installation of the monitoring probe may be implemented using the Helm tool in the Kubernetes application management platform. The Helm tool is a package management tool for simplifying application deployment, updating and management in the Kubernetes application management platform. It allows the definition, installation and upgrading of applications in Kubernetes, called HELM CHARTS (Helm diagram). HELM CHARTS is a predefined package containing templates, defaults, dependencies, etc. for configuring resources in the Kubernetes application management platform.
Before the monitoring probe is installed, firstly, the probe agent program is packaged according to the mirror image rule file to obtain a probe mirror image file of the monitoring probe, and the probe mirror image file is stored in a mirror image warehouse. The mirror rule file comprises environment information, system information, installation requirements of a Helm tool in a Kubernetes application management platform and the like, on which the packaged probe agent depends. The process of packing the probe agent program according to the mirror image rule file comprises the steps of installing an executable program file, a program dependency library and a Helm tool client after compiling the probe agent program code into a mirror image file of a monitoring probe to obtain the probe mirror image file. The probe image file is then made into a probe application compression package that can be managed and installed by the Helm tool.
Then, the Kubernetes application management platform can call the probe application compression packet corresponding to the monitoring probe from the mirror image warehouse through the Helm tool, and install the probe application compression packet to the Kubernetes application management platform to form a probe container mirror image of the monitoring probe. Specifically, the Helm tool mounts a probe application compression package corresponding to the probe image file onto an application management platform, creates a container instance for the probe image file, forms a container image, and obtains the probe container image. The Helm tool installs the probe application compression package based on the application description file and configuration in the probe application compression package. The application description file comprises standard information (including installation addresses, resources and the like) of a Kubernetes application management platform, installation requirements of a Helm tool and the like.
In some embodiments of the present description, the application management platform is configured with a data collection interface for target application container mirroring. The fault simulation method further comprises the following steps: the probe container mirror image collects and transmits basic information data of the target application container mirror image and running state data generated by running the target application container mirror image based on fault simulation running resources through the data collection interface.
In the embodiment of the present disclosure, in the process of performing fault simulation on the target application container image in the application management platform, operation state data generated in the process of operating the target application container image based on the fault simulation operation resource needs to be collected, so as to determine whether the target application container is limited by the fault simulation condition or whether the target application container is limited based on the operation state data.
In the embodiment of the present disclosure, the application management platform is configured with a data acquisition interface, and the identification parameter of the target application container image is configured for the data acquisition interface, so that the probe container image can acquire the running state data of the target application container image through the data acquisition interface, and the like. Specifically, the probe container mirror image is configured to communicate with the data acquisition interface, and under the condition that a fault simulation instruction is received by the probe container mirror image, basic information data of the target application container mirror image and running state data generated by running the target application container mirror image based on a fault simulation running resource can be acquired through the data acquisition interface, and the acquired basic information data and the acquired running state data are sent to the fault simulation control terminal.
Corresponding to the above embodiment, the present embodiment provides an applied fault simulation control method. Referring to fig. 3, the fault simulation control method includes:
s310, determining fault simulation information in response to a setting operation on the fault condition setting interface for a specified application.
The fault simulation information comprises a container identifier corresponding to the appointed application program and fault simulation conditions aiming at the appointed application program.
S320, generating a fault simulation instruction based on the fault simulation information and sending the fault simulation instruction to the probe container mirror image in the application management platform, so that the application management platform determines a target application container mirror image corresponding to the designated application program in the application container mirror image based on the fault simulation information, and allocates fault simulation operation resources for the target application container mirror image.
In the embodiment of the present specification, the fault simulation control terminal is configured with a fault condition setting interface. The associated staff may set fault simulation conditions for the specified application on the fault condition setting interface. The fault simulation control terminal is configured to determine fault simulation information for a specified application in response to a setting operation occurring on the fault condition setting interface. The fault simulation information comprises a container identifier corresponding to the appointed application program and fault simulation conditions set for the appointed application program.
For example, referring to fig. 4, a selection control for an application program, such as a selection control corresponding to "drilling application" in the figure, is configured on the fault condition setting interface, and the relevant staff member may select an application identifier corresponding to a specified application program in the control, for example, select the specified application program with the application identifier of "sm-plan-bff". Then, the "machine list" of the fault condition setting interface displays the container identifications of all application container images corresponding to the designated application program with the application identification of "scm-plan-bff". The container identification may be an IP address of the application container identification. The associated staff may select the container identification of the target application container image for which a fault simulation is desired in the "machine list". Then, a fault simulation scenario is added in the "drill content" section of the fault condition setting interface. For example, if based on the fault simulation requirement, the selection sets a fault simulation condition for the CPU resource of the designated application "sm-plan-bff" that is full of CPU in the container. This condition for CPU full in the container may set a related parameter for "CPU full in container" in the popup window on the right side of the fault condition setting interface, for example, set parameters such as 80% of CPU occupancy. In response to a click operation on the fault condition setting interface for the "save" control, fault simulation information for the specified application "scm-plan-bff" is determined. The fault simulation information includes a container identification and fault simulation conditions. The fault simulation conditions include a fault simulation scenario and fault simulation parameters set for the fault simulation scenario.
The fault simulation control terminal generates a fault simulation instruction based on the fault simulation information and sends the fault simulation instruction to the probe container mirror image in the application management platform. Under the condition that the probe container mirror image receives the fault simulation instruction, the fault simulation instruction is analyzed to obtain fault simulation information, and the fault simulation information is sent to the application management platform. And determining a target application container image in the application container images corresponding to the designated application programs based on the container identification in the fault simulation information by the application management platform, and distributing fault simulation operation resources for the target application container images based on the fault simulation conditions in the fault simulation information. The target application container image is enabled to run based on the fault simulation running resource. Illustratively, if the fault simulation condition is 85% of the CPU occupancy parameter setting for the CPU resource of the target application container image a corresponding to the specified application program a. The application management platform may invoke a CPU resource with a CPU occupancy rate of 85% for the target application container image a, so that the target application container image a operates based on the defined condition.
Through the embodiment, application container images corresponding to a plurality of application programs respectively are configured in the application management platform in advance, and probe container images corresponding to the monitoring probes are configured. When the fault simulation is carried out on the application program, only relevant staff is required to set fault simulation information aiming at the appointed application program in the fault simulation control terminal, and then the fault simulation information is sent to the probe container mirror image of the application management platform in the form of a fault simulation instruction through the fault simulation control terminal. After the probe container mirror image receives the fault simulation instruction, the fault simulation instruction is analyzed to obtain fault simulation information, and the fault simulation information is sent to the application management platform. The application management platform can determine the target application container image corresponding to the designated application program in the application container images based on the fault simulation information, so that fault simulation resources are distributed for the target application container images based on the fault simulation information. Through the mode, the fault simulation process for the application program is simplified through the pre-work, and related staff only need to set related fault simulation conditions on the fault condition setting interface, do not need to specially write fault simulation codes, and reduce the technical threshold.
In some embodiments of the present description, the fault simulation control method further includes: and receiving basic information data collected aiming at the target application container mirror image and running state data generated by the target application container mirror image based on the running of the fault simulation running resource. The target application container image is an application container image corresponding to a specified application program determined in the application container images based on the container identification. The fault simulation run resources are allocated based on fault simulation conditions. The operating state data is stored.
In the embodiment of the present specification, the probe container image of the application management platform is further used to collect basic information data and running state data of the target application container image. The specific acquisition process is described in the above embodiments, and will not be repeated.
After the probe container mirror images collect the data, the data can be directly sent to the fault simulation control terminal. The fault simulation control terminal receives and stores the basic information data and the running state data. Wherein the operational state data is generated by the target application container image based on the operation of the fault simulation operational resource. The fault simulation running resource is allocated to the target application container mirror image by the application management platform based on the fault simulation condition.
In some cases, the fault simulation control terminal may further perform deduplication, normalization, and the like on the basic information data and the operation state data to store the operation state data and the basic information data according to a preset storage format.
In some embodiments of the present description, the fault simulation control method further includes: and displaying the running state data based on a preset display form.
In the embodiment of the present disclosure, after the fault simulation control terminal receives the operation state data, the relevant staff may perform operation state analysis on the target application container image based on the operation state data, so as to determine an operation limit condition of the target application container image under the fault simulation condition. In order to enable relevant staff to analyze the running state data more intuitively, the embodiment of the specification displays the running state data in a preset display form. The operating state data may be presented in the form of a graph, and the operating state data may be presented in the form of a table, for example. The specific display form can be set according to actual requirements.
Referring to fig. 5, the embodiment of the present disclosure further provides a fault simulation apparatus for application. The application management platform is configured with application container images corresponding to a plurality of application programs and probe container images corresponding to the monitoring probes. Wherein the application container image and the probe container image belong to the same cluster. Referring to fig. 5, the apparatus includes:
And the analyzing module 510 is configured to analyze the fault simulation instruction to obtain fault simulation information when the probe container image receives the fault simulation instruction for the specified application program.
The application is designated as at least part of a number of applications.
The first fault simulation module 520 is configured to send fault simulation information to the application management platform by using the probe container image, so that the application management platform determines a target application container image corresponding to the specified application program in the application container image based on the fault simulation information, and allocates a fault simulation running resource to the target application container image.
Through the embodiment, application container images corresponding to a plurality of application programs respectively are configured in the application management platform in advance, and probe container images corresponding to the monitoring probes are configured. When the fault simulation is carried out on the application program, only relevant staff is required to set fault simulation information aiming at the appointed application program in the fault simulation control terminal, and then the fault simulation information is sent to the probe container mirror image of the application management platform in the form of a fault simulation instruction through the fault simulation control terminal. After the probe container mirror image receives the fault simulation instruction, the fault simulation instruction is analyzed to obtain fault simulation information, and the fault simulation information is sent to the application management platform. The application management platform can determine the target application container image corresponding to the designated application program in the application container images based on the fault simulation information, so that fault simulation resources are distributed for the target application container images based on the fault simulation information. Through the mode, the fault simulation process for the application program is simplified through the pre-work, and related staff only need to set related fault simulation conditions on the fault condition setting interface, do not need to specially write fault simulation codes, and reduce the technical threshold.
For specific limitations of the fault simulation apparatus of the application, reference may be made to the above limitation of the fault simulation method of the application, and no further description is given here. The respective modules in the fault simulation apparatus of the above application may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Corresponding to the above embodiment, the embodiment of the present specification further provides an applied fault simulation control device. Referring to fig. 6, the fault simulation control apparatus includes:
The fault setting module 610 is configured to determine to perform fault simulation information in response to a condition setting operation that occurs for a specified application program on the fault condition setting interface.
The fault simulation information comprises a container identifier corresponding to the appointed application program and fault simulation conditions aiming at the appointed application program.
The second fault simulation module 620 is configured to generate a fault simulation instruction based on the fault simulation information and send the fault simulation instruction to the probe container image in the application management platform, so that the application management platform determines a target application container image corresponding to the specified application program in the application container image based on the fault simulation information, and allocates a fault simulation running resource to the target application container image.
Through the embodiment, application container images corresponding to a plurality of application programs respectively are configured in the application management platform in advance, and probe container images corresponding to the monitoring probes are configured. When the fault simulation is carried out on the application program, only relevant staff is required to set fault simulation information aiming at the appointed application program in the fault simulation control terminal, and then the fault simulation information is sent to the probe container mirror image of the application management platform in the form of a fault simulation instruction through the fault simulation control terminal. After the probe container mirror image receives the fault simulation instruction, the fault simulation instruction is analyzed to obtain fault simulation information, and the fault simulation information is sent to the application management platform. The application management platform can determine the target application container image corresponding to the designated application program in the application container images based on the fault simulation information, so that fault simulation resources are distributed for the target application container images based on the fault simulation information. Through the mode, the fault simulation process for the application program is simplified through the pre-work, and related staff only need to set related fault simulation conditions on the fault condition setting interface, do not need to specially write fault simulation codes, and reduce the technical threshold.
For specific limitations of the applied fault simulation control apparatus, reference may be made to the above limitations of the applied fault simulation control method, and no further description is given here. The respective modules in the fault simulation control apparatus of the above application may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Fig. 7 is a block diagram of an electronic device according to one embodiment of the present description.
As shown in fig. 7, the electronic device 700 includes a memory 704, a processor 702, and a computer program 706 stored on the memory 704 and executable on the processor 702, wherein the processor 702 implements the fault simulation method of the application of any of the above embodiments and/or the fault simulation control method of the application of any of the above embodiments when the processor 702 executes the computer program 706.
According to the electronic device of the embodiment of the present disclosure, when the processor 702 executes the computer program 706, the fault simulation process for the application program is simplified through the previous work, and the relevant staff only needs to set the relevant fault simulation conditions on the fault condition setting interface, so that the technical threshold is reduced without specially writing the fault simulation codes.
Corresponding to the above embodiments, embodiments of the present specification also propose a computer readable storage medium. A computer program stored thereon, which when executed by a processor, implements the fault simulation method of the application of any of the above embodiments and/or the fault simulation control method of the application of any of the above embodiments.
According to the computer readable storage medium of the embodiments of the present disclosure, when the computer program is executed by the processor, the fault simulation process for the application program is simplified through a preliminary work, and the relevant staff only need to set the relevant fault simulation conditions on the fault condition setting interface, without writing the fault simulation code specifically, so that the technical threshold is reduced.
It should be noted that the logic and/or steps represented in the flowcharts or otherwise described herein, for example, may be considered as a ordered listing of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It should be understood that portions of this specification may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present specification. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
In the description of the present specification, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings are merely for convenience in describing the present specification and simplifying the description, and do not indicate or imply that the device or element being referred to must have a specific orientation, be configured and operated in a specific orientation, and therefore should not be construed as limiting the present specification.
Furthermore, the terms "first," "second," and the like, as used in the embodiments of the present specification, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or as implicitly indicating the number of technical features indicated in the embodiments. Thus, the definition of a term "first," "second," or the like in an embodiment of this specification can expressly or implicitly indicate that at least one such feature is included in the embodiment. In the description of the present specification, the word "plurality" means at least two or more, for example, two, three, four, etc., unless explicitly defined otherwise in the embodiments.
In this specification, unless clearly indicated or limited otherwise in the examples, the terms "mounted," "connected," and "fixed" as used in the examples are to be construed broadly, and for example, the connection may be a fixed connection, a removable connection, or an integral unit, and it is to be appreciated that the connection may also be a mechanical connection, an electrical connection, or the like; of course, it may be directly connected, or indirectly connected through an intermediate medium, or may be in communication with each other, or in interaction with each other. The specific meaning of the terms in this specification can be understood by those skilled in the art according to specific embodiments.
In this specification, unless expressly stated or limited otherwise, a first feature "up" or "down" a second feature may be the first and second features in direct contact, or the first and second features in indirect contact via an intervening medium. Moreover, a first feature being "above," "over" and "on" a second feature may be a first feature being directly above or obliquely above the second feature, or simply indicating that the first feature is level higher than the second feature. The first feature being "under", "below" and "beneath" the second feature may be the first feature being directly under or obliquely below the second feature, or simply indicating that the first feature is less level than the second feature.
Although embodiments of the present disclosure have been shown and described above, it should be understood that the above embodiments are illustrative and not to be construed as limiting the present disclosure, and that variations, modifications, alternatives, and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the present disclosure.

Claims (10)

1. The fault simulation method for the application is characterized in that an application management platform is configured with application container images corresponding to a plurality of application programs and probe container images corresponding to monitoring probes respectively; wherein the application container image and the probe container image belong to the same cluster; the method comprises the following steps:
Under the condition that the probe container mirror image receives a fault simulation instruction aiming at a specified application program, analyzing the fault simulation instruction to obtain fault simulation information; the designated application is at least part of the number of applications;
the probe container mirror image sends the fault simulation information to the application management platform, so that the application management platform determines a target application container mirror image corresponding to the appointed application program in the application container mirror image based on the fault simulation information, and distributes fault simulation operation resources for the target application container mirror image.
2. The method of claim 1, wherein the fault simulation information includes a container identification and a fault simulation condition; the application management platform determines a target application container image corresponding to the designated application program in the application container images based on the fault simulation information, and allocates fault simulation running resources for the target application container image, and the method comprises the following steps:
and the application management platform determines a target application container image corresponding to the appointed application program in the application container images based on the container identification, and allocates fault simulation running resources for the target application container image based on the fault simulation condition.
3. The method of claim 1, wherein the probe container image is configured by:
acquiring a probe image file of the monitoring probe;
And mounting the probe image file to the application management platform through a package management tool, and creating a container instance for the probe image file to obtain the probe container image.
4. The method of claim 1, wherein the application management platform is configured with a data collection interface for the target application container image; the method further comprises the steps of:
And the probe container mirror image acquires and transmits basic information data of the target application container mirror image and running state data generated by running the target application container mirror image based on the fault simulation running resource through the data acquisition interface.
5. The method of claim 2, wherein the fault simulation conditions include fault simulation parameters set for at least one of CPU resources, memory resources, disk resources, network resources, application processes, container resources, process delays, process exceptions, in-process faults, process resource occupancy of the specified application program.
6. An applied fault simulation control method, characterized in that the method comprises the following steps:
determining fault simulation information in response to a setting operation occurring on the fault condition setting interface for the specified application; the fault simulation information comprises a container identifier corresponding to the appointed application program and fault simulation conditions aiming at the appointed application program;
Generating a fault simulation instruction based on the fault simulation information, and sending the fault simulation instruction to a probe container mirror image in an application management platform, so that the application management platform determines a target application container mirror image corresponding to the designated application program in the application container mirror image based on the fault simulation information, and allocates fault simulation operation resources for the target application container mirror image.
7. The method of claim 6, wherein the method further comprises:
Receiving basic information data collected aiming at a target application container mirror image, wherein the target application container mirror image is based on running state data generated by fault simulation running resource running; the target application container image is an application container image corresponding to the specified application program determined in the application container images based on the container identification; the fault simulation operation resources are allocated based on the fault simulation conditions;
And storing the operation state data.
8. The method of claim 7, wherein the method further comprises:
and displaying the running state data based on a preset display form.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the fault simulation method of an application according to any one of claims 1-5 and/or the fault simulation control method of an application according to any one of claims 6-8 when the computer program is executed.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, implements a fault simulation method of an application according to any one of claims 1-5 and/or a fault simulation control method of an application according to any one of claims 6-8.
CN202311841715.5A 2023-12-28 2023-12-28 Fault simulation method, control method, electronic equipment and storage medium of application Pending CN118012744A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311841715.5A CN118012744A (en) 2023-12-28 2023-12-28 Fault simulation method, control method, electronic equipment and storage medium of application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311841715.5A CN118012744A (en) 2023-12-28 2023-12-28 Fault simulation method, control method, electronic equipment and storage medium of application

Publications (1)

Publication Number Publication Date
CN118012744A true CN118012744A (en) 2024-05-10

Family

ID=90941817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311841715.5A Pending CN118012744A (en) 2023-12-28 2023-12-28 Fault simulation method, control method, electronic equipment and storage medium of application

Country Status (1)

Country Link
CN (1) CN118012744A (en)

Similar Documents

Publication Publication Date Title
US10171383B2 (en) Methods and systems for portably deploying applications on one or more cloud systems
EP2176778B1 (en) Progressively implementing declarative models in distributed systems
US20090158268A1 (en) Software Distribution Method and System
US11431571B2 (en) Monitoring time-base policy domain architecture
CN107528751B (en) A kind of system and its management method of dynamic distribution Zabbix monitoring data
US20200310779A1 (en) Validating a firmware compliance policy prior to use in a production system
CN112241360A (en) Test case generation method, device, equipment and storage medium
US10929183B2 (en) System interventions based on expected impacts of system events on scheduled work units
CN106155599A (en) Equipment management system, relay and trunking method
CN111309570A (en) Pressure testing method, medium, device and computing equipment
CN112394675B (en) Monitoring system, method and server for rail transit
CN113176996A (en) Fault processing method, engine, plug-in probe, device and readable storage medium
CN118012744A (en) Fault simulation method, control method, electronic equipment and storage medium of application
CN110447018B (en) Operation management server, development operation support system, method thereof, and non-transitory computer-readable medium storing program thereof
US9779429B2 (en) Custom rule based determination of pricing information using file with predetermined name stored in installation directory in install path
CN115145595A (en) Dependency library installation method and device, server, electronic equipment and storage medium
CN115277388B (en) Network equipment management method and device, storage medium and electronic equipment
JP2007164494A (en) Information output method, system and program
CN118012698A (en) Application data acquisition method, application monitoring method, electronic equipment and medium
US11340992B2 (en) Representing update results of firmware updates
CN115048313B (en) Automatic test method and device, computer readable storage medium and electronic equipment
US8825610B1 (en) System management based on goals relevant to a current state of a managed system
CN118409937B (en) Application deployment planning method, device and medium based on disk scanning
CN114598585B (en) Method and system for monitoring hardware through snmptrapd
CN110909557B (en) Collector development platform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination