A cluster resource management method, device and computer equipment

CN115437873BActive Publication Date: 2026-08-21INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210908095.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2026-08-21
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

当存在很多资源时,如果资源要求监控及时,需要在几秒都内调用监控agent,则过多资源调用对应agent时会对CIB进程造成过大压力,pacemaker对所有资源都需要依靠CIB进程来处理,过多的资源会导致CIB进程一直处于待处理状态,导致新增资源时CIB处理不及时,从而导致系统出现异常

Benefits of technology

[0028]The aforementioned cluster resource management method, apparatus, and computer equipment include: classifying resources in a resource database according to resource type and integrating resources of the same type into a clone resource library; obtaining the nodes to which resources in the clone resource library belong, and attaching the clone resource library to the nodes, where there is at least one node; each node managing resources belonging to it based on the clone resource library. By integrating resources of the same type in the resource database to generate a clone resource library, multiple resources in the clone resource library can be processed through a single agent call when managing resources, thereby reducing the pressure on the CIB and ensuring that the CIB can handle other resources. Furthermore, by attaching the resource database to each node corresponding to a resource in the resource database, when the node to which the resource belongs cannot operate normally, other nodes attached to the clone resource library can process the resources corresponding to the faulty node in a short time, reducing resource drift time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115437873B_ABST
    Figure CN115437873B_ABST
Patent Text Reader

Abstract

The application relates to a cluster resource management method, device and computer equipment. The method comprises the following steps: classifying resources in a resource database according to resource types, and integrating resources of the same type into a cloned resource library; acquiring nodes to which the resources in the cloned resource library belong, and mounting the cloned resource library to the nodes, wherein the nodes are at least one; and performing resource management on the resources belonging to each node based on the cloned resource library. The method has the beneficial effects of reducing the pressure of a cluster information library process, reducing resource migration time, and avoiding system abnormalities caused by untimely processing of a resource manager under multiple resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of resource management technology, and in particular to a cluster resource management method, apparatus and computer equipment. Background Technology

[0002] Pacemaker is the most widely used open-source cluster resource manager in Linux environments. It leverages the messaging and cluster member management capabilities provided by the cluster infrastructure to achieve fault detection and resource recovery at the node and resource levels, thereby maximizing the high availability of cluster services. When many resources exist, if timely monitoring is required, necessitating calls to the monitoring agent within seconds, excessive resource calls to the corresponding agent can put excessive pressure on the CIB process. Since Pacemaker relies on the CIB process to handle all resources, too many resources can cause the CIB process to remain in a pending state, leading to delays in processing new resources and potentially causing system anomalies.

[0003] Therefore, there is an urgent need to propose a cluster resource management method, device, and computer equipment that can reduce CIB processes, decrease resource drift time, and avoid system anomalies caused by untimely processing by the resource manager under multiple resources. Summary of the Invention

[0004] Therefore, it is necessary to provide a cluster resource management method, device, and computer equipment that can reduce CIB process, reduce resource drift time, and avoid system anomalies caused by untimely processing of resource managers under multiple resources, in order to address the above-mentioned technical problems.

[0005] On the one hand, a cluster resource management method is provided, the method comprising:

[0006] The resources in the resource database are classified according to resource type, and resources of the same type are integrated into the clone resource library;

[0007] Obtain the node to which the resources in the cloned resource repository belong, and mount the cloned resource repository to the node, wherein there is at least one node;

[0008] Each node manages the resources belonging to it based on the cloned resource library.

[0009] In one embodiment, the method further includes: acquiring nodes that are mounted with the cloned resource library, wherein there is at least one node; generating relational mapping data based on the nodes and the resources belonging to the nodes; and generating a node sequence list based on the relational mapping data.

[0010] In one embodiment, each node performs resource management on the resources belonging to the node based on the clone resource library, including: obtaining the running status of the node and determining whether the running status of the node is normal; if the running status of the node is normal, each node performs resource management on the resources belonging to the node based on the clone resource library; if the running status of the node is abnormal, a candidate node is obtained based on the node sequence list to perform resource management on the node's resources.

[0011] In one embodiment, before obtaining candidate nodes to manage the resources of the node based on the node sequence list, the method further includes: determining whether there are preset candidate nodes; if there are preset candidate nodes, then managing the resources of the node based on the candidate nodes; if there are no preset candidate nodes, then performing a load stress test on the node with the cloned resource library mounted; and based on the load stress test results, obtaining candidate nodes to manage the resources of the node.

[0012] In one embodiment, if there are preset alternative nodes, resource management is performed on the resources of the node based on the alternative nodes, including: obtaining the running status of the preset alternative nodes; if the running status of the preset alternative nodes is normal, resource management is performed on the resources of the node based on the alternative nodes; if the running status of the preset alternative nodes is abnormal, a stress test is performed on the node with the cloned resource library mounted, and resource management is performed on the nodes based on the stress test results.

[0013] In one embodiment, based on the load stress test results, acquiring candidate nodes for resource management of the nodes includes: performing a load stress test on each node mounted with the cloned resource library and obtaining the stress test results; sorting the load stress test results in ascending order of load stress test values ​​to generate a sequence list; acquiring candidate nodes according to candidate node acquisition rules based on the sequence list; and managing the resources of the nodes based on the candidate nodes.

[0014] In one embodiment, the candidate node acquisition rule includes: sequentially acquiring nodes corresponding to the stress test values ​​based on the ordered list, defining the nodes corresponding to the stress test values ​​as candidate nodes; acquiring the running status of the candidate nodes based on the candidate nodes; acquiring candidate nodes with normal running status as candidate nodes, and performing resource management on the resources of the nodes based on the candidate nodes.

[0015] In one embodiment, resource management of the node's resources includes at least one of resource mounting, resource monitoring, and resource unloading.

[0016] On the other hand, a cluster resource management device is provided, the device comprising:

[0017] The classification and integration unit is used to classify resources in the resource database according to resource type and integrate resources of the same type into the clone resource library;

[0018] A mounting unit is used to obtain the node to which the resources in the cloned resource library belong, and mount the cloned resource library to the node, wherein there is at least one node;

[0019] The resource management unit is used by each node to manage the resources belonging to that node based on the cloned resource library.

[0020] In another aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0021] The resources in the resource database are classified according to resource type, and resources of the same type are integrated into the clone resource library;

[0022] Obtain the node to which the resources in the cloned resource repository belong, and mount the cloned resource repository to the node, wherein there is at least one node;

[0023] Each node manages the resources belonging to it based on the cloned resource library.

[0024] In another aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0025] The resources in the resource database are classified according to resource type, and resources of the same type are integrated into the clone resource library;

[0026] Obtain the node to which the resources in the cloned resource repository belong, and mount the cloned resource repository to the node, wherein there is at least one node;

[0027] Each node manages the resources belonging to it based on the cloned resource library.

[0028] The aforementioned cluster resource management method, apparatus, and computer equipment include: classifying resources in a resource database according to resource type and integrating resources of the same type into a clone resource library; obtaining the nodes to which resources in the clone resource library belong, and attaching the clone resource library to the nodes, where there is at least one node; each node managing resources belonging to it based on the clone resource library. By integrating resources of the same type in the resource database to generate a clone resource library, multiple resources in the clone resource library can be processed through a single agent call when managing resources, thereby reducing the pressure on the CIB and ensuring that the CIB can handle other resources. Furthermore, by attaching the resource database to each node corresponding to a resource in the resource database, when the node to which the resource belongs cannot operate normally, other nodes attached to the clone resource library can process the resources corresponding to the faulty node in a short time, reducing resource drift time. Attached Figure Description

[0029] Figure 1 This is a diagram illustrating the application environment of a cluster resource management method in one embodiment.

[0030] Figure 2 This is a flowchart illustrating a cluster resource management method in one embodiment;

[0031] Figure 3 This is a flowchart illustrating the candidate node selection step in a cluster resource management method in one embodiment.

[0032] Figure 4 This is a structural block diagram of a cluster resource management device in one embodiment;

[0033] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0035] The cluster resource management method provided in this application can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. Terminal 102 inputs the resource types that need to be classified to server 104, and server 104 performs cluster resource management based on the instructions issued by terminal 102. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, and tablets, and server 104 can be a standalone server or a server cluster consisting of multiple servers.

[0036] In one embodiment, such as Figure 2 As shown, a cluster resource management method is provided, which is applied to the Pacemaker mechanism. Figure 1 Taking the server in the example, the following steps are included:

[0037] The resources in the resource database are classified according to resource type, and resources of the same type are integrated into the clone resource library;

[0038] Obtain the node to which the resources in the cloned resource repository belong, and mount the cloned resource repository to the node, wherein there is at least one node;

[0039] Each node manages the resources belonging to it based on the cloned resource library.

[0040] Specifically, the node to which the resource in the cloned repository belongs is obtained, and the cloned repository is mounted to that node, where there is at least one node. Taking a file system as an example, suppose there are three nodes: node 1, node 2, and node 3. Node 1 and node 3 both contain a file system, while node 2 does not. Therefore, to integrate the file system into the cloned repository, the cloned repository is mounted to nodes 1 and 3, but not to node 2.

[0041] In the above-mentioned cluster resource management method, resources of the same type are integrated into a clone resource library. All resources of the same type under the cluster are managed through a single clone resource library. When managing the resources of nodes, the management of resources of the same type can be achieved through the mechanism of Pacemaker itself without relying on Pacemaker's own CIB process. This effectively reduces the requirements of Pacemaker itself on the CIB process, and can complete multi-resource processing even in a low-cost environment.

[0042] Specifically, in a clustered storage system, there are various resource types, including file systems and shared resources. Assuming a node has 200 file systems, and resource monitoring and management are required within the cluster, especially under time-sensitive conditions (e.g., monitoring all file system resources within 5 seconds), then using existing technology, these 200 file systems would complete their monitoring within that timeframe, resulting in 200 agent calls. Such numerous agent calls within a short period put excessive pressure on the CIB process. If new resources are added at this time, the system will experience problems due to the CIB process's delayed processing. Furthermore, when the node fails, the 200 file systems need to be unloaded from that node and then mounted to other normally functioning nodes to complete the resource switchover. If this switchover takes too long, it hinders effective fault handling for the node and negatively impacts system stability.

[0043] Based on the cluster resource management method described in this application, resources are classified according to resource type and integrated into a clone resource library. Taking file systems as an example, all file systems under the cluster storage system are obtained and integrated into the clone resource library; then, based on the node to which the resources in the clone resource library belong, the clone resource library is mounted to that node; finally, resource management is performed on the resources corresponding to itself in the clone resource library on each node mounted with the clone resource library. This application does not create an independent resource for each file, but creates a clone resource library for resources of the same type under the cluster. This not only allows management of the file systems on the corresponding nodes on each node, but also eliminates the need for only one agent call within 5 seconds to manage resources of 200 file systems in the cluster, reducing the pressure on the CIB process and ensuring that the CIB can handle other resources. Furthermore, when one node fails, integrating resources of the same type into the clone resource library reduces resource drift time. Based on the node sequence list, resource switching can be quickly achieved, reducing resource switching time and improving fault resolution efficiency.

[0044] In one embodiment, the method further includes: obtaining a node that is mounted with the cloned resource library, wherein the node is at least one; generating relational mapping data based on the node and the resources belonging to the node; and generating a node sequence list based on the relational mapping data.

[0045] Specifically, assuming there are three nodes mounted with the cloned resource library: node 1, node 2, and node 3; node 1 contains file system 1, node 2 contains file system 3, and node 3 contains file system 4, then node 1 and file system 1 generate relational mapping data 1, node 2 and file system 3 generate relational mapping data 2, and node 3 and file system 4 generate relational mapping data 3; the relational mapping data is obtained to generate a node sequence table, that is, the node sequence contains relational mapping data 1, relational mapping data 2, and relational mapping data 3. More specifically, the node sequence table contains node 1, node 2, node 3, file system 1, file system 3, and file system 4.

[0046] In one embodiment, such as Figure 3 As shown, each node manages its resources based on the clone resource library, including: obtaining the node's running status and determining whether the node's running status is normal; if the node's running status is normal, each node manages its resources based on the clone resource library; if the node's running status is abnormal, a candidate node is obtained based on the node sequence list to manage the node's resources.

[0047] In one embodiment, such as Figure 3 As shown, before obtaining candidate nodes to manage the resources of the node based on the node sequence list, the method further includes: determining whether there are preset candidate nodes; if there are preset candidate nodes, then managing the resources of the node based on the candidate nodes; if there are no preset candidate nodes, then performing a load stress test on the node with the cloned resource library mounted; and based on the load stress test results, obtaining candidate nodes to manage the resources of the node.

[0048] In one embodiment, such as Figure 3 As shown, if there are preset alternative nodes, resource management is performed on the resources of the node based on the alternative nodes, including: obtaining the running status of the preset alternative nodes; if the running status of the preset alternative nodes is normal, resource management is performed on the resources of the node based on the alternative nodes; if the running status of the preset alternative nodes is abnormal, a stress test is performed on the node with the cloned resource library mounted, and resource management is performed on the nodes based on the stress test results.

[0049] In one embodiment, such as Figure 3As shown, based on the load stress test results, candidate nodes are selected for resource management of the nodes, including: performing a load stress test on each node mounted with the cloned resource library and obtaining the stress test results; sorting the load stress test results in ascending order of load stress test values ​​to generate a sequence list; selecting candidate nodes according to the candidate node selection rules based on the sequence list; and performing resource management of the nodes based on the candidate nodes.

[0050] In one embodiment, the candidate node acquisition rule includes: sequentially acquiring nodes corresponding to the stress test values ​​based on the ordered list, defining the nodes corresponding to the stress test values ​​as candidate nodes; acquiring the running status of the candidate nodes based on the candidate nodes; acquiring candidate nodes with normal running status as candidate nodes, and performing resource management on the resources of the nodes based on the candidate nodes.

[0051] In one embodiment, resource management of the node's resources includes at least one of resource mounting, resource monitoring, and resource unloading.

[0052] It should be understood that, although Figure 2-3 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2-3 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0053] In one embodiment, such as Figure 4 As shown, a cluster resource management device is provided, including: a classification and integration unit, an acquisition and mounting unit, and a resource management unit;

[0054] The classification and integration unit is used to classify resources in the resource database according to resource type and integrate resources of the same type into the clone resource library;

[0055] A mounting unit is used to obtain the node to which the resources in the cloned resource library belong, and mount the cloned resource library to the node, wherein there is at least one node;

[0056] The resource management unit is used by each node to manage the resources belonging to that node based on the cloned resource library.

[0057] In one embodiment, the apparatus further includes: a relationship generation unit, configured to acquire nodes that are mounted on the cloned resource library, wherein there is at least one node, generate relationship mapping data based on the nodes and resources belonging to the nodes, and generate a node sequence list based on the relationship mapping data.

[0058] In one embodiment, the apparatus further includes: a running status determination unit, configured to acquire the running status of the node, determine whether the running status of the node is normal; if the running status of the node is normal, each node performs resource management on the resources belonging to the node based on the clone resource library; if the running status of the node is abnormal, a candidate node is acquired based on the node sequence list to perform resource management on the resources of the node.

[0059] In one embodiment, the apparatus further includes: a judgment unit, configured to determine whether there are preset alternative nodes; if there are preset alternative nodes, to perform resource management on the resources of the node based on the alternative nodes; if there are no preset alternative nodes, to perform a load stress test on the node with the cloned resource library mounted; and to obtain alternative nodes to perform resource management on the resources of the node based on the load stress test results.

[0060] In one embodiment, the determining unit is further configured to obtain the operating status of the preset candidate nodes; if the operating status of the preset candidate nodes is normal, then resource management is performed on the resources of the node based on the candidate nodes; if the operating status of the preset candidate nodes is abnormal, then stress testing is performed on the node with the cloned resource library mounted, and resource management is performed on the node based on the stress test results.

[0061] In one embodiment, the apparatus further includes: a load stress testing unit, configured to perform load stress testing on each node mounted with the cloned resource library, obtain stress test results, and based on the load stress test results, sort the load stress test results in ascending order of load stress test values ​​to generate a sequence list;

[0062] In one embodiment, the apparatus further includes: a candidate node acquisition unit, configured to acquire candidate nodes according to the candidate node acquisition rules based on the sequential list; and to perform resource management on the resources of the node based on the candidate nodes.

[0063] In one embodiment, the candidate node acquisition unit is further configured to: sequentially acquire nodes corresponding to the stress test values ​​based on the ordered list; define the nodes corresponding to the stress test values ​​as candidate nodes; acquire the operating status of the candidate nodes based on the candidate nodes; acquire candidate nodes with normal operating status as candidate nodes; and perform resource management on the resources of the nodes based on the candidate nodes.

[0064] Specific limitations regarding the cluster resource management device can be found in the limitations of the cluster resource management method described above, and will not be repeated here. Each module in the aforementioned cluster resource management device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0065] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a cluster resource management method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0066] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0067] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0068] The resources in the resource database are classified according to resource type, and resources of the same type are integrated into the clone resource library;

[0069] Obtain the node to which the resources in the cloned resource repository belong, and mount the cloned resource repository to the node, wherein there is at least one node;

[0070] Each node manages the resources belonging to it based on the cloned resource library.

[0071] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0072] Obtain the node that is mounted with the cloned resource library, wherein there is at least one node; generate relation mapping data based on the node and the resources belonging to the node; generate a node sequence list based on the relation mapping data.

[0073] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0074] The running status of the node is obtained, and it is determined whether the running status of the node is normal. If the running status of the node is normal, each node performs resource management on the resources belonging to the node based on the clone resource library. If the running status of the node is abnormal, a candidate node is obtained based on the node sequence list to perform resource management on the node's resources.

[0075] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0076] Determine whether there are preset alternative nodes; if there are preset alternative nodes, perform resource management on the node based on the alternative nodes; if there are no preset alternative nodes, perform load stress test on the node with the cloned resource library mounted; based on the load stress test results, obtain alternative nodes to perform resource management on the node.

[0077] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0078] Obtain the running status of the preset candidate nodes; if the running status of the preset candidate nodes is normal, then perform resource management on the node based on the candidate nodes; if the running status of the preset candidate nodes is abnormal, then perform a stress test on the node with the cloned resource library mounted, and based on the stress test results, obtain the candidate nodes to perform resource management on the node.

[0079] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0080] Perform load stress tests on each node that is mounted with the cloned resource library, and obtain the stress test results; based on the load stress test results, sort the load stress test results in ascending order of load stress test values ​​to generate a sequence list; based on the sequence list, obtain candidate nodes according to the candidate node acquisition rules; and perform resource management on the resources of the candidate nodes.

[0081] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0082] Based on the ordered list, the nodes corresponding to the stress test values ​​are obtained sequentially, and the nodes corresponding to the stress test values ​​are defined as reserve nodes; based on the reserve nodes, the running status of the reserve nodes is obtained; the reserve nodes with normal running status are obtained as candidate nodes, and resource management is performed on the resources of the nodes based on the candidate nodes.

[0083] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0084] The resources in the resource database are classified according to resource type, and resources of the same type are integrated into the clone resource library;

[0085] Obtain the node to which the resources in the cloned resource repository belong, and mount the cloned resource repository to the node, wherein there is at least one node;

[0086] Each node manages the resources belonging to it based on the cloned resource library.

[0087] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0088] Obtain the node that is mounted with the cloned resource library, wherein there is at least one node; generate relation mapping data based on the node and the resources belonging to the node; generate a node sequence list based on the relation mapping data.

[0089] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0090] The running status of the node is obtained, and it is determined whether the running status of the node is normal. If the running status of the node is normal, each node performs resource management on the resources belonging to the node based on the clone resource library. If the running status of the node is abnormal, a candidate node is obtained based on the node sequence list to perform resource management on the node's resources.

[0091] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0092] Determine whether there are preset alternative nodes; if there are preset alternative nodes, perform resource management on the node based on the alternative nodes; if there are no preset alternative nodes, perform load stress test on the node with the cloned resource library mounted; based on the load stress test results, obtain alternative nodes to perform resource management on the node.

[0093] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0094] Obtain the running status of the preset candidate nodes; if the running status of the preset candidate nodes is normal, then perform resource management on the node based on the candidate nodes; if the running status of the preset candidate nodes is abnormal, then perform a stress test on the node with the cloned resource library mounted, and based on the stress test results, obtain the candidate nodes to perform resource management on the node.

[0095] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0096] Perform load stress tests on each node that is mounted with the cloned resource library, and obtain the stress test results; based on the load stress test results, sort the load stress test results in ascending order of load stress test values ​​to generate a sequence list; based on the sequence list, obtain candidate nodes according to the candidate node acquisition rules; and perform resource management on the resources of the candidate nodes.

[0097] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0098] Based on the ordered list, the nodes corresponding to the stress test values ​​are obtained sequentially, and the nodes corresponding to the stress test values ​​are defined as reserve nodes; based on the reserve nodes, the running status of the reserve nodes is obtained; the reserve nodes with normal running status are obtained as candidate nodes, and resource management is performed on the resources of the nodes based on the candidate nodes.

[0099] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0100] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0101] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A cluster resource management method applied to the Pacemaker mechanism, characterized in that, The method includes: The resources in the resource database are classified according to resource type, and resources of the same type are integrated into the clone resource library, wherein the resources include file systems and shared resources; Obtain the node to which the resource in the cloned resource library belongs, and mount the cloned resource library to the node containing the resource type according to the resource type and the node's affiliation relationship, wherein the node is at least one; Each node manages the resources belonging to it based on the cloned resource library; The method further includes: Obtain the node that has the cloned resource library mounted on it, wherein there is at least one node; Based on the node and the resources belonging to the node, generate relationship mapping data; Based on the relationship mapping data, a node sequence table is generated; Each node, based on the cloned resource library, performs resource management on the resources belonging to that node, including: Obtain the running status of the node and determine whether the running status of the node is normal; If the node is running normally, each node will manage the resources belonging to it based on the cloned resource library. If the node is not running properly, then a candidate node is selected based on the node sequence list to manage the resources of the node.

2. The cluster resource management method according to claim 1, characterized in that, Before obtaining candidate nodes for resource management based on the node sequence list, the method further includes: Determine if there are any preset alternative nodes; If there are preset alternative nodes, then resource management is performed on the resources of the node based on the alternative nodes; If there are no preset alternative nodes, a load stress test is performed on the node that is mounted with the cloned resource library. Based on the load stress test results, alternative nodes are selected to manage the resources of the selected nodes.

3. The cluster resource management method according to claim 2, characterized in that, If there are preset alternative nodes, resource management is performed on the resources of the node based on the alternative nodes, including: Obtain the running status of the preset candidate nodes; If the preset candidate node is operating normally, then resource management is performed on the node's resources based on the candidate node; If the preset candidate node is not running properly, a stress test is performed on the node that is mounted with the cloned resource library. Based on the stress test results, the candidate node is selected to manage the resources of the node.

4. The cluster resource management method according to claim 3, characterized in that, Based on the load stress test results, alternative nodes are selected to manage the resources of the selected nodes, including: Perform load stress tests on each node that is mounted with the cloned resource library, and obtain the stress test results; Based on the load stress test results, the load stress test results are sorted in ascending order of load stress test values ​​to generate a sequence list; Based on the ordered list, candidate nodes are obtained according to the candidate node acquisition rules; Resource management is performed on the resources of the node based on the candidate node.

5. The cluster resource management method according to claim 4, characterized in that, The rules for obtaining candidate nodes include: Based on the ordered list, the nodes corresponding to the stress test values ​​are obtained sequentially, and the nodes corresponding to the stress test values ​​are defined as candidate nodes. Based on the proposed nodes, obtain the running status of the proposed nodes; The selected nodes that are in normal operating condition are designated as candidate nodes, and resource management is performed on the resources of the selected nodes.

6. The cluster resource management method according to any one of claims 1-5, characterized in that, Resource management of the node's resources includes at least one of resource mounting, resource monitoring, and resource unloading.

7. A cluster resource management apparatus for implementing the cluster resource management method as described in any one of claims 1-6, characterized in that, The device includes: The classification and integration unit is used to classify resources in the resource database according to resource type and integrate resources of the same type into the clone resource library; A mounting unit is used to obtain the node to which the resources in the cloned resource library belong, and mount the cloned resource library to the node, wherein there is at least one node; The resource management unit is used by each node to manage the resources belonging to that node based on the cloned resource library.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • K8S quick starting method based on cloud platform

    CN111522622A

  • High availability method based on server cluster

    CN112181660A

  • Description and distribution method and system for multi-level computation of edge clouds

    CN112311834A

  • Fast file snapshot and cloning

    CN114175008A