Container set scheduling method, device, equipment and storage medium

By obtaining the update time of the DPU node, it judges its fault and schedules the container set to other host nodes, the problem of cluster communication interruption in the event of DPU node failure is solved, and the normal operation of the container set and the recovery of cluster communication is achieved.

CN117331650BActive Publication Date: 2024-12-13YUSUR TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311431183.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2024-12-13
Estimated Expiration
2043-10-31

AI Technical Summary

Technical Problem

When using OVN-Kubernetes, the Kubernetes cluster cannot detect its working status when the DPU node fails, resulting in the impact of cluster communication and difficulty in recovering.

Method used

By obtaining the update time of the DPU node, we judge whether the time difference with the current time is greater than the preset time. If it exceeds, a new host node will be determined from the host node other than its corresponding host node, and the container set will be scheduled to the node to ensure that The container set is running normally.

Benefits of technology

When the DPU node fails, it is timely recognized that its corresponding host node cannot work normally, and the container set is scheduled to other host nodes in a timely manner to ensure the normal operation of cluster communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117331650B_ABST
    Figure CN117331650B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, device, equipment and storage medium for scheduling a container set, the method comprising: obtaining the update time of a first data processor node; judging whether the time difference between the current time and the update time is greater than a first preset time; if the time difference is greater than the first preset time, determining a second host node from host nodes other than the first host node, the first host node being the host node corresponding to the first data processor node; and scheduling the container set in the first host node to the second host node. The present disclosure judges whether the first data processor node is working normally by comparing the update time of the first processor node with the current time, and then when it is not working normally, schedules the container set on the first host node corresponding to it to other host nodes, so that the container set on the first host node that cannot work normally can work normally on other nodes, thereby ensuring normal communication of the cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, apparatus, device and storage medium for scheduling a container set. Background Art

[0002] OVN-Kubernetes is a Kubernetes network plug-in based on Open Virtual Network (OVN), which can meet the communication needs between containers in the Kubernetes cluster and between containers and external networks. When using OVN-Kubernetes, the DPU node on the data processing unit (DPU) needs to cooperate with the host node on its corresponding host to form a complete working node. When the DPU node fails, the cluster communication will also be affected. However, the DPU node does not belong to the node managed by the Kubernetes cluster, and the Kubernetes cluster cannot detect its working status, which makes it difficult to restore the cluster communication when the DPU node fails. Summary of the invention

[0003] In order to solve the above technical problems, the present disclosure provides a method, apparatus, device and storage medium for scheduling a container set.

[0004] A first aspect of an embodiment of the present disclosure provides a method for scheduling a container set, the method being applicable to a cluster control node, the method comprising:

[0005] Obtaining an update time of a first data processor node;

[0006] Determine whether the time difference between the current time and the update time is greater than a first preset time;

[0007] If the time difference is greater than the first preset time, determining a second host node from host nodes other than the first host node, the first host node being the host node corresponding to the first data processor node;

[0008] The container set in the first host node is scheduled to the second host node.

[0009] Optionally, before determining a second host node from host nodes other than the first host node, the method further includes:

[0010] Marking the first host node from a schedulable node to an unschedulable node;

[0011] The step of determining a second host node from host nodes other than the first host node includes:

[0012] The second host node is determined from the host nodes marked as schedulable nodes.

[0013] Optionally, the determining whether the time difference between the current time and the update time is greater than a first preset time, the method further includes:

[0014] Obtain identification information of the first host node.

[0015] Optionally, before determining the second host node from the host nodes marked as schedulable nodes, the method further includes:

[0016] Get resource information of each host node;

[0017] Determine first resource information of the first host node based on the resource information and the identification information;

[0018] The determining the second host node from the host nodes marked as schedulable nodes comprises:

[0019] Selecting host nodes whose resource information matches the first resource information from the host nodes marked as schedulable nodes;

[0020] Based on the screening result, the second host node is determined.

[0021] Optionally, determining the second host node based on the screening result includes:

[0022] The host node with the smallest load in the screening result is determined as the second host node.

[0023] Optionally, before scheduling the container set in the first host node to the second host node, the method includes:

[0024] An eviction instruction is sent to the first host node, so that the first host node evicts the container set after receiving the eviction instruction.

[0025] Optionally, obtaining the update time of the first data processor node includes:

[0026] The update time most recently written by the first data processor node is obtained from the configuration file at every second preset time, where the second preset time is less than the first preset time.

[0027] A second aspect of an embodiment of the present disclosure provides a scheduling device for a container set, the device being applicable to a cluster control node, the device comprising:

[0028] A first acquisition module, used to acquire the update time of the first data processor node;

[0029] A determination module, used to determine whether the time difference between the current time and the update time is greater than a first preset time;

[0030] a first determining module, configured to determine a second host node from host nodes other than the first host node if the time difference is greater than the first preset time, the first host node being the host node corresponding to the first data processor node;

[0031] A scheduling module is used to schedule the container set in the first host node to the second host node.

[0032] A third aspect of an embodiment of the present disclosure provides a computer device, including a memory, a processor, and a computer program, wherein the computer program is stored in the memory, and when the computer program is executed by the processor, the scheduling method of the container set as described in the first aspect above is implemented.

[0033] A fourth aspect of the embodiments of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the scheduling method for the container set according to the first aspect is implemented.

[0034] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0035] In the scheduling method, apparatus, device and storage medium of the container set provided in the embodiments of the present disclosure, by obtaining the update time of the first data processor node, it is determined whether the time difference between the current time and the update time is greater than the first preset time. If the time difference is greater than the first preset time, a second host node is determined from the host nodes other than the first host node, and the first host node is the host node corresponding to the first data processor node. The container set in the first host node is scheduled to the second host node. When it is determined that the first data processor node cannot work normally according to the update time of the first data processor node, it can be determined that the first host node corresponding to the first data processor node cannot work normally either, and the container set running on the first host node needs to be scheduled to other host nodes to ensure the normal operation of this part of the container set, thereby ensuring normal communication of the cluster. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0038] Figure 1 is a flowchart of a method for scheduling a container set provided by an embodiment of the present disclosure;

[0039] Figure 2 is a flow chart of a method for determining a second host node provided by an embodiment of the present disclosure;

[0040] Figure 3 is a flow chart of another method for determining a second host node provided by an embodiment of the present disclosure;

[0041] Figure 4 It is a structural schematic diagram of a scheduling device for a container set provided by an embodiment of the present disclosure;

[0042] Figure 5 It is a structural diagram of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0043] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0044] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0045] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0046] Figure 1 1 is a flowchart of a method for scheduling a container set provided by an embodiment of the present disclosure. The method can be executed by a scheduling device for a container set, and the scheduling device for the container set can be set in a cluster control node. Figure 1 As shown, the container set scheduling method provided in this embodiment includes the following steps:

[0047] S101. Obtain update time of a first data processor node.

[0048] The first data processor node in the embodiment of the present disclosure may be understood as any communication node running on a data processor (Data Processing Unit, DPU).

[0049] The update time in the embodiment of the present disclosure can be understood as the time when the first data processor node last updated its status. For example, the first data processor node will periodically send an update message including a sending time, and verify whether the traffic status of the first data processor node is normal through the update message. The sending time is the update time.

[0050] In the embodiment of the present disclosure, the scheduling device of the container set may obtain the latest update time of the first data processor node.

[0051] In an exemplary implementation of the embodiment of the present disclosure, the scheduling device of the container set may receive an update message including an update time sent by the first data processor node, and extract the update time from the update message.

[0052] In another exemplary implementation of the embodiment of the present disclosure, the scheduling device of the container set may send an update request to the first data processor node at regular intervals, so that the first data processor node returns an update message including the update time after receiving the update request.

[0053] In another exemplary implementation of the disclosed embodiment, the scheduling device of the container set may obtain the update time of the most recent write of the first data processor node from the application programming interface server (APIServer), and the APIServer may store a preset number of update times written by the first data processor node. When the number of writes exceeds the preset number, the newly written update time will overwrite the first written update time.

[0054] In another exemplary implementation of the embodiment of the present disclosure, the scheduling device of the container set can obtain an update message obtained by the container network interface (Container Network Interface, CNI) periodically monitoring the first data processor node, and extract the update time contained therein.

[0055] S102: Determine whether the time difference between the current time and the update time is greater than a first preset time.

[0056] The current time in the embodiment of the present disclosure may be understood as the standard reference time of the current moment obtained by the scheduling device of the container set from the cluster control (master) node.

[0057] The first preset time in the embodiment of the present disclosure may be understood as a preset time length threshold.

[0058] In the embodiment of the present disclosure, the scheduling device of the container set can calculate the time difference between the current time and the update time after obtaining the most recent update time of the first data processor node, and compare the time difference with the first preset time to determine whether the time difference is greater than the first preset time.

[0059] S103: If the time difference is greater than a first preset time, determining a second host node from host nodes other than the first host node, the first host node being the host node corresponding to the first data processor node.

[0060] The first host node in the embodiment of the present disclosure may be understood as a host node corresponding to the first data processor node, which cooperates with the first data processor node to form a complete working node.

[0061] The second host node in the embodiment of the present disclosure can be understood as the target host node when scheduling the container set running on the first host node. For example, the time difference between the update time of the second data processor node corresponding to the second host node and the current time is less than the first preset time.

[0062] In the embodiment of the present disclosure, the scheduling device of the container set can determine that the first data processor node has not been updated within the first preset time when it is determined that the time difference between the current time and the update time is greater than the first preset time, the first data processor node has failed, and the first host node cooperating with it cannot work normally, and the container set (pod) running on the first host node needs to be scheduled. Therefore, a second host node is determined from the host nodes other than the first host node as the host node for the target scheduling of the container set.

[0063] In an exemplary implementation of the disclosed embodiment, the scheduling device of the container set can obtain the correspondence between the data processor node and the host node when it is determined that the time difference between the current time and the update time is greater than the first preset time, and then determine the first host node corresponding to the first data processor node, determine a second host node from the host nodes other than the first host node, and ensure that the data processor node corresponding to the second host node is normally updated within the first preset time. If there are multiple host nodes that meet the above conditions among the host nodes other than the first host node, the host node with the smallest load is selected from the multiple host nodes as the second host node.

[0064] S104: Schedule the container set in the first host node to the second host node.

[0065] In the embodiment of the present disclosure, the scheduling device of the container set may schedule the container set running on the first host node to the second host node after determining the second host node.

[0066] In an exemplary implementation of the embodiment of the present disclosure, the scheduling device of the container set can obtain the node name of the second host node after determining the second host node, and use a scheduling instruction based on the node name of the second host node to forcibly schedule the container set running on the first host node to the second host node.

[0067] The disclosed embodiment obtains the update time of the first data processor node, determines whether the time difference between the current time and the update time is greater than the first preset time, and if the time difference is greater than the first preset time, determines a second host node from host nodes other than the first host node, the first host node being the host node corresponding to the first data processor node, and schedules the container set in the first host node to the second host node. When it is determined that the first data processor node cannot work normally according to its update time, it can be determined that the first host node corresponding to the first data processor node cannot work normally either, and it is necessary to schedule the container set running on the first host node to other host nodes to ensure the normal operation of this part of the container set, thereby ensuring normal communication of the cluster.

[0068] Figure 2 is a flow chart of a method for determining a second host node provided by an embodiment of the present disclosure, such as Figure 2 As shown, based on the above embodiment, the second host node can be determined by the following method.

[0069] S201. Mark a first host node from a schedulable node to an unschedulable node.

[0070] In the embodiment of the present disclosure, a schedulable node is a node that can accept scheduling of container sets on other nodes or newly created container sets, and an unschedulable node is a node that does not accept scheduling of container sets on other nodes or newly created container sets.

[0071] In the embodiment of the present disclosure, the scheduling device of the container set may change the mark of the first host node from an original schedulable node to an unschedulable node after determining that the time difference between the current time and the update time is greater than the first preset time.

[0072] In an exemplary implementation of the embodiment of the present disclosure, the scheduling device of the container set may modify the status of the first host node from a schedulable node to an unschedulable node in a file recording the status of each host node.

[0073] S202: Determine a second host node from the host nodes marked as schedulable nodes.

[0074] In the embodiment of the present disclosure, the scheduling device of the container set may select a host node from the host nodes marked as schedulable nodes in the cluster as the second host node after marking the first host node from a schedulable node to an unschedulable node.

[0075] The disclosed embodiment marks the first host node from a schedulable node to an unschedulable node, and determines the second host node from the host nodes marked as schedulable nodes. After determining that the first host node cannot work normally, it can mark it so that other containers are no longer scheduled to the first host node, thereby reducing the impact of the abnormality of the first host node. At the same time, it ensures that the container set running on the first host node can be scheduled to the schedulable node that works normally, and the cluster communication is restored as soon as possible.

[0076] In some embodiments of the present disclosure, a scheduling device of a container set may obtain identification information of the first host node.

[0077] Specifically, the identification information may be a name, number, ID, etc., which is not limited here. The scheduling device of the container set may simultaneously obtain the identification information of the first host node corresponding to the first data processor node when obtaining the update time of the first data processor node, thereby facilitating the subsequent scheduling of the container set.

[0078] Figure 3 is a flowchart of another method for determining a second host node provided by an embodiment of the present disclosure. Figure 3 As shown, based on the above embodiment, the second host node can be determined by the following method.

[0079] S301. Obtain resource information of each host node.

[0080] The resource information in the embodiments of the present disclosure may be understood as basic attribute information such as the type, quantity, size, etc. of data processing resources that a node can provide.

[0081] In the embodiment of the present disclosure, the scheduling device of the container set can obtain resource information of each host node in the cluster.

[0082] In an exemplary implementation of the embodiment of the present disclosure, the scheduling device of the container set can traverse each host node in the cluster to obtain resource information of each host node.

[0083] In another exemplary implementation of the embodiment of the present disclosure, the scheduling device of the container set may obtain resource information of each host node from a node resource configuration file of the cluster.

[0084] S302: Determine first resource information of the first host node based on the resource information and the identification information.

[0085] In the embodiment of the present disclosure, after obtaining the resource information of each host node and the identification information of the first host node, the scheduling device of the container set can search for the resource information corresponding to the identification information of the first host node from the resource information of each host node, and determine the resource information as the first resource information of the first host node.

[0086] S303: Filter host nodes whose resource information matches the first resource information from host nodes marked as schedulable nodes.

[0087] In the disclosed embodiment, the scheduling device of the container set can screen host nodes marked as schedulable nodes from the host nodes within the cluster, obtain identification information of these nodes, and then determine resource information corresponding to these nodes based on the identification information of these nodes, and then screen host nodes whose resource information matches the first resource information.

[0088] In an exemplary implementation of the embodiment of the present disclosure, the scheduling device of the container set can determine the host node whose resource information contains the first resource information when screening the host node whose resource information matches the first resource information. For example, when the first resource information is memory resources and disk I / O resources, the host node that can provide memory resources and disk I / O resources can be screened.

[0089] S304: Determine the second host node based on the screening result.

[0090] In the embodiment of the present disclosure, the scheduling device of the container set may select a host node as the second host node from the host nodes marked as schedulable nodes obtained after screening and whose resource information matches the first resource information.

[0091] In an exemplary implementation of the disclosed embodiment, the scheduling device of the container set can score the host nodes that meet the conditions after screening according to preset parameters, and select the host node with the highest score as the second host node. For example, the preset parameters may include idle resource ratio, node affinity, etc., which are not limited here.

[0092] The disclosed embodiment obtains resource information of each host node, determines first resource information of the first host node based on the resource information and identification information, screens host nodes whose resource information matches the first resource information among host nodes marked as schedulable nodes, and determines the second host node based on the screening result, thereby ensuring that the second host node where the container set running on the first host node is located after scheduling can provide the container set with the resources required for running, so that the container set can run normally on the second host node, thereby ensuring normal communication of the cluster.

[0093] In some other embodiments of the present disclosure, the scheduling device of the container set may determine the host node with the smallest load in the screening result as the second host node.

[0094] Specifically, after screening out multiple host nodes marked as schedulable nodes and whose resource information matches the first resource information, the scheduling device of the container set can sort the multiple host nodes in order of load from small to large, and select the host node with the smallest load to determine it as the second host node, so that the container set runs faster and the communication performance of the cluster is good.

[0095] In some further embodiments of the present disclosure, the scheduling device of the container set may send an eviction instruction to the first host node, so that the first host node evicts the container set after receiving the eviction instruction.

[0096] Specifically, the scheduling device of the container set can send an eviction instruction to the first host node after determining the second host node. For example, the scheduling device of the container set can send an eviction instruction to the first host node based on the pre-acquired node name of the first host node: kubectl drain nodeName, where nodeName is the node name of the first host node. After receiving the eviction instruction, the first host node will evict the container set running on the first host node, preparing for the next step of scheduling the container set to the second host node.

[0097] In some further embodiments of the present disclosure, the scheduling device of the container set may obtain the latest update time written by the first data processor node from the configuration file every second preset time, where the second preset time is less than the first preset time.

[0098] Specifically, the scheduling device of the container set can access the configuration file configmap once every second preset time. The configuration file records the update time of each node in the cluster and on the data processor. The scheduling device of the container set can obtain the latest update time written by the first data processor node from the configuration file, and the second preset time is less than the first preset time. For example, the first preset time can be 30 seconds and the second preset time is 5 seconds, so as to stably monitor the communication status of the first data processor node and ensure the normal cluster communication.

[0099] Figure 4 Schematic diagram of a scheduling device for a container set provided by an embodiment of the present disclosure. Figure 4As shown, the scheduling device 400 of the container set includes: a first acquisition module 410, a judgment module 420, a first determination module 430, and a scheduling module 440, wherein the first acquisition module 410 is used to obtain the update time of the first data processor node; the judgment module 420 is used to determine whether the time difference between the current time and the update time is greater than the first preset time; the first determination module 430 is used to determine a second host node from host nodes other than the first host node if the time difference is greater than the first preset time, and the first host node is the host node corresponding to the first data processor node; the scheduling module 440 is used to schedule the container set in the first host node to the second host node.

[0100] Optionally, the scheduling device 400 of the container set further includes: a marking module, used to mark the first host node from a schedulable node to an unschedulable node; and the first determination module 430, specifically used to determine the second host node from the host nodes marked as schedulable nodes.

[0101] Optionally, the scheduling device 400 for a container set further includes: a second acquisition module, configured to acquire identification information of the first host node.

[0102] Optionally, the scheduling device 400 of the container set also includes: a third acquisition module, used to obtain resource information of each host node; a second determination module, used to determine the first resource information of the first host node based on the resource information and the identification information; the first determination module 430 includes: a screening unit, used to screen host nodes whose resource information matches the first resource information among the host nodes marked as schedulable nodes; and a determination unit, used to determine the second host node based on the screening result.

[0103] Optionally, the determining unit is specifically configured to determine the host node with the smallest load in the screening result as the second host node.

[0104] Optionally, the scheduling device for the container set further includes: an eviction module, configured to send an eviction instruction to the first host node, so that the first host node evicts the container set after receiving the eviction instruction.

[0105] Optionally, the first acquisition module is specifically used to obtain the update time most recently written by the first data processor node from the configuration file every second preset time, and the second preset time is less than the first preset time.

[0106] The scheduling device for a container set provided in this embodiment can execute the method described in any of the above embodiments. Its execution method and beneficial effects are similar and will not be described in detail here.

[0107] Figure 5 It is a structural diagram of a computer device provided in an embodiment of the present disclosure.

[0108] like Figure 5 As shown, the computer device may include a processor 510 and a memory 520 storing computer program instructions.

[0109] Specifically, the processor 510 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0110] The memory 520 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 520 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 520 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 520 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 520 is a non-volatile solid-state memory. In a particular embodiment, the memory 520 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.

[0111] The processor 510 reads and executes the computer program instructions stored in the memory 520 to perform the steps of the method for scheduling a container set provided in the embodiment of the present disclosure.

[0112] In one example, the computer device may further include a transceiver 530 and a bus 540. Figure 5 As shown, the processor 510, the memory 520 and the transceiver 530 are connected via a bus 540 and communicate with each other.

[0113] The bus 540 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 540 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0114] The embodiment of the present disclosure further provides a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the container set scheduling method provided by the embodiment of the present disclosure.

[0115] The above-mentioned storage medium may, for example, include a memory 520 of computer program instructions, and the above-mentioned instructions may be executed by the processor 510 of the scheduling device of the container set to complete the scheduling method of the container set provided in the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact DiscROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc. The above-mentioned computer program may be written in any combination of one or more programming languages ​​to perform the program code of the operation of the embodiment of the present disclosure, and the programming language includes an object-oriented programming language, such as Java, C++, etc., and also includes a conventional procedural programming language, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on the remote computing device, or completely on the remote computing device or server.

[0116] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0117] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for scheduling a container set, characterized in that: The method is applicable to a cluster control node, and the method comprises: Obtaining an update time of a first data processor node; Determine whether the time difference between the current time and the update time is greater than a first preset time; If the time difference is greater than the first preset time, determining a second host node from host nodes other than the first host node, the first host node being the host node corresponding to the first data processor node; Scheduling the container set in the first host node to the second host node; The step of determining a second host node from host nodes other than the first host node includes: Selecting host nodes whose resource information matches first resource information from among host nodes marked as schedulable nodes, where the first resource information is resource information of the first host node; Based on the screening result, a second host node with the highest score is determined, wherein the score is determined based on the idle resource ratio of the host node.

2. The method according to claim 1, characterized in that Before determining a second host node from host nodes other than the first host node, the method further includes: The first host node is marked from a schedulable node to an unschedulable node.

3. The method according to claim 2, characterized in that The determining whether the time difference between the current time and the update time is greater than a first preset time, the method further includes: Obtain identification information of the first host node.

4. The method according to claim 3, characterized in that: Before determining the second host node from the host nodes marked as schedulable nodes, the method further includes: Get resource information of each host node; Based on the resource information and the identification information, first resource information of the first host node is determined.

5. The method according to claim 1, characterized in that The determining the second host node based on the screening result includes: The host node with the smallest load in the screening result is determined as the second host node.

6. The method according to claim 1, characterized in that Before scheduling the container set in the first host node to the second host node, the method includes: An eviction instruction is sent to the first host node, so that the first host node evicts the container set after receiving the eviction instruction.

7. The method according to claim 1, characterized in that The obtaining the update time of the first data processor node includes: The update time most recently written by the first data processor node is obtained from the configuration file at every second preset time, where the second preset time is less than the first preset time.

8. A scheduling device for a container set, characterized in that: The device is applicable to a cluster control node, and the device includes: A first acquisition module, used to acquire the update time of the first data processor node; A determination module, used to determine whether the time difference between the current time and the update time is greater than a first preset time; a first determining module, configured to determine a second host node from host nodes other than the first host node if the time difference is greater than the first preset time, the first host node being the host node corresponding to the first data processor node; A scheduling module, configured to schedule the container set in the first host node to the second host node; The first determining module includes: A screening unit, configured to screen host nodes whose resource information matches first resource information from among host nodes marked as schedulable nodes, where the first resource information is resource information of the first host node; The determination unit is used to determine a second host node with the highest score based on the screening result, wherein the score is determined based on the idle resource ratio of the host node.

9. A computer device, characterized in that: include: Memory; processor; and a computer program; wherein the computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the method for scheduling a container set according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method and system for improving disaster tolerance capability of PostgreSQL cluster, medium and terminal

    CN112084072A

  • Cluster node fault processing method and system and medium

    CN115712521A