WO2023115836A1 - 分布式作业系统控制方法、装置、设备、介质及程序产品 - Google Patents
分布式作业系统控制方法、装置、设备、介质及程序产品 Download PDFInfo
- Publication number
- WO2023115836A1 WO2023115836A1 PCT/CN2022/097438 CN2022097438W WO2023115836A1 WO 2023115836 A1 WO2023115836 A1 WO 2023115836A1 CN 2022097438 W CN2022097438 W CN 2022097438W WO 2023115836 A1 WO2023115836 A1 WO 2023115836A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- container
- fault type
- type
- identifier
- rebuilt
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0751—Error or fault detection not based on redundancy
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0706—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
- G06F11/0712—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a virtual computing platform, e.g. logically partitioned systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0706—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
- G06F11/0709—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a distributed system consisting of a plurality of standalone computer nodes, e.g. clusters, client-server systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/079—Root cause analysis, i.e. error or fault diagnosis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0793—Remedial or corrective actions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/142—Reconfiguring to eliminate the error
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1438—Restarting or rejuvenating
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
- G06F11/1479—Generic software techniques for error detection or fault masking
- G06F11/1482—Generic software techniques for error detection or fault masking using middleware or operating system [OS] functionalities
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
- G06F11/1479—Generic software techniques for error detection or fault masking
- G06F11/1482—Generic software techniques for error detection or fault masking using middleware or operating system [OS] functionalities
- G06F11/1484—Generic software techniques for error detection or fault masking using middleware or operating system [OS] functionalities involving virtual machines
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45575—Starting, stopping, suspending or resuming virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45591—Monitoring or debugging support
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/815—Virtual
Definitions
- the present disclosure relates to the technical field of computer applications, in particular to the technical field of distributed operations.
- the distributed job system is used to execute the distributed job, and it carries the corresponding process of the distributed job through one or more containers. Further, the job result of the distributed job is obtained through the process execution result of the corresponding process.
- the disclosure provides a distributed operation system control method, device, equipment, medium and program product.
- a method for controlling a distributed operating system comprising:
- determining a current failure type of the first container failure in response to detecting that the first process is terminated by a triggering process based on the first container failing, determining a current failure type of the first container failure; if the current failure type is consistent with the target fault type, rebuild the first container, and restart the first process based on the rebuilt first container; wherein, the target fault type is applicable to the distributed job to which the first container belongs The failure type of each container rebuild in the system.
- a distributed operating system control device comprising:
- the detection module is configured to detect, with respect to the first container carrying the first process, that the first process is terminated by the triggered process based on the failure of the first container; the determination module, in response to detecting that the first process is terminated based on the first container When a container fails and is terminated by the trigger process, determine the current fault type of the first container fault; the processing module is configured to rebuild the first container when the current fault type is consistent with the target fault type, and Restarting the first process based on the rebuilt first container; wherein, the target failure type is a failure type applicable to the reconstruction of each container in the distributed operating system to which the first container belongs.
- an electronic device including:
- the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the above-mentioned method for controlling a distributed operating system.
- a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to make the computer execute the above-mentioned distributed operating system control method.
- a computer program product including a computer program, and the computer program is executed by a processor to execute the above-mentioned method for controlling a distributed operating system.
- FIG. 1 is a schematic flow diagram of a method for controlling a distributed operating system according to the present disclosure
- FIG. 2 is a schematic flow diagram of determining that the current fault type is consistent with the target fault type according to the present disclosure
- Fig. 3 is another schematic flow chart of determining that the current fault type is consistent with the target fault type according to the present disclosure
- FIG. 4 is a schematic flowchart of another control method for a distributed operating system according to the present disclosure.
- FIG. 5 is a schematic flow diagram of another method for controlling a distributed operating system according to the present disclosure.
- Fig. 6 is a block diagram of a distributed operating system control device according to the present disclosure.
- Fig. 7 is a block diagram of an electronic device for implementing the method for controlling a distributed operating system according to an embodiment of the present disclosure.
- the method for controlling a distributed operation system may be applied to a distributed operation scenario.
- a distributed operation scenario For example, it can be applied to scenarios where artificial intelligence (AI) training is performed through distributed operations.
- AI artificial intelligence
- the distributed job system is used to execute the distributed job, and it carries the corresponding process of the distributed job through one or more containers.
- a container carrying a corresponding process may fail. If a container fails, the process carried by the faulty container will be terminated, and the job content corresponding to the process cannot be completed.
- the failed container is usually rebuilt, and the previously terminated process is restarted with the rebuilt container.
- failures that occur in containers, including those that are applicable to the reconstruction of each container in a distributed operating system (for example, a system failure that occurs in the failed container itself), and those that are not applicable to the reconstruction of each container in a distributed operating system type of failure (for example, a code failure caused by a program error).
- a distributed operating system type of failure for example, a code failure caused by a program error.
- the distributed operating system can rebuild the faulty container, but for the fault types that are not applicable to the rebuilding of each container in the distributed operating system, the distributed operating system cannot successfully rebuild the faulty container .
- container reconstruction scenarios are not differentiated according to the types of failures that occur in containers, and the distributed operating system will perform container reconstruction no matter what type of failure occurs in the container. Based on this, if the fault type of the faulty container is not suitable for the reconstruction of each container in the distributed operating system, not only cannot the execution result of the process carried by the faulty container be obtained, but also the As a result, the overall operation period of the distributed operation is lengthened, and this method cannot meet the operation requirements for the distributed operation system.
- An embodiment of the present disclosure provides a control method for a distributed operating system, which can determine the current failure type of the container when a container fails, and perform type matching between the current failure type and the target failure type. Further, under the condition that the current fault type is consistent with the target fault type, rebuild the faulty container. Since the target fault type is a fault type suitable for reconstruction of each container in the distributed operating system, the distributed operating system can successfully complete the reconstruction of the container. Based on this, after the faulty container is rebuilt, the previously terminated process is restarted, and the execution result is merged into the job result of the job to which the process belongs. This method can meet job requirements.
- the failed container is referred to as the first container
- the process terminated by the triggering process due to the failure of the first container is referred to as the first process.
- the first process is a process carried by the first container.
- Fig. 1 is a schematic flowchart of a method for controlling a distributed operating system according to the present disclosure, as shown in Fig. 1 , including the following steps.
- step S101 in response to detecting that the first process is terminated by the triggering process based on the failure of the first container, the current failure type of the failure of the first container is determined.
- step S102a if the current fault type is consistent with the target fault type, the first container is rebuilt, and the first process is restarted based on the rebuilt first container.
- the target failure type is a failure type suitable for reconstruction of each container in the distributed operation system.
- the container has a failure of the target failure type, which means that the container can be successfully rebuilt.
- the reconstruction results corresponding to the container may be pre-determined (for example, the reconstruction results include reconstruction success and/or reconstruction failure). Further, according to the reconstruction result, the failure type applicable to the reconstruction of each container in the distributed operating system is determined, and the target failure type is set accordingly.
- the first container can be successfully rebuilt.
- the first container is rebuilt, and the first process is restarted through the rebuilt first container. Based on this, the execution result of the first process can be obtained, and then the execution result of the first process can be added to the job result of the job to which the first process belongs, so as to meet job requirements.
- step S102b if the current fault type is inconsistent with the target fault type, the first container is not rebuilt.
- the first container is not rebuilt.
- the first process can be discarded to obtain the final job result of the job to which the first process belongs.
- it can be judged that the job result of the job to which the first process belongs is job failure, or directly judge that the job result of the job to which the first process belongs is job failure. fail.
- the job elasticity involved in the above embodiment is used to characterize the correctness of the job result of the job to which the first process belongs without supplementing the execution result of the first process.
- the distributed operation system control method provided by the embodiment of the present disclosure can rebuild the fault container and restart the terminated process to obtain the execution result corresponding to the previously terminated process, which can satisfy the situation that the current fault type is consistent with the target fault type. homework needs.
- container rebuilding may not be performed, reducing the possibility of the overall job cycle being too long due to the inability to complete the restart and rebuilding process, and meeting job requirements.
- corresponding identifiers may be set for the current fault type and the target fault type respectively. Based on this, judging whether the current fault type is consistent with the target fault type can be realized by setting a corresponding flag according to the current fault type and the target fault type.
- the flag set according to the target fault type is called the first flag
- the flag set according to the current fault type occurring in the container is called the second flag
- Fig. 2 is a schematic flowchart of determining that the current fault type is consistent with the target fault type according to the present disclosure, as shown in Fig. 2 , including the following steps.
- the first identifier representing the target fault type may be preset and stored in the distributed operation system. Based on this, the following method can be used to determine that the current fault type is consistent with the target fault type.
- step S201 a second identifier representing the current fault type is acquired.
- step S202 it is determined that the first identifier matches the second identifier.
- the first identifier and/or the second identifier can be set in a manner that can achieve type matching through an identification code, an instruction, or a judgment condition, and the present disclosure does not specifically limit the setting method of the first identifier and/or the second identifier.
- the distributed operation system control method provided by the embodiment of the present disclosure judges the fault category by means of identification matching, which is convenient, fast, easy to implement, and can meet operation requirements.
- the container will generate an exit code when the process terminates.
- the exit code generated by the container is a numerical code within the range of 0 to 255.
- the container generates an exit code of 0 for process termination triggered when the process completes.
- the container generates an exit code that matches the type of failure that occurred (for example, in the case of a container failure, the value of the exit code generated by the container is any value from 1 to 255 ).
- the exit code inherent to the container and generated when a fault occurs may be used as the second identifier representing the current fault type of the container.
- the exit code generated by the container when such a failure occurs can be used as the first identifier. Based on this, the identification generated by the distributed operating system can be used to identify the current failure type of the container and whether the container can be restarted. This method does not require additional identification and can meet the user's setting requirements.
- the exit code representing the failure type applicable to the reconstruction of each container in the distributed operation system is called the first exit code
- the exit code representing the current failure type of the first container is called the second exit code
- Fig. 3 is another schematic flowchart of determining that the current fault type is consistent with the target fault type according to the present disclosure, as shown in Fig. 3 , including the following steps.
- step S301 a second exit code generated by the first container based on the current failure type is obtained.
- the distributed operation system can know the type of failure that occurs in the container, and the container can generate an exit code with a corresponding value according to the learned type of failure.
- the conventional method in the prior art may be used to know the type of the failure of the container. For example, if the distributed operating system has a first number of resource cards, but currently only detects a second number (for example, the second number is less than the first number) of resource cards, it can be determined that the current failure type of the container is a system script Fault type of dropped card.
- other fault types such as video memory faults, computing power faults, and code faults can also be detected, which will not be described here.
- step S302 it is determined that the first exit code matches the second exit code.
- the type of failure currently occurring in the container is a type of failure applicable to reconstruction of each container in the distributed operating system. Based on this, corresponding steps such as container reconstruction and process restart can be performed subsequently.
- the distributed job system cannot retain the intermediate results in the job process.
- the process execution results obtained after rebuilding the faulty container and restarting the terminated process cannot be filled in.
- the result of the completed job In this case, even if the faulty container is rebuilt, the terminated process is restarted, and the execution result of the process is obtained, the correct job result cannot be obtained.
- container reconstruction information matching the distributed job may be configured in the distributed job system, and the information is used to indicate the container to be rebuilt when the container fails. Further, in the case of a container failure, container reconstruction information that matches the job to which the faulty container belongs can be acquired, and the container to be reconstructed that matches the container reconstruction information can be determined and reconstructed based on the acquired container reconstruction information.
- the container to be rebuilt includes the first container through the container reconstruction information
- the first container that has failed can be rebuilt, and then the process execution result can be obtained by restarting the process, and then the process execution result can be added. way to get the correct job results.
- Fig. 4 is a schematic flow diagram of another control method for a distributed operating system according to the present disclosure. As shown in Fig. 4, the implementation process of step S401 in the embodiment of the present disclosure is similar to that of step S101 in Fig. 1 , and will not be repeated here. .
- step S402 if the current fault type is consistent with the target fault type, container reconstruction information is obtained, and the container to be reconstructed is determined based on the container reconstruction information.
- step S403 if the container to be rebuilt includes the first container, rebuild the first container, and restart the first process based on the rebuilt first container.
- container reconstruction information when it is determined through container reconstruction information that the containers to be reconstructed include not only the first container, all containers to be reconstructed that match the container reconstruction information may be restarted.
- Fig. 5 is a schematic flowchart of another control method for a distributed operating system according to the present disclosure. As shown in Fig. 5 , the implementation process of step S501 and step S502 in the embodiment of the present disclosure is similar to that of step S401 and step S402 in Fig. 4 , which will not be described here.
- step S503 if the container to be rebuilt includes the first container and the second container, rebuild the first container and the second container, restart the first process based on the rebuilt first container, and restart the second process based on the rebuilt second container Second process.
- the second container may include at least one of the following containers:
- the second container included in the container reconstruction information is used to jointly re-execute the corresponding process with the first container, so that a correct intermediate result can be obtained during the operation process, and then a correct operation result can be obtained.
- rebuilding the first container and the second container, and restarting the corresponding process is equivalent to re-executing the replica set, so as to obtain a correct execution result matching the replica set.
- rebuilding the first container and the second container, and restarting the corresponding process is equivalent to re-executing the job to which the first container belongs, so as to obtain the correct job result of the matching job. It should be noted that the present disclosure can rebuild any number of containers according to actual usage requirements, and the above-mentioned cases (1) to (3) are only reference examples.
- the distributed system control method provided by the embodiments of the present disclosure can perform container rebuilding at different granularities for containers, and meet container rebuilding requirements for different scenarios.
- the present disclosure may also configure, for example, rebuilding policy information, event information, and/or rebuilding time information for the distributed operating system according to job requirements.
- the reconstruction policy information represents the on/off instructions for rebuilding the container, and the user can "one-click close" the container reconstruction by setting the reconstruction policy information.
- the container is rebuilt to meet the user's personalized configuration requirements for different job scenarios.
- Event information can be understood as information that characterizes the corresponding state parameters of the distributed operating system, for example, it can include information such as machine state, number of available nodes, and location.
- the rebuild time information characterizes the time limit for the "container rebuild" event. For example, when the rebuilding time of the faulty container exceeds a corresponding time period, the rebuilding process can be terminated and the job can be ended.
- the current state of the container can be synchronized in real time through the state machine.
- the state of a job can be changed from running to terminating when a container fails and the process terminates.
- the state of the container is changed from terminating to restarting, and when the container is rebuilt and the corresponding process is restarted, the state of the container is changed from restarting to running.
- the control method of the distributed operation system provided by the embodiment of the present disclosure can make the distributed operation system or the user perceive the state of the container in a timely manner by displaying the corresponding state of the container through the state machine, so as to meet the operation requirements.
- the embodiment of the present disclosure also provides a distributed operation system control device.
- the naming device provided in the embodiments of the present disclosure includes corresponding hardware structures and/or software modules for performing various functions. Combining the modules and algorithm steps of the examples disclosed in the embodiments of the present disclosure, the embodiments of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the technical solutions of the embodiments of the present disclosure.
- Fig. 6 is a block diagram of a distributed operating system control device according to the present disclosure.
- the device 600 includes a detection module 601 , a determination module 602 and a processing module 603 .
- the detection module 601 is configured to, for the first container carrying the first process, detect that the first process is terminated by the triggered process based on the failure of the first container.
- the determining module 602 in response to detecting that the first process is terminated by the triggering process based on the failure of the first container, determines the current failure type of the failure of the first container.
- the processing module 603 is configured to rebuild the first container when the current fault type is consistent with the target fault type, and restart the first process based on the reconstructed first container.
- the target failure type is a failure type suitable for reconstruction of each container in the distributed operating system to which the first container belongs.
- the target fault type is represented by a first identifier.
- the determination module 602 determines that the current fault type is consistent with the target fault type in the following manner: acquire a second identifier representing the current fault type. It is determined that the first identification matches the second identification.
- the first identifier includes a first exit code generated by the first container when a fault of the target fault type occurs in the first container.
- the determining module 602 obtains the second identifier representing the current fault type in the following manner: obtains the second exit code generated by the first container based on the current fault type.
- the determining module 602 determines that the first identifier matches the second identifier in the following manner: determine that the first exit code matches the second exit code.
- the determining module 602 is further configured to: before rebuilding the first container, obtain container rebuilding information, the container rebuilding information is used to indicate the container to be rebuilt when the container fails, and determine the to-be-rebuilt container based on the container rebuilding information
- the containers include a first container.
- the determining module 602 is further configured to: if it is determined based on the container rebuilding information that the container to be rebuilt includes the second container, rebuild the second container, and restart the second container carried by the second container based on the rebuilt second container. process.
- the second container is at least one of the following containers: a container in the replica set to which the first container belongs. A container in the replica set that is associated with the replica set to which the first container belongs. The container in the job to which the first container belongs.
- the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
- FIG. 7 shows a schematic block diagram of an example electronic device 700 that may be used to implement embodiments of the present disclosure.
- Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers.
- Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices.
- the components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
- the device 700 includes a computing unit 701 that can execute according to a computer program stored in a read-only memory (ROM) 702 or loaded from a storage unit 708 into a random-access memory (RAM) 703. Various appropriate actions and treatments. In the RAM 703, various programs and data necessary for the operation of the device 700 can also be stored.
- the computing unit 701, ROM 702, and RAM 703 are connected to each other through a bus 704.
- An input/output (I/O) interface 705 is also connected to the bus 704 .
- the I/O interface 705 includes: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, an optical disk, etc. ; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, and the like.
- the communication unit 709 allows the device 700 to exchange information/data with other devices over a computer network such as the Internet and/or various telecommunication networks.
- the computing unit 701 may be various general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of computing units 701 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc.
- the computing unit 701 executes various methods and processes described above, such as a distributed operating system control method.
- the distributed operating system control method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 708 .
- part or all of the computer program may be loaded and/or installed on the device 700 via the ROM 702 and/or the communication unit 709.
- the computer program When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the above-described distributed operating system control method can be executed.
- the computing unit 701 may be configured in any other appropriate way (for example, by means of firmware) to execute the distributed operating system control method.
- 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 Implemented in a system of systems (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof.
- FPGAs field programmable gate arrays
- ASICs application specific integrated circuits
- ASSPs application specific standard products
- SOC system of systems
- CPLD load programmable logic device
- computer hardware firmware, software, and/or combinations thereof.
- programmable processor can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.
- Program codes for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action is implemented.
- the program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
- a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
- a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
- a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
- machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
- RAM random access memory
- ROM read only memory
- EPROM or flash memory erasable programmable read only memory
- CD-ROM compact disk read only memory
- magnetic storage or any suitable combination of the foregoing.
- the systems and techniques described herein can be implemented on a computer 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 pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer.
- a display device e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor
- a keyboard and pointing device eg, a mouse or a trackball
- Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.
- the systems and techniques described herein can be implemented in a computing system that includes back-end 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 front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system.
- the components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: Local Area Network (LAN), Wide Area Network (WAN) and the Internet.
- a computer system may include clients and servers.
- Clients and servers are generally remote from each other and typically interact through a communication network.
- the relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.
- the server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
- steps may be reordered, added or deleted using the various forms of flow shown above.
- each step described in the present disclosure may be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in the present disclosure can be achieved, no limitation is imposed herein.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Mathematical Physics (AREA)
- Computer Hardware Design (AREA)
- Retry When Errors Occur (AREA)
- Hardware Redundancy (AREA)
Abstract
本公开提供了一种分布式作业系统控制方法、装置、设备、介质及程序产品,涉及计算机应用技术领域,尤其涉及分布式作业技术领域。具体实现方案为:针对承载第一进程的第一容器,响应于检测到所述第一进程基于所述第一容器发生故障被触发进程终止,确定所述第一容器发生故障的当前故障类型;若所述当前故障类型与目标故障类型一致,则重建所述第一容器,并基于重建后的第一容器,重启所述第一进程。本公开可以针对能够成功重建容器的故障类型,进行容器重建,而针对无法成功重建容器的故障类型,不进行容器重建,以此节省系统操作成本,满足作业需求。
Description
本公开涉及计算机应用技术领域,尤其涉及分布式作业技术领域。
分布式作业系统用于执行分布式作业,其通过一个或多个容器,承载分布式作业的相应进程。进一步的,通过相应进程的进程执行结果,得到分布式作业的作业结果。
发明内容
本公开提供了一种分布式作业系统控制方法、装置、设备、介质及程序产品。
根据本公开的一方面,提供了一种分布式作业系统控制方法,所述方法包括:
针对承载第一进程的第一容器,响应于检测到所述第一进程基于所述第一容器发生故障被触发进程终止,确定所述第一容器发生故障的当前故障类型;若所述当前故障类型与目标故障类型一致,则重建所述第一容器,并基于重建后的第一容器,重启所述第一进程;其中,所述目标故障类型为适用于所述第一容器所属分布式作业系统中各容器重建的故障类型。
根据本公开的另一方面,提供了一种分布式作业系统控制装置,所述装置包括:
检测模块,用于针对承载第一进程的第一容器,检测所述第一进程基于所述第一容器发生故障被触发进程终止;确定模块,响应于检测到所述第一进程基于所述第一容器发生故障被触发进程终止,确定所述第一容器发生故障的当前故障类型;处理模块,用于在所述当前故障类型与目标故障类型一致的情况下,重建所述第一容器,并基于重建后的第一容器,重启所述第一进程;其中,所述目标故障类型为适用于所述第一容器所属分布式作业系统中各容器重建的故障类型。
根据本公开的另一方面,提供了一种电子设备,包括:
至少一个处理器;以及
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述涉及的分布式作业系统控制方法。
根据本公开的另一方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行上述涉及的分布式作业系统控制方法。
根据本公开的另一方面,提供了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行上述涉及的分布式作业系统控制方法。
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。
附图用于更好地理解本方案,不构成对本公开的限定。其中:
图1是根据本公开的分布式作业系统控制方法的流程示意图;
图2是根据本公开的确定当前故障类型与目标故障类型一致的流程示意图;
图3是另一根据本公开的确定当前故障类型与目标故障类型一致的流程示意图;
图4是另一根据本公开的分布式作业系统控制方法的流程示意图;
图5是又一根据本公开的分布式作业系统控制方法的流程示意图;
图6是根据本公开的分布式作业系统控制装置框图。
图7是用来实现本公开实施例的分布式作业系统控制的方法的电子设备的框图。
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的 描述中省略了对公知功能和结构的描述。
本公开实施例提供的分布式作业系统控制方法,可以应用于分布式作业场景。例如,可以应用于通过分布式作业的方式进行人工智能(Artificial Intelligence,AI)训练的场景。
分布式作业系统用于执行分布式作业,其通过一个或多个容器,承载分布式作业的相应进程。相关技术中,在分布式作业系统执行分布式作业的过程中,承载有相应进程的容器可能会发生故障。若出现容器发生故障的情况,则故障容器所承载的进程会被终止,进程对应的作业内容无法被完成。相关技术中,针对因容器故障而被迫终止的进程,为得到该进程对应的执行结果,通常会对故障的容器进行容器重建,并以重建后的容器重启先前被终止的进程。
通常的,容器发生的故障类型有多种,包括适用于分布式作业系统中各容器重建的故障类型(例如,故障容器本身发生的系统故障),以及不适用于分布式作业系统中各容器重建的故障类型(例如,因程序错误引发的代码故障)。针对适用于分布式作业系统中各容器重建的故障类型,分布式作业系统能够重建故障容器,但针对不适用于分布式作业系统中各容器重建的故障类型,分布式作业系统无法成功重建故障容器。
相关技术中,不会针对容器发生的故障类型,进行容器重建场景的区分,不论容器发生了何种故障类型的故障,分布式作业系统都会进行容器重建。基于此,若故障容器的故障类型为不适用于分布式作业系统中各容器重建的故障类型,不但无法得到故障容器所承载进程的执行结果,还会因分布式作业系统持续等待容器重建完成而导致分布式作业的整体作业周期被拉长,该方法无法满足针对分布式作业系统的作业需求。
本公开实施例提供了一种分布式作业系统控制方法,可以在容器发生故障的情况下,确定容器发生的当前故障类型,并将当前故障类型与目标故障类型进行类型匹配。进一步的,在当前故障类型与目标故障类型一致的情况下,进行故障容器的重建。由于目标故障类型为适用于分布式作业系统中各容器重建的故障类型,因此,分布式作业系统可以顺利完成容器的重建工作。基于此,故障容器被重建后,先前被终止的进程重启,得到执行结果并入进程所属作业的作业结果,该方法可以满足作业需求。
本公开以下为便于描述,将发生故障的容器称为第一容器,将因第一容器发生故障而被触发进程终止的进程,称为第一进程。其中,可以理解的是,第一进程为第一容器所承载的进程。
图1是根据本公开的分布式作业系统控制方法的流程示意图,如图1所示,包括以下步骤。
在步骤S101中,响应于检测到第一进程基于第一容器发生故障被触发进程终止,确定第一容器发生故障的当前故障类型。
在步骤S102a中,若当前故障类型与目标故障类型一致,则重建第一容器,并基于重建后的第一容器,重启第一进程。
本公开实施例中,目标故障类型为适用于分布式作业系统中各容器重建的故障类型。换言之,容器发生了目标故障类型的故障,即表征容器能够被成功重建。示例的,可以预先判别容器发生不同故障类型的故障时,容器对应的重建结果(示例的,重建结果包括重建成功和/或重建失败)。进一步的,根据重建结果,确定适用于分布式作业系统中各容器重建的故障类型,并以此设置目标故障类型。
示例的,针对当前故障类型与目标故障类型一致的场景,确定第一容器能够被成功重建。该情况下,重建第一容器,并通过重建后的第一容器重启第一进程。基于此,可以得到第一进程的执行结果,后续将第一进程的执行结果补入第一进程所属作业的作业结果,可以满足作业需求。
在步骤S102b中,若当前故障类型与目标故障类型不一致,则不重建第一容器。
示例的,针对当前故障类型与目标故障类型不一致的场景,不重建第一容器。针对此类不重建第一容器的情况,一实施方式中,可以在确认第一进程所属作业的作业弹性符合要求的情况下,舍弃第一进程,得到第一进程所属作业的最终作业结果。另一实施方式中,可以在确认第一进程所属作业的作业弹性不符合要求的情况下,判别第一进程所属作业的作业结果为作业失败,或直接判别第一进程所属作业的作业结果为作业失败。进一步的,可以根据后续实际需求,选择舍弃作业或以完整流程重新执行作业。上述实施例中涉及的作业弹性,用于表征在不补入第一进程的执行结果的情况下,第一进程所属作业的作业结果正确性。
本公开实施例提供的分布式作业系统控制方法,针对当前故障类型与目标故障类型一致针对的情况,重建故障容器,重启被终止的进程,可以得到先前被终止的进程对应的执行结果,可以满足作业需求。针对当前故障类型与目标故障类型不一致的情况,可以不进行容器重建,减小因重启重建流程无法完成而导致作业整体周期过长的可能性,可以满足作业需求。
示例的,可以针对当前故障类型以及目标故障类型,分别设置相应的标识。基于此,判断当前故障类型与目标故障类型是否一致,可以通过根据当前故障类型以及目标故障类型设置的相应标识实现。
本公开以下为便于描述,将根据目标故障类型设置的标识称为第一标识,将根据容器发生的当前故障类型设置的标识称为第二标识。
图2是根据本公开的确定当前故障类型与目标故障类型一致的流程示意图,如图2所示,包括以下步骤。
示例的,表征目标故障类型的第一标识可以预先设置并存储于分布式作业系统。基于此,可以采用如下方式确定当前故障类型与目标故障类型一致。
在步骤S201中,获取表征当前故障类型的第二标识。
在步骤S202中,确定第一标识与第二标识匹配。
示例的,第一标识和/或第二标识,可以通过标识码、指令或判断条件等能够实现类型匹配的方式设置,本公开对第一标识和/或第二标识设置方式不做具体限定。
本公开实施例提供的分布式作业系统控制方法,通过标识匹配的方式,进行故障类别的判断,方便快捷,易于实现,可以满足作业需求。
通常的,容器会在进程终止的情况下,生成退出码。其中,容器生成的退出码为0至255范围内的数值码。例如,针对完成进程时触发的进程终止,容器生成数值为0的退出码。又例如,针对容器发生故障导致的进程终止,容器生成匹配所发生的故障类型的退出码(示例的,针对容器发生故障的情况,容器生成的退出码的数值为1至255中的任一数值)。
一实施方式中,可以将容器固有的,在发生故障时生成的退出码,作为表征容器当前故障类型的第二标识。并且,相应的,可以针对适用于分布式作业系统中各容器重建的故障类型,将容器在发生此类故障时生成的 退出码作为第一标识。基于此,可以通过分布式作业系统固有生成的标识,实现识别容器当前发生故障的故障类型,是否能够实现容器重启,该方法无需额外设置标识,可以满足用户的设置需求。
本公开以下为便于描述,将表征适用于分布式作业系统中各容器重建的故障类型的退出码称为第一退出码,将表征第一容器当前故障类型的退出码称为第二退出码。
图3是另一根据本公开的确定当前故障类型与目标故障类型一致的流程示意图,如图3所示,包括以下步骤。
在步骤S301中,获取第一容器基于当前故障类型生成的第二退出码。
本公开实施例中,分布式作业系统可以获知容器发生的故障类型,容器可以针对获知的故障类型,生成相应数值的退出码。其中,获知容器发生的故障类型,可以采用现有技术中的常规方式。例如,若分布式作业系统具有第一数量的资源卡,而当前仅检测到第二数量(示例的,第二数量小于第一数量)资源卡,则可以确定容器当前发生的故障类型为系统脚本掉卡的故障类型。此外,与上述方式类似的,还可以检测例如显存故障、算力故障以及代码故障等其他故障类型,在此不做赘述。
在步骤S302中,确定第一退出码与第二退出码匹配。
示例的,在确定第一退出码与第二退出码匹配的情况下,则可以确定容器当前发生的故障类型为适用于分布式作业系统中各容器重建的故障类型。基于此,后续可以执行容器重建以及进程重启等相应步骤。
通常的,分布式作业系统无法保留作业过程中的中间结果,针对需要通过中间结果解算作业结果的分布式作业,重建故障容器以及重启被终止进程后得到的进程执行结果,无法通过补入已完成的作业结果。该情况下,即使重建故障容器,重启被终止的进程,得到进程执行结果,也无法获得正确的作业结果。
本公开实施例中,为保证作业结果的正确性,可以在分布式作业系统中配置匹配分布式作业的容器重建信息,该信息用于指示在容器发生故障时的待重建容器。进一步的,可以在容器发生故障的情况下,获取匹配故障容器所属作业的容器重建信息,并通过所获取的容器重建信息,确定并重建匹配容器重建信息的待重建容器。
一实施方式中,可以在通过容器重建信息,确定待重建容器包括第一容器的情况下,重建发生故障的第一容器,后续通过重启进程,得到进程执行结果,进而通过补入进程执行结果的方式,得到正确的作业结果。
图4是另一根据本公开的分布式作业系统控制方法的流程示意图,如图4所示,本公开实施例中的步骤S401与图1中的步骤S101的实施过程相似,在此不做赘述。
在步骤S402中,若当前故障类型与目标故障类型一致,则获取容器重建信息,并基于容器重建信息确定待重建容器。
在步骤S403中,若待重建容器包括第一容器,则重建第一容器,并基于重建后的第一容器,重启第一进程。
另一实施方式中,可以在通过容器重建信息,确定待重建容器不仅包括第一容器的情况下,重启匹配容器重建信息的全部待重建容器。
图5是又一根据本公开的分布式作业系统控制方法的流程示意图,如图5所示,本公开实施例中的步骤S501和步骤S502与图4中的步骤S401和步骤S402的实施过程相似,在此不做赘述。
在步骤S503中,若待重建容器包括第一容器和第二容器,则重建第一容器和第二容器,并基于重建后的第一容器重启第一进程,以及基于重建的第二容器重启第二进程。
示例的,第二容器可以包括以下至少一种容器:
(1)第一容器所属副本集中的容器。
(2)与第一容器所属副本集具有关联关系的副本集中的容器。
(3)第一容器所属作业中的容器。
本公开实施例中,容器重建信息中包括的第二容器,用于与第一容器共同重新执行各自相应的进程,以使作业过程中可以得到正确的中间结果,进而得到正确的作业结果。例如,针对情况(1),重建第一容器以及第二容器,并重启相应进程,相当于重新执行该副本集,以此得到匹配该副本集的正确执行结果。又例如,针对情况(3),重建第一容器以及第二容器,并重启相应进程,相当于重新执行第一容器所属作业,以此得到匹配作业的正确作业结果。需要说明的是,本公开可以根据实际使用需求,重建任意数量的任意容器,上述涉及的情况(1)至情况(3)仅为参考性 示例。
本公开实施例提供的分布式系统控制方法,可以针对容器,执行不同粒度的容器重建,满足针对不同场景的容器重建需求。
示例的,本公开除上述涉及的容器重建信息和第一标识外,本公开还可以根据作业需求,为分布式作业系统配置例如重建策略信息、事件信息和/或重建时间信息。其中,重建策略信息表征重建容器的开关指令,用户可以通过设置重建策略信息的方式“一键关闭”容器重建,该情况下,分布式作业系统针对容器发生的任意故障类型,都不会触发进行容器重建,以此满足用户针对不同作业场景的个性化配置需求。事件信息可以理解为表征分布式作业系统相应状态参数的信息,例如可以包括机器状态、可用节点数量及位置等信息。重建时间信息表征针对“容器重建”事件的时间限制。示例的,可以在故障容器的重建时间超过相应时长的情况下,终止重建流程,结束作业。
示例的,针对发生容器故障的分布式作业场景,可以通过状态机实时同步容器当前状态。例如,可以在容器故障且进程终止时将作业的状态从运行状态(running)修改为终止状态(terminating)。进一步的,在重建容器的过程中,将容器的状态由terminating修改为重建状态(restarting),以及在容器重建完成,并重启相应进程的情况下,将容器的状态由restarting修改为running。本公开实施例提供的分布式作业系统控制方法,通过状态机显示容器相应状态的方式,可以使分布式作业系统或用户及时感知容器状态,满足作业需求。
基于相同的构思,本公开实施例还提供一种分布式作业系统控制装置。
可以理解的是,本公开实施例提供的名称装置为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。结合本公开实施例中所公开的各示例的模块及算法步骤,本公开实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同的方法来实现所描述的功能,但是这种实现不应认为超出本公开实施例的技术方案的范围。
图6是根据本公开的分布式作业系统控制装置框图。参照图6,该装 置600包括检测模块601、确定模块602和处理模块603。
检测模块601,用于针对承载第一进程的第一容器,检测第一进程基于第一容器发生故障被触发进程终止。确定模块602,响应于检测到第一进程基于第一容器发生故障被触发进程终止,确定第一容器发生故障的当前故障类型。处理模块603,用于在当前故障类型与目标故障类型一致的情况下,重建第一容器,并基于重建后的第一容器,重启第一进程。其中,目标故障类型为适用于第一容器所属分布式作业系统中各容器重建的故障类型。
一种实施方式中,目标故障类型通过第一标识表征。确定模块602采用如下方式确定当前故障类型与目标故障类型一致:获取表征当前故障类型的第二标识。确定第一标识与第二标识匹配。
一种实施方式中,第一标识包括第一容器发生目标故障类型的故障时,由第一容器生成的第一退出码。确定模块602采用如下方式获取表征当前故障类型的第二标识:获取第一容器基于当前故障类型生成的第二退出码。确定模块602采用如下方式确定第一标识与第二标识匹配:确定第一退出码与第二退出码匹配。
一种实施方式中,确定模块602,还用于:在重建第一容器之前,获取容器重建信息,容器重建信息用于指示在容器发生故障时的待重建容器,并基于容器重建信息确定待重建容器包括第一容器。
一种实施方式中,确定模块602,还用于:若基于容器重建信息确定待重建容器包括第二容器,则重建第二容器,并基于重建的第二容器重启第二容器所承载的第二进程。第二容器为以下至少一种容器:第一容器所属副本集中的容器。与第一容器所属副本集具有关联关系的副本集中的容器。第一容器所属作业中的容器。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
根据本公开的实施例,本公开还提供了一种电子设备、一种可读存储介质和一种计算机程序产品。
图7示出了可以用来实施本公开的实施例的示例电子设备700的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、 台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。
如图7所示,设备700包括计算单元701,其可以根据存储在只读存储器(ROM)702中的计算机程序或者从存储单元708加载到随机访问存储器(RAM)703中的计算机程序,来执行各种适当的动作和处理。在RAM 703中,还可存储设备700操作所需的各种程序和数据。计算单元701、ROM 702以及RAM 703通过总线704彼此相连。输入/输出(I/O)接口705也连接至总线704。
设备700中的多个部件连接至I/O接口705,包括:输入单元706,例如键盘、鼠标等;输出单元707,例如各种类型的显示器、扬声器等;存储单元708,例如磁盘、光盘等;以及通信单元709,例如网卡、调制解调器、无线通信收发机等。通信单元709允许设备700通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。
计算单元701可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元701的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元701执行上文所描述的各个方法和处理,例如分布式作业系统控制方法。例如,在一些实施例中,分布式作业系统控制方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元708。在一些实施例中,计算机程序的部分或者全部可以经由ROM 702和/或通信单元709而被载入和/或安装到设备700上。当计算机程序加载到RAM 703并由计算单元701执行时,可以执行上文描述的分布式作业系统控制方法的一个或多个步骤。备选地,在其他实施例中,计算单元701可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行分布式作业系统控制方法。
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路 系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的 反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,也可以为分布式系统的服务器,或者是结合了区块链的服务器。
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。
Claims (13)
- 一种分布式作业系统控制方法,所述方法包括:针对承载第一进程的第一容器,响应于检测到所述第一进程基于所述第一容器发生故障被触发进程终止,确定所述第一容器发生故障的当前故障类型;若所述当前故障类型与目标故障类型一致,则重建所述第一容器,并基于重建后的第一容器,重启所述第一进程;其中,所述目标故障类型为适用于所述第一容器所属分布式作业系统中各容器重建的故障类型。
- 根据权利要求1所述的方法,其中,所述目标故障类型通过第一标识表征;所述当前故障类型与目标故障类型一致,采用如下方式确定:获取表征所述当前故障类型的第二标识;确定所述第一标识与所述第二标识匹配。
- 根据权利要求2所述的方法,其中,所述第一标识包括所述第一容器发生目标故障类型的故障时,由所述第一容器生成的第一退出码;所述获取表征所述当前故障类型的第二标识,包括:获取所述第一容器基于所述当前故障类型生成的第二退出码;确定所述第一标识与所述第二标识匹配,包括:确定所述第一退出码与所述第二退出码匹配。
- 根据权利要求1至3中任意一项所述的方法,重建所述第一容器之前,还包括:获取容器重建信息,所述容器重建信息用于指示在容器发生故障时的待重建容器,并基于所述容器重建信息确定所述待重建容器包括所述第一容器。
- 根据权利要求4所述的方法,还包括:若基于所述容器重建信息确定所述待重建容器包括第二容器,则重建所述第二容器,并基于重建的第二容器重启所述第二容器 所承载的第二进程;所述第二容器为以下至少一种容器:所述第一容器所属副本集中的容器;与所述第一容器所属副本集具有关联关系的副本集中的容器;所述第一容器所属作业中的容器。
- 一种分布式作业系统控制装置,所述装置包括:检测模块,用于针对承载第一进程的第一容器,检测所述第一进程基于所述第一容器发生故障被触发进程终止;确定模块,响应于检测到所述第一进程基于所述第一容器发生故障被触发进程终止,确定所述第一容器发生故障的当前故障类型;处理模块,用于在所述当前故障类型与目标故障类型一致的情况下,重建所述第一容器,并基于重建后的第一容器,重启所述第一进程;其中,所述目标故障类型为适用于所述第一容器所属分布式作业系统中各容器重建的故障类型。
- 根据权利要求6所述的装置,其中,所述目标故障类型通过第一标识表征;所述确定模块采用如下方式确定所述当前故障类型与目标故障类型一致:获取表征所述当前故障类型的第二标识;确定所述第一标识与所述第二标识匹配。
- 根据权利要求7所述的装置,其中,所述第一标识包括所述第一容器发生目标故障类型的故障时,由所述第一容器生成的第一退出码;所述确定模块采用如下方式获取表征所述当前故障类型的第二标识:获取所述第一容器基于所述当前故障类型生成的第二退出码;所述确定模块采用如下方式确定所述第一标识与所述第二标识匹配:确定所述第一退出码与所述第二退出码匹配。
- 根据权利要求6至8中任意一项所述的装置,所述确定模块,还用于:在重建所述第一容器之前,获取容器重建信息,所述容器重建信息用于指示在容器发生故障时的待重建容器,并基于所述容器重建信息确定所述待重建容器包括所述第一容器。
- 根据权利要求9所述的装置,所述确定模块,还用于:若基于所述容器重建信息确定所述待重建容器包括第二容器,则重建所述第二容器,并基于重建的第二容器重启所述第二容器所承载的第二进程;所述第二容器为以下至少一种容器:所述第一容器所属副本集中的容器;与所述第一容器所属副本集具有关联关系的副本集中的容器;所述第一容器所属作业中的容器。
- 一种电子设备,包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-5中任一项所述的方法。
- 一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行根据权利要求1-5中任一项所述的方法。
- 一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现根据权利要求1-5中任一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP22847523.2A EP4224317A4 (en) | 2021-12-24 | 2022-06-07 | DISTRIBUTED OPERATING SYSTEM CONTROL METHOD AND APPARATUS, AND PROGRAM DEVICE, MEDIUM AND PRODUCT |
| US18/041,035 US12298839B2 (en) | 2021-12-24 | 2022-06-07 | Method for controlling distributed operation system, device, and medium |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111602689.1A CN114416284B (zh) | 2021-12-24 | 分布式作业系统控制方法、装置、设备、介质及程序产品 | |
| CN202111602689.1 | 2021-12-24 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023115836A1 true WO2023115836A1 (zh) | 2023-06-29 |
Family
ID=81269484
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/097438 Ceased WO2023115836A1 (zh) | 2021-12-24 | 2022-06-07 | 分布式作业系统控制方法、装置、设备、介质及程序产品 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US12298839B2 (zh) |
| EP (1) | EP4224317A4 (zh) |
| WO (1) | WO2023115836A1 (zh) |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105681077A (zh) * | 2015-12-31 | 2016-06-15 | 华为技术有限公司 | 故障处理方法、装置及系统 |
| US20180024889A1 (en) * | 2016-07-21 | 2018-01-25 | International Business Machines Corporation | Automatic restarting of containers |
| CN108737215A (zh) * | 2018-05-29 | 2018-11-02 | 郑州云海信息技术有限公司 | 一种云数据中心Kubernetes集群容器健康检查的方法和装置 |
| CN109271249A (zh) * | 2018-07-27 | 2019-01-25 | 暨南大学 | 一种基于P.haul框架的云容器预拷贝在线迁移方法 |
| CN109710492A (zh) * | 2018-12-29 | 2019-05-03 | 北方工业大学 | 应用程序运行监控方法、介质及电子设备 |
| CN110445884A (zh) * | 2018-05-04 | 2019-11-12 | 中国移动通信集团浙江有限公司 | 一种容器ip地址管理方法及装置 |
| CN114416284A (zh) * | 2021-12-24 | 2022-04-29 | 北京百度网讯科技有限公司 | 分布式作业系统控制方法、装置、设备、介质及程序产品 |
Family Cites Families (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5594015B2 (ja) | 2010-09-21 | 2014-09-24 | 富士通株式会社 | 画像処理プログラムおよび画像処理装置 |
| JP5648452B2 (ja) | 2010-12-03 | 2015-01-07 | 富士通株式会社 | 画像処理プログラムおよび画像処理装置 |
| JP6528764B2 (ja) | 2014-03-28 | 2019-06-12 | 日本電気株式会社 | 顔照合装置、方法、及び、記録媒体 |
| CN104992148A (zh) | 2015-06-18 | 2015-10-21 | 江南大学 | 基于随机森林的atm终端部分遮挡人脸关键点检测方法 |
| CN104915263B (zh) * | 2015-06-30 | 2019-04-19 | 北京奇虎科技有限公司 | 基于容器技术的进程故障处理方法及装置 |
| JP6835223B2 (ja) | 2017-06-26 | 2021-02-24 | 日本電気株式会社 | 顔認証装置、顔認証方法およびプログラム |
| CN109584276B (zh) | 2018-12-04 | 2020-09-25 | 北京字节跳动网络技术有限公司 | 关键点检测方法、装置、设备及可读介质 |
| US11544091B2 (en) * | 2019-07-08 | 2023-01-03 | Hewlett Packard Enterprise Development Lp | Determining and implementing recovery actions for containers to recover the containers from failures |
| CN111880981A (zh) | 2020-07-30 | 2020-11-03 | 北京浪潮数据技术有限公司 | 一种docker容器的故障修复方法及相关装置 |
-
2022
- 2022-06-07 US US18/041,035 patent/US12298839B2/en active Active
- 2022-06-07 WO PCT/CN2022/097438 patent/WO2023115836A1/zh not_active Ceased
- 2022-06-07 EP EP22847523.2A patent/EP4224317A4/en not_active Withdrawn
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105681077A (zh) * | 2015-12-31 | 2016-06-15 | 华为技术有限公司 | 故障处理方法、装置及系统 |
| US20180024889A1 (en) * | 2016-07-21 | 2018-01-25 | International Business Machines Corporation | Automatic restarting of containers |
| CN110445884A (zh) * | 2018-05-04 | 2019-11-12 | 中国移动通信集团浙江有限公司 | 一种容器ip地址管理方法及装置 |
| CN108737215A (zh) * | 2018-05-29 | 2018-11-02 | 郑州云海信息技术有限公司 | 一种云数据中心Kubernetes集群容器健康检查的方法和装置 |
| CN109271249A (zh) * | 2018-07-27 | 2019-01-25 | 暨南大学 | 一种基于P.haul框架的云容器预拷贝在线迁移方法 |
| CN109710492A (zh) * | 2018-12-29 | 2019-05-03 | 北方工业大学 | 应用程序运行监控方法、介质及电子设备 |
| CN114416284A (zh) * | 2021-12-24 | 2022-04-29 | 北京百度网讯科技有限公司 | 分布式作业系统控制方法、装置、设备、介质及程序产品 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4224317A4 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114416284A (zh) | 2022-04-29 |
| EP4224317A4 (en) | 2024-04-10 |
| EP4224317A1 (en) | 2023-08-09 |
| US20240303142A1 (en) | 2024-09-12 |
| US12298839B2 (en) | 2025-05-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12034820B2 (en) | Fusing and degradation method and apparatus for micro-service, device, and medium | |
| CN112653758B (zh) | 边缘节点的更新方法、装置、设备和介质 | |
| CN113377614B (zh) | 调用链信息的生成方法、装置、电子设备及存储介质 | |
| EP4538892A1 (en) | Cluster-based training method and apparatus, electronic device and storage medium | |
| KR102902761B1 (ko) | 콘텐츠 딜리버리 네트워크 처리 방법, 장치 및 전자 기기 | |
| CN111666563B (zh) | 用于验证应用运行状态的方法及装置 | |
| CN113641388A (zh) | 云手机更新方法、相关装置及计算机程序产品 | |
| CN114328132A (zh) | 外部数据源的状态监控方法、装置、设备和介质 | |
| CN113608765A (zh) | 数据处理方法、装置、设备以及存储介质 | |
| CN114389969A (zh) | 客户端的测试方法、装置、电子设备和存储介质 | |
| CN113590217B (zh) | 基于引擎的函数管理方法、装置、电子设备及存储介质 | |
| CN115456627A (zh) | 一种安全算法切换方法、装置、设备及存储介质 | |
| CN114418429A (zh) | 一种批量作业的监控方法、装置、移动终端及介质 | |
| WO2023115836A1 (zh) | 分布式作业系统控制方法、装置、设备、介质及程序产品 | |
| CN114416284B (zh) | 分布式作业系统控制方法、装置、设备、介质及程序产品 | |
| CN119621183A (zh) | 一种应用程序启动方法、装置、设备、存储介质及产品 | |
| CN114566148B (zh) | 集群语音识别服务及其检测方法、装置及电子设备 | |
| CN118298853A (zh) | 语音识别测试异常的反馈方法、装置 | |
| CN117520195A (zh) | 测试接口的方法、装置、设备、存储介质及程序产品 | |
| CN114091909A (zh) | 一种协同开发的方法、系统、装置及电子设备 | |
| CN116631489A (zh) | 一种基于存储器的测试方法、装置、电子设备及介质 | |
| CN116301978A (zh) | 一种系统升级方法、装置、设备及存储介质 | |
| CN114546705A (zh) | 操作响应方法、操作响应装置、电子设备以及存储介质 | |
| CN113704016B (zh) | 云功能组件诊断方法、装置、设备、存储介质 | |
| CN115080205B (zh) | 任务执行方法、装置、电子设备和可读存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| WWE | Wipo information: entry into national phase |
Ref document number: 18041035 Country of ref document: US |
|
| ENP | Entry into the national phase |
Ref document number: 2022847523 Country of ref document: EP Effective date: 20230203 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| WWG | Wipo information: grant in national office |
Ref document number: 18041035 Country of ref document: US |
|
| WWW | Wipo information: withdrawn in national office |
Ref document number: 2022847523 Country of ref document: EP |