Node control method and device based on process state, electronic equipment and storage medium

By obtaining the target process in the container technology that is in an uninterruptible sleep state and determining the target object according to its parent process, automatic isolation control of the node where the target object is located is achieved, and the problem of inability to automatically detect the D state and perform node isolation in the prior art is solved, and identification and control efficiency is improved.

CN119718550APending Publication Date: 2025-03-28INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411926973.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art cannot realize automatic detection of D state and node isolation control based on D state.

Method used

By obtaining the target process that is in a sleep-free state, the target object is determined according to the parent process of the target process, and the node where the target object is located is isolated and controls.

Benefits of technology

Automatic D-state detection and node isolation control are realized, and target state recognition efficiency and node control efficiency are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718550A_ABST
    Figure CN119718550A_ABST
Patent Text Reader

Abstract

The invention discloses a process state-based node control method and apparatus, an electronic device and a storage medium, and relates to a distributed technology, the method comprises the steps of obtaining a target process in a target state, the target state being an uninterruptible sleep state; determining a target object according to a parent process of the target process; and performing isolation control according to the target node where the target object is located. Compared with the prior art that the target state needs to be inquired manually, the technical scheme provided by the embodiment of the invention can identify the target process in the target state, and after the target process is determined, the target object for calling the target process is determined according to the parent process of the target process. The target node where the target object is located is subjected to isolation control, the target process of the target state is automatically recognized, the target node is subjected to isolation control, and the recognition efficiency of the target state and the node control efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed technology, and in particular to a node control method, device, electronic device and storage medium based on process status. Background Art

[0002] With the continuous development of distributed technology, container technology has been widely used. Container technology includes multiple nodes, and the state of a node is determined by the state of the container contained in the node. There is a state called D state, which means an uninterruptible sleep state.

[0003] Currently, the detection of the D state needs to be queried manually through commands. It is impossible to realize automatic detection of the D state and node isolation control based on the D state. Summary of the invention

[0004] The present invention provides a process state-based node control method, device, electronic device and storage medium to solve the current problem that automatic detection of D state and node isolation control based on D state cannot be achieved.

[0005] According to one aspect of the present invention, there is provided a node control method based on process status, comprising:

[0006] Acquire a target process in a target state, wherein the target state is an uninterruptible sleep state;

[0007] Determine a target object according to a parent process of the target process;

[0008] Isolation control is performed according to the target node where the target object is located.

[0009] According to another aspect of the present invention, there is provided a node control device based on process status, comprising:

[0010] A target process acquisition module, used to acquire a target process in a target state, wherein the target state is an uninterruptible sleep state;

[0011] A target object determination module, used to determine the target object according to the parent process of the target process;

[0012] The isolation control module is used to perform isolation control according to the target node where the target object is located.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the node control method based on process status described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the node control method based on process status described in any embodiment of the present invention when executed.

[0018] The technical solution provided by the embodiment of the present invention obtains a target process in a target state, wherein the target state is an uninterruptible sleep state; determines a target object according to the parent process of the target process; and performs isolation control according to the target node where the target object is located. Compared with the current need to manually query the target state, the technical solution provided by the embodiment of the present invention can identify the target process in the target state, and after determining the target process, determine the target object that calls the target process according to the parent process of the target process. The target node where the target object is located is isolated and controlled, and the target process in the target state is automatically identified. The target node is isolated and controlled, and the target state identification efficiency and node control efficiency are improved.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 It is a flowchart of a node control method based on process status provided by an embodiment of the present invention;

[0022] Figure 2 This is a schematic diagram of an architecture for implementing D state detection and isolation based on k8s provided by an embodiment of the present invention;

[0023] Figure 3 is a flowchart of another node control method based on process status provided by an embodiment of the present invention;

[0024] Figure 4It is a structural schematic diagram of a node control device based on process status provided by an embodiment of the present invention;

[0025] Figure 5 It is a structural schematic diagram of an electronic device for implementing the node control method based on process status according to an embodiment of the present invention. DETAILED DESCRIPTION

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

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

[0028] The information collected by the embodiments of the present invention is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data comply with the relevant laws, regulations and standards of relevant countries and regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation portals for users to choose to authorize or refuse. Provide users with corresponding operation portals for users to choose to agree or refuse the results of automated decision-making; if the user chooses to refuse, the expert decision-making process will be entered to avoid relevant legal risks and public opinion risks.

[0029] With the continuous development of distributed technology, container technology has been widely used. Container technology includes multiple nodes, and the state of a node is determined by the state of the container contained in the node. There is a state called D state, which means an uninterruptible sleep state. At present, the detection of D state needs to be queried manually through commands. It is impossible to realize automatic detection of D state and node isolation control based on D state.

[0030] Figure 1This is a flowchart of a node control method based on process status provided by an embodiment of the present invention. This embodiment is applicable to the detection of D status in distributed container technology and the node isolation control based on D status. The method can be executed by a node control device based on process status. The node control device based on process status can be implemented in the form of hardware and / or software. The node control device based on process status can be configured in electronic devices such as personal computers and servers. Figure 1 As shown, the method includes:

[0031] Step S101: Acquire a target process in a target state, where the target state is an uninterruptible sleep state.

[0032] The D state is a state of the Linux process, which is called disk sleep in English. The D state is an uninterruptible sleep state that can appear in scenarios such as reading data from the hard disk. A process in the D state can only be awakened by resources, not by signals, and cannot be killed by the "kill -9" command.

[0033] In the embodiment of the present invention, the D state is called the target state, and a target process in the target state is determined from multiple processes running in the node by querying or the like.

[0034] Optionally, obtaining the target process in the target state can be implemented in the following way:

[0035] Acquire process information of multiple processes, wherein the process information includes a process name and a process status; and determine a target process according to the process status and a preset process identifier.

[0036] Process information can be obtained by executing pre-configured script commands and pre-configured command combinations. The command combination includes but is not limited to using the ps command and the top command in combination with the grep command or the awk command to obtain process information of all processes, and according to the preset process identifier, that is, the text identifier of the D state, from the process information, the process whose process status field matches the text identifier of the D state is searched from the queried process information as the target process.

[0037] Among them, the ps command is used to view the status of the process in the current system, and the top command is used to monitor the running status of the system in real time. The grep command is a text search command that can search for text by using regular expressions and output matching lines to the standard output. The awk command is a text processing command that can process data through built-in functions, pattern matching, and operations.

[0038] The above implementation can automatically determine the target process in the target state, such as the target process in the D state, according to the acquired process name and process state, thereby improving the D state recognition efficiency.

[0039] Optionally, the state information of each process in the " / proc" directory, such as statistical information (stat), status information (status), etc., can be directly read, and then the process in the D state can be filtered and queried as the target process. The " / proc" directory stores data such as the kernel running status.

[0040] Optionally, before obtaining the target process in the target state, the following is further included:

[0041] A configuration file adapted for the node problem detector is generated, wherein the configuration file is used to record relevant parameters of the plug-in operation.

[0042] Accordingly, obtaining a target process in a target state and determining a target object according to a parent process of the target process include:

[0043] A plug-in is created in the node problem detector, and the plug-in is used to obtain a target process in a target state, where the target state is an uninterruptible sleep state; and a target object is determined according to a parent process of the target process.

[0044] Optionally, the configuration file can be a .json file. The category of the plug-in can be a custom plug-in type (custom). Add custom plug-in custom related parameters, such as the interval time for executing the test is 60s, and the response timeout time for executing the test is 10s (that is, if no result is returned within 10s, the unknown status will be reported). You also need to add the path of the relevant execution script and the timeout time for executing the script. You also need to add two types of detection rules for temporary problems and detection rules for permanent problems, namely the target state event Event and the target node state information Node condition.

[0045] Figure 2 A schematic diagram of an architecture for implementing D state detection and isolation based on k8s provided in an embodiment of the present invention.

[0046] Kubernetes (k8s) is a container scheduling management platform, including a management end and multiple host nodes, and the host node can carry containers with different functions. K8s has a node problem detector (Node-problem-detector, NPD), which is a tool for k8s node diagnosis. It can convert the abnormal and sub-healthy status of the node into the event of the Node, and realize the closed loop of node event alarm in combination with Kube-eventer. It is currently running as a plug-in of k8s, and a daemonset (Daemonset) for detecting abnormal indicators is run on each node. In an embodiment of the present invention, a new plug-in is configured in NPD, which is used to determine whether the host node Node is the target node according to the identified target process, and send the target state detection result to NPD. After receiving the target state detection result, NPD feeds back to the K8s management end. When the management end performs a new pod allocation, it can avoid allocating the pod to the target node, or expel the target container container, target container group pod, target node Node or target container unit docker with the target state (D state) according to the target state detection result. Among them, container is a docker container, which is actually a process. Pod is the smallest deployable computing unit created and managed by k8s, a group of strongly associated Docker containers.

[0047] The above implementation can identify the target node in the form of a node problem detector plug-in. The node problem detector is used to achieve isolation control of the node. In the k8s system, the existing node problem detector is used to achieve rapid transmission of the target node identification result and efficient control of the target node, thereby improving the node control efficiency.

[0048] Step S102: Determine the target object according to the parent process of the target process.

[0049] First, a process is created in the host node, also known as process zero. This process zero creates multiple child processes in turn according to demand. Each child process can continue to create its own child process according to demand. And so on, multiple processes are created in the host node. Except for process zero, any process has a parent process. The parent-child process represents the calling relationship between processes.

[0050] Optionally, the process information further includes parent process information; accordingly, determining the target object according to the parent process of the target process includes:

[0051] Determine control group information according to the parent process information of the target process, determine a target container, a target container group and a target node having the target process according to the control group information. Alternatively, obtain startup information layer by layer according to the parent process of the target process; and determine a target container unit according to the startup information and a preset matching character.

[0052] The process information of all processes in the host node can be queried through the command combination. The process information has a field for storing parent process information.

[0053] After obtaining the parent process information, different target object determination methods can be selected according to different situations, and accordingly, the determined target objects are different.

[0054] Exemplarily, the process ID (ppid) of the parent process is determined as the parent process information according to the process ID of the target process. Then, the control group information cgroup information under the parent process ID is obtained through the process ID ppid of the parent process. The target container container id or the target container group pod id containing the D state process can be obtained by filtering text, and the target container container id, the target container group pod id and the target node Node node information are output. Optionally, the above parent process can be the node's process number zero.

[0055] Exemplarily, the parent process (ppid) of the D-state process can be queried by executing the ps and grep commands through the process ID of the target process in the D state. The startup information (cmdline) is filtered and queried according to the preset matching character "docker". If the preset matching character is not in the startup information, the cmdline of the parent process of ppid is continuously searched until the preset matching character "docker" is found, and the characters after the preset matching character are the ID information of the target container docker.

[0056] The above implementations can accurately determine different types of target objects, such as target containers, target container groups, target nodes or target container units, in different ways, thereby automatically identifying different target objects and improving target object identification efficiency.

[0057] Exemplarily, assuming that step S101 and step S102 are performed in the form of a plug-in, the plug-in operation process is as follows:

[0058] Step 1. Execute the script command to filter the process number (pid) of the target process in D state on the Node node.

[0059] Step 2. If the process number (pid) of the target process is empty, the script return value is 0, and the corresponding node status information condition is an error false state;

[0060] Step 3. If the process ID of the target process is not empty, obtain the parent process (ppid) of the process ID, and then obtain the control group information cgroup under the process ID through the process ID ppid of the parent process. The container id or pod id containing the D state process can be obtained by filtering text, and the container id, pod id and Node node information are output. The script return value is 1, and the corresponding condition is correct true state.

[0061] The above implementation can realize real-time monitoring of the D state process on the node, and report it to the k8s upper management component API server, and then isolate the node to prevent Pod from being scheduled to the node. When an abnormality is detected, the detector will report the problem to the API server in the form of Event and Node Condition. When an abnormality is detected, the detector will report the problem to the API server in the form of Event and Node Condition.

[0062] Step S103: performing isolation control according to the target node where the target object is located.

[0063] Optionally, performing isolation control according to the target node where the target object is located includes:

[0064] The plug-in is also used to send target status detection results to the node problem detector so that the node problem detector can isolate and control the target node according to the received detection results. The detection results include target node status information or target status events. The target node status information indicates that the target object in the target node is continuously in the target state within a preset time, and the target state time indicates that the target object in the target node detects the target state.

[0065] When the plug-in detects that the target object in the node is in the target state, the plug-in can send a target state detection result to the node problem detector. The target state detection result includes a target state event, which is used to indicate that the target object is detected to be in the target state at a certain moment.

[0066] The plug-in may also send a target state detection result to the node problem detector when continuously detecting that the target object in the target node is in the target state. The target state detection result includes target node state information, which indicates that the target object is continuously in the target state.

[0067] Optionally, the plug-in can perform detection of target nodes only according to a preset frequency and delay. The node problem detector generates target node status information or target status events according to the detection results according to the configuration file.

[0068] The target status event can be sent by the node problem detector to the application interface service APIservice in the k8s control end for subsequent processing.

[0069] The above implementation method can detect the target node by means of target node status information or target status events and feed back to the node problem detector, thereby detecting the target node in multiple forms and improving ease of use.

[0070] Optionally, the node problem detector performs isolation control on the target node according to the received detection result, which can be implemented in the following manner:

[0071] The node problem detector determines the taint mark of the target node according to the target state detection result; and performs isolation control on the target node according to the taint mark.

[0072] The above implementation method can realize the control of nodes according to the taint mark, especially in the k8s scenario, with the help of the taint mark provided by k8s, the precise isolation control of nodes can be realized, thereby improving the node isolation efficiency.

[0073] Optionally, the node problem detector determines the taint mark of the target node according to the target state detection result, which can be implemented in the following manner:

[0074] The node problem detector determines the target mark that matches the target object number according to the number of target objects contained in the target node and multiple preset mark intervals, and determines the stain mark of the target node according to the target mark.

[0075] Three preset marking intervals can be configured, corresponding to three levels of taint marking. Optionally, the taint marking can be NoSchedule, PreferNoSchedule, NoExecute. The more target objects there are in the target node, the higher the degree of pollution of the target node. Different taint markings can correspond to different node isolation methods.

[0076] The above implementation can accurately determine the taint mark according to the number of target objects, improve the accuracy of the taint mark, and further improve the accuracy of the isolation control of the target node.

[0077] The node control method based on process state provided by the embodiment of the present invention obtains a target process in a target state, wherein the target state is an uninterruptible sleep state; determines a target object according to the parent process of the target process; and performs isolation control according to the target node where the target object is located. Compared with the current need to manually query the target state, the node control method based on process state provided by the embodiment of the present invention can identify the target process in the target state, and after determining the target process, determine the target object that calls the target process according to the parent process of the target process. The target node where the target object is located is isolated and controlled, and the target process in the target state is automatically identified, and the target node is isolated and controlled, thereby improving the target state identification efficiency and node control efficiency.

[0078] Figure 3 1 is a flow chart of a node control method based on process status provided by an embodiment of the present invention, including:

[0079] Step S201: Generate a configuration file adapted for the node problem detector, wherein the configuration file is used to record relevant parameters of the plug-in operation.

[0080] Step S202: create a plug-in in the node problem detector, the plug-in is used to obtain process information of multiple processes, the process information includes process name and process status; determine the target process according to the process status and a preset process identifier; the target state is an uninterruptible sleep state.

[0081] Step S203, determine the control group information according to the parent process information of the target process, and determine the target container, target container group and target node having the target process according to the control group information; or, obtain the startup information layer by layer according to the parent process of the target process; determine the target container unit according to the startup information and preset matching characters, and determine the target object according to the parent process of the target process.

[0082] Step S204: The plug-in is also used to send a target status detection result to the node problem detector.

[0083] The detection result includes target node status information or target status event, wherein the target node status information indicates that the target object in the target node is continuously in the target state within a preset time, and the target state time indicates that the target object in the target node detects the target state.

[0084] Step S205, the node problem detector determines the target mark that matches the target object number according to the number of target objects contained in the target node; determines the stain mark of the target node according to the target mark.

[0085] Step S206: performing isolation control on the target node according to the stain mark.

[0086] Figure 4 1 is a schematic diagram of a node control device based on process status provided by an embodiment of the present invention, which is suitable for detecting the D state in distributed container technology and performing node isolation control based on the D state. Figure 4 As shown, the device includes: a target process acquisition module 31, a target object determination module 32 and an isolation control module 33.

[0087] A target process acquisition module 31 is used to acquire a target process in a target state, where the target state is an uninterruptible sleep state;

[0088] A target object determination module 32, configured to determine a target object according to a parent process of the target process;

[0089] The isolation control module 33 is used to perform isolation control according to the target node where the target object is located.

[0090] On the basis of the above embodiment, optionally, a configuration module is further included, which is used to generate a configuration file adapted by the node problem detector before obtaining the target process in the target state, wherein the configuration file is used to record relevant parameters of the plug-in operation;

[0091] A plug-in creation module is used to create a plug-in in the node problem detector, and the plug-in is used to schedule the target process acquisition module 31 to obtain the target process in the target state, and the target state is an uninterruptible sleep state; the scheduling target object determination module 32 determines the target object according to the parent process of the target process.

[0092] On the basis of the above embodiment, optionally, the isolation control module 33 is used to send the target status detection result to the node problem detector according to the scheduling of the plug-in, so that the node problem detector can isolate and control the target node according to the received detection result, and the detection result includes target node status information or target status event. The target node status information indicates that the target object in the target node is continuously in the target state within a preset time, and the target state time indicates that the target object in the target node detects the target state.

[0093] Based on the above embodiment, optionally, the node problem detector determines a taint mark of the target node according to the target state detection result; and isolates and controls the target node according to the taint mark.

[0094] Based on the above embodiment, optionally, the node problem detector determines the taint mark of the target node according to the target state detection result, including:

[0095] The node problem detector is based on the number of target objects included in the target node;

[0096] A target mark matching the number of target objects is determined according to a plurality of preset mark intervals, and a stain mark of the target node is determined according to the target mark.

[0097] Based on the above embodiment, optionally, the target process acquisition module 31 is used to:

[0098] Obtaining process information of multiple processes, wherein the process information includes process name and process status;

[0099] The target process is determined according to the process state and the preset process identifier.

[0100] Based on the above embodiment, optionally, the process information further includes parent process information; accordingly, the target object determination module 32 is used to:

[0101] Determine control group information according to the parent process information of the target process, and determine a target container, a target container group and a target node having the target process according to the control group information; or, obtain startup information layer by layer according to the parent process of the target process; and determine a target container unit according to the startup information and a preset matching character.

[0102] The node control device based on process state provided by the embodiment of the present invention comprises a target process acquisition module 31, which is used to acquire a target process in a target state, wherein the target state is an uninterruptible sleep state; a target object determination module 32, which is used to determine a target object according to the parent process of the target process; and an isolation control module 33, which is used to perform isolation control according to the target node where the target object is located. Compared with the current manual query of the target state, the node control device based on process state provided by the embodiment of the present invention can identify the target process in the target state, and after determining the target process, determine the target object for calling the target process according to the parent process of the target process. The target node where the target object is located is isolated and controlled, and the target process in the target state is automatically identified. The target node is isolated and controlled, and the target state identification efficiency and node control efficiency are improved.

[0103] The process state-based node control device provided in the embodiment of the present invention can execute the process state-based node control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0104] Figure 51 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0105] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0106] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0107] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a node control method based on process status.

[0108] In some embodiments, the node control method based on process state can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the node control method based on process state described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the node control method based on process state by any other appropriate means (for example, by means of firmware).

[0109] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0110] The computer program for implementing the process state-based node control method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0111] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute a node control method based on process status, the method comprising:

[0112] Acquire a target process in a target state, wherein the target state is an uninterruptible sleep state;

[0113] Determine a target object according to a parent process of the target process;

[0114] Isolation control is performed according to the target node where the target object is located.

[0115] Based on the above embodiment, optionally, before acquiring the target process in the target state, the method further includes:

[0116] Generate a configuration file adapted for the node problem detector, where the configuration file is used to record relevant parameters for the operation of the plug-in;

[0117] Accordingly, obtaining a target process in a target state and determining a target object according to a parent process of the target process include:

[0118] A plug-in is created in the node problem detector, and the plug-in is used to obtain a target process in a target state, where the target state is an uninterruptible sleep state; and a target object is determined according to a parent process of the target process.

[0119] Based on the above embodiment, optionally, performing isolation control according to the target node where the target object is located includes:

[0120] The plug-in is also used to send target status detection results to the node problem detector so that the node problem detector can isolate and control the target node according to the received detection results. The detection results include target node status information or target status events. The target node status information indicates that the target object in the target node is continuously in the target state within a preset time, and the target state time indicates that the target object in the target node detects the target state.

[0121] Based on the above embodiment, optionally, the node problem detector performs isolation control on the target node according to the received detection result, including:

[0122] The node problem detector determines the taint mark of the target node according to the target state detection result;

[0123] The target node is isolated and controlled according to the taint mark.

[0124] Based on the above embodiment, optionally, the node problem detector determines the taint mark of the target node according to the target state detection result, including:

[0125] The node problem detector is based on the number of target objects included in the target node;

[0126] A target mark matching the number of target objects is determined according to a plurality of preset mark intervals, and a stain mark of the target node is determined according to the target mark.

[0127] Based on the above embodiment, optionally, obtaining a target process in a target state includes:

[0128] Obtaining process information of multiple processes, wherein the process information includes process name and process status;

[0129] The target process is determined according to the process state and the preset process identifier.

[0130] Based on the above embodiment, optionally, the process information further includes parent process information; accordingly, determining the target object according to the parent process of the target process includes:

[0131] Determine control group information according to the parent process information of the target process, and determine a target container, a target container group, and a target node having the target process according to the control group information; or

[0132] The startup information is acquired layer by layer according to the parent process of the target process; and the target container unit is determined according to the startup information and a preset matching character.

[0133] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0134] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0135] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0136] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0137] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0138] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A node control method based on process status, characterized in that: include: Acquire a target process in a target state, wherein the target state is an uninterruptible sleep state; Determine a target object according to a parent process of the target process; Isolation control is performed according to the target node where the target object is located.

2. The method according to claim 1, characterized in that: Before getting the target process in the target state, also include: Generate a configuration file adapted for the node problem detector, where the configuration file is used to record relevant parameters for the operation of the plug-in; Accordingly, obtaining a target process in a target state and determining a target object according to a parent process of the target process include: A plug-in is created in the node problem detector, and the plug-in is used to obtain a target process in a target state, where the target state is an uninterruptible sleep state; and a target object is determined according to a parent process of the target process.

3. The method according to claim 2, characterized in that Performing isolation control according to the target node where the target object is located includes: The plug-in is also used to send target status detection results to the node problem detector so that the node problem detector can isolate and control the target node according to the received detection results. The detection results include target node status information or target status events. The target node status information indicates that the target object in the target node is continuously in the target state within a preset time, and the target state time indicates that the target object in the target node detects the target state.

4. The method according to claim 3, characterized in that The node problem detector performs isolation control on the target node according to the received detection result, including: The node problem detector determines the taint mark of the target node according to the target state detection result; The target node is isolated and controlled according to the taint mark.

5. The method according to claim 4, characterized in that The node problem detector determines the taint mark of the target node according to the target state detection result, including: The node problem detector is based on the number of target objects included in the target node; A target mark matching the number of target objects is determined according to a plurality of preset mark intervals, and a stain mark of the target node is determined according to the target mark.

6. The method according to claim 1, characterized in that Get the target process in the target state, including: Obtaining process information of multiple processes, wherein the process information includes process name and process status; The target process is determined according to the process state and the preset process identifier.

7. The method according to claim 6, characterized in that The process information also includes parent process information; accordingly, determining the target object according to the parent process of the target process includes: Determine control group information according to the parent process information of the target process, and determine a target container, a target container group, and a target node having the target process according to the control group information; or The startup information is acquired layer by layer according to the parent process of the target process; and the target container unit is determined according to the startup information and a preset matching character.

8. A node control device based on process status, characterized in that: include: A target process acquisition module, used to acquire a target process in a target state, wherein the target state is an uninterruptible sleep state; A target object determination module, used to determine the target object according to the parent process of the target process; The isolation control module is used to perform isolation control according to the target node where the target object is located.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the node control method based on process status described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the node control method based on process status according to any one of claims 1 to 7 when executed.