Method and device for updating node cluster, electronic equipment and storage medium
Patent Information
- Application Number
- CN202310706336.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-06-14
AI Technical Summary
[0003]私有云集群节点的管理目前由机房的运维人员来完成,增加了人力的投入,而且对于集群节点的管理效率低下,在私有云集群资源弹性变化较大或较快的时候,使用人工运维的方式无法跟上集群资源变化的速度
[0068]本申请获取当前云节点集群中的故障节点;从当前候选节点集群中筛选与故障节点相匹配的候选节点,得到替换节点;将替换节点加入当前云节点集群,并将故障节点从当前云节点集群中删除,得到当前更新云节点集群;对故障节点的配置信息进行初始化操作,得到更新候选节点;将更新候选节点加入当前候选节点集群中,得到当前更新候选节点集群;当前更新候选节点集群用于对当前更新云节点集群中的故障节点进行替换。本申请在检测到云节点集群中的故障节点时,即采取候选节点及时对其进行替换,避免了故障节点所引发的数据处理异常问题,实现了集群中节点的自动化运维,提高了云节点集群中各个节点的运行稳定性以及运行效率;并将故障节点的配置信息进行初始化操作后,加入当前候选节点集群中,提高了故障节点的利用效率,实现了资源的循环利用。
Smart Images

Figure CN119155303B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device and storage medium for updating a node cluster. Background Technology
[0002] Since the operation and maintenance of private cloud clusters are basically done by the data center's operation and maintenance personnel, and the number of servers in the cluster delivered by the private cloud is fixed, if a cluster node becomes unavailable, or if the cluster resources are insufficient and it is necessary to expand the cluster nodes, the data center's operation and maintenance personnel need to do it manually.
[0003] Currently, the management of private cloud cluster nodes is handled by the data center's operations and maintenance personnel, which increases the investment of manpower and is inefficient in managing cluster nodes. When the elasticity of private cloud cluster resources changes significantly or rapidly, manual operations and maintenance cannot keep up with the speed of cluster resource changes. Summary of the Invention
[0004] This application provides a method, apparatus, electronic device, and storage medium for updating a node cluster, which can realize automated operation and maintenance of nodes in the cluster and improve the operational stability and efficiency of each node in the cloud node cluster.
[0005] On the one hand, this application provides a method for updating a node cluster, the method comprising:
[0006] Get the faulty nodes in the current cloud node cluster;
[0007] From the current candidate node cluster, candidate nodes that match the faulty node are selected to obtain replacement nodes;
[0008] The replacement node is added to the current cloud node cluster, and the faulty node is removed from the current cloud node cluster to obtain the current updated cloud node cluster;
[0009] The configuration information of the faulty node is initialized to obtain updated candidate nodes;
[0010] The update candidate node is added to the current candidate node cluster to obtain the current update candidate node cluster; the current update candidate node cluster is used to replace the faulty node in the current update cloud node cluster.
[0011] On the other hand, an update device for a node cluster is provided, the device comprising:
[0012] The fault node acquisition module is used to acquire fault nodes in the current cloud node cluster;
[0013] The replacement node determination module is used to filter candidate nodes that match the faulty node from the current candidate node cluster to obtain the replacement node;
[0014] The node replacement module is used to add the replacement node to the current cloud node cluster and delete the faulty node from the current cloud node cluster to obtain the current updated cloud node cluster.
[0015] An initialization module is used to initialize the configuration information of the faulty node to obtain updated candidate nodes;
[0016] The update module is used to add the update candidate node to the current candidate node cluster to obtain the current update candidate node cluster; the current update candidate node cluster is used to replace the faulty node in the current update cloud node cluster.
[0017] In one exemplary embodiment, the apparatus further includes:
[0018] The fault type determination module is used to determine the fault type corresponding to the fault node;
[0019] The determination module is used to determine whether there is a target processing strategy that matches the fault type based on a preset fault handling strategy; the preset fault handling strategy represents the correspondence between preset fault types and preset processing strategies.
[0020] In one exemplary embodiment, the replacement node determination module includes:
[0021] The execution unit is used to, if there is no target processing strategy that matches the fault type, execute the process of filtering candidate nodes from the current candidate node cluster that match the fault node to obtain a replacement node.
[0022] In one exemplary embodiment, the apparatus further includes:
[0023] The weight acquisition module is used to acquire the weight value corresponding to each of the multiple candidate processing strategies if there are multiple candidate processing strategies that match the fault type in the preset fault handling strategy.
[0024] The strategy determination module is used to select the target processing strategy from the multiple candidate processing strategies based on the weight values corresponding to each of the multiple candidate processing strategies; the weight value of the target processing strategy is greater than the weight values of the remaining processing strategies; the remaining processing strategies are the strategies other than the target processing strategy among the multiple candidate processing strategies.
[0025] The instruction sending module is used to send a policy execution instruction to the faulty node, the policy execution instruction carrying the target processing policy, so that the faulty node executes the target processing policy.
[0026] In one exemplary embodiment, the apparatus further includes:
[0027] The preset type determination module is used to determine multiple preset fault types based on historical fault information of historical fault nodes;
[0028] The preset strategy determination module is used to determine at least one preset processing strategy corresponding to each preset fault type;
[0029] The weight determination module is used to determine the weight value of each of the multiple preset processing strategies based on the number of historical fault repairs corresponding to the multiple preset processing strategies for any preset fault type if there are multiple preset processing strategies for the preset fault type.
[0030] The strategy construction module is used to construct the preset fault handling strategy based on the preset handling strategies corresponding to each of the multiple preset fault types and the weight value corresponding to each preset handling strategy.
[0031] In one exemplary embodiment, the apparatus further includes:
[0032] The result receiving module is used to receive the fault handling results sent by the faulty node;
[0033] The weight update module is used to redetermine the weight values corresponding to each of the multiple candidate processing strategies based on the fault handling results, and obtain the updated weight values corresponding to each of the multiple candidate processing strategies.
[0034] The strategy update module is used to update the preset fault handling strategy according to the update weight value corresponding to each of the multiple candidate processing strategies.
[0035] In one exemplary embodiment, the weight update module includes:
[0036] The first adjustment unit is used to increase the weight value corresponding to the target processing strategy if the fault processing result indicates that the fault has been repaired.
[0037] The second adjustment unit is used to reduce the weight value corresponding to the target processing strategy if the fault processing result indicates that the fault has not been repaired.
[0038] In an exemplary embodiment, if the fault handling result indicates that the fault has not been repaired, the apparatus further includes:
[0039] The current strategy determination module is used to select a strategy to be processed from the set of remaining processing strategies as the current processing strategy; the set of remaining processing strategies includes multiple remaining processing strategies.
[0040] The current instruction sending module is used to send a current policy execution instruction to the faulty node, the current policy execution instruction carrying the current processing policy, so that the faulty node executes the current processing policy;
[0041] The current result receiving module is used to receive the current fault handling result sent by the faulty node;
[0042] The strategy elimination module is used to remove the current processing strategy from the set of remaining processing strategies if the current fault handling result indicates that the fault has not been repaired, so as to obtain the current set of remaining processing strategies.
[0043] The repeat module is used to re-select the current processing strategy from the current remaining processing strategy set; and repeat the steps of sending the current strategy execution instruction to the faulty node and removing the current processing strategy from the remaining processing strategy set if the current fault processing result indicates that the fault has not been repaired, to obtain the current remaining processing strategy set.
[0044] In one exemplary embodiment, the apparatus further includes:
[0045] The node replacement module is used to select candidate nodes that match the faulty node from the current candidate node cluster if the current fault handling results of each remaining processing strategy in the remaining processing strategy set indicate that the fault has not been repaired, and to obtain a replacement node.
[0046] In one exemplary embodiment, the apparatus further includes:
[0047] An attribute acquisition module is used to acquire the attribute information of the faulty node;
[0048] The comprehensive attribute acquisition module is used to acquire comprehensive attribute information corresponding to each of multiple preset candidate node clusters;
[0049] The cluster determination module is used to determine the current candidate node cluster as the cluster whose comprehensive attribute information matches the attribute information of the faulty node.
[0050] In one exemplary embodiment, the replacement node determination module includes:
[0051] The node replacement unit is used to determine any idle candidate node in the current candidate node cluster as a candidate node that matches the faulty node, and thus obtain the replacement node.
[0052] In one exemplary embodiment, the comprehensive attribute acquisition module includes:
[0053] A battery acquisition unit is used to acquire a pool of candidate nodes;
[0054] A preset cluster determination unit is used to divide the candidate node pool into the plurality of preset candidate node clusters based on the attribute information of each candidate node in the candidate node pool.
[0055] The comprehensive attribute determination unit is used to determine the comprehensive attribute information corresponding to each preset candidate node cluster based on the attribute information of the candidate nodes in each preset candidate node cluster.
[0056] In one exemplary embodiment, the apparatus is applied to a cloud data center, the cloud data center including multiple cloud node clusters, the multiple cloud node clusters corresponding to a candidate node cluster; the apparatus further includes:
[0057] A cluster determination module is used to determine the candidate node cluster as the current candidate node cluster;
[0058] The candidate attribute acquisition module is used to acquire the attribute information of each candidate node in the current candidate node cluster.
[0059] In one exemplary embodiment, the replacement node determination module includes:
[0060] An attribute acquisition unit is used to acquire the attribute information of the faulty node;
[0061] The replacement node determination unit is used to determine the candidate node whose attribute information in the current candidate node cluster matches the attribute information of the faulty node as the replacement node.
[0062] In one exemplary embodiment, the apparatus further includes:
[0063] The jump module is used to re-establish the current updated cloud node cluster as the current cloud node cluster, re-establish the current updated candidate node cluster as the current candidate node cluster, and jump to the step of obtaining the faulty node in the current cloud node cluster.
[0064] On the other hand, a node cluster update device is provided, the device including a processor and a memory, the memory storing at least one instruction or at least one program segment, the at least one instruction or the at least one program segment being loaded and executed by the processor to implement the node cluster update method as described above.
[0065] On the other hand, a computer storage medium is provided that stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the node cluster update method as described above.
[0066] On the other hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the node cluster update method as described above.
[0067] The node cluster update method, apparatus, electronic device, and storage medium provided in this application have the following technical effects:
[0068] This application obtains faulty nodes in the current cloud node cluster; filters candidate nodes matching the faulty nodes from the current candidate node cluster to obtain replacement nodes; adds the replacement nodes to the current cloud node cluster and removes the faulty nodes from the current cloud node cluster to obtain the current updated cloud node cluster; initializes the configuration information of the faulty nodes to obtain updated candidate nodes; adds the updated candidate nodes to the current candidate node cluster to obtain the current updated candidate node cluster; the current updated candidate node cluster is used to replace faulty nodes in the current updated cloud node cluster. This application, upon detecting a faulty node in the cloud node cluster, promptly replaces it with a candidate node, avoiding data processing anomalies caused by the faulty node, achieving automated operation and maintenance of nodes in the cluster, and improving the operational stability and efficiency of each node in the cloud node cluster; furthermore, by initializing the configuration information of the faulty node and adding it to the current candidate node cluster, the utilization efficiency of the faulty node is improved, and resource recycling is achieved. Attached Figure Description
[0069] To more clearly illustrate the technical solutions and advantages in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0070] Figure 1 This is a schematic diagram of a node cluster update system provided in the embodiments of this specification;
[0071] Figure 2 This is a flowchart illustrating a node cluster update method provided in an embodiment of this specification.
[0072] Figure 3 This is a flowchart illustrating a method for determining a current candidate node cluster provided in an embodiment of this specification;
[0073] Figure 4 This is an update architecture diagram of a node cluster provided in the embodiments of this specification;
[0074] Figure 5 This is a flowchart illustrating a method for determining whether a target processing strategy matching the fault type exists, as provided in an embodiment of this specification.
[0075] Figure 6 This is a flowchart illustrating a method for constructing a preset fault handling strategy provided in the embodiments of this specification;
[0076] Figure 7 This is a flowchart illustrating a method for sending policy execution instructions to a faulty node, as provided in an embodiment of this specification.
[0077] Figure 8 This is a schematic diagram illustrating the working principle of a node controller provided in the embodiments of this specification;
[0078] Figure 9 This is a schematic diagram of the working principle of an NPD provided in the embodiments of this specification;
[0079] Figure 10 This is a recovery principle diagram provided in the embodiments of this specification, which allows for fault recovery.
[0080] Figure 11 This is a schematic diagram illustrating the working principle of an unrecoverable node provided in the embodiments of this specification;
[0081] Figure 12 This is a flowchart illustrating a method for updating the preset fault handling strategy provided in an embodiment of this specification;
[0082] Figure 13 This is a flowchart illustrating a method for repeatedly sending the current policy execution instruction to the faulty node, as provided in an embodiment of this specification.
[0083] Figure 14 This is a schematic diagram of the structure of a node cluster update device provided in the embodiments of this specification;
[0084] Figure 15 This is a schematic diagram of the structure of a server provided in the embodiments of this specification. Detailed Implementation
[0085] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0086] Cloud technology refers to a managed technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to achieve data computing, storage, processing, and sharing.
[0087] Cloud technology is a collective term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies applied to the cloud computing business model. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will all require robust system support, which can only be achieved through cloud computing.
[0088] A private cloud is a cloud infrastructure and hardware / software resources created within a firewall, allowing various departments within an organization or enterprise to share resources within a data center. In addition to hardware resources, creating a private cloud typically involves cloud equipment (IaaS, Infrastructure as a Service) software.
[0089] Private cloud computing also comprises three layers: cloud hardware, cloud platform, and cloud services. The difference is that cloud hardware consists of the user's own personal computer or server, rather than the cloud computing vendor's data center. Cloud computing vendors build data centers to provide public cloud services to millions of users, thus requiring hundreds of thousands or even millions of servers. Private cloud computing, for individuals, only serves close friends and family; for businesses, it only serves their own employees, customers, and suppliers. Therefore, an individual's or business's own personal computer or server is sufficient to provide cloud services. The method in this embodiment is applied to the operation and maintenance of nodes in a private cloud.
[0090] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0091] Please see Figure 1 , Figure 1 This is a schematic diagram of an update system for a node cluster provided in an embodiment of this specification, such as... Figure 1 As shown, the update system of this node cluster can include at least server 01 and client 02.
[0092] Specifically, in the embodiments of this specification, the aforementioned server 01 may include a standalone server, a distributed server, or a server cluster composed of multiple servers. It may also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Server 01 may include a network communication unit, a processor, and a memory, etc. Specifically, the aforementioned server 01 can be used to obtain faulty nodes in the current cloud node cluster; filter candidate nodes matching the faulty nodes from the current candidate node cluster to obtain replacement nodes; add the replacement nodes to the current cloud node cluster and delete the faulty nodes from the current cloud node cluster to obtain the current updated cloud node cluster; initialize the configuration information of the faulty nodes to obtain updated candidate nodes; add the updated candidate nodes to the current candidate node cluster to obtain the current updated candidate node cluster; the current updated candidate node cluster is used to replace the faulty nodes in the current updated cloud node cluster.
[0093] Specifically, in the embodiments of this specification, the aforementioned client 02 may include physical devices such as smartphones, desktop computers, tablets, laptops, digital assistants, smart wearable devices, smart speakers, in-vehicle terminals, and smart TVs. It may also include software running on the physical device, such as web pages provided to users by service providers, or applications provided to users by those service providers. Specifically, the aforementioned client 02 can be used to display faulty nodes and replacement nodes.
[0094] The following describes a node cluster update method according to this application. Figure 2 This is a flowchart illustrating a node cluster update method provided in an embodiment of this specification. This specification provides the method operation steps described in the embodiments or flowchart, but based on conventional or non-inventive methods, more or fewer operation steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual system or server product execution, the method can be executed sequentially according to the embodiments or drawings, or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Specifically, as shown in the flowchart... Figure 2 As shown, the above method can be applied to Figure 1 In the server shown, the server can be a node controller, and the above method can include:
[0095] S201: Get the faulty nodes in the current cloud node cluster.
[0096] In the embodiments described in this specification, the current cloud node cluster can be a Kubernetes (K8S) cluster in a cloud data center. A Kubernetes cluster is a system used to manage container clusters, enabling automatic deployment, scaling, and management of containers. The current cloud node cluster can include multiple nodes, each of which is a server. Each node is managed by Kubernetes native resource nodes. NPD is a K8S addon designed to expose node failures to upper-layer components of the cluster management. The open-source component NPD (node-problem-detector) is used as a daemon for node health checks. NPD identifies faulty nodes by monitoring the health status of each node and detecting problems, and reports these faults to the node controller. The node controller can then obtain information about the faulty nodes in the current cloud node cluster, including their corresponding fault information and attribute information.
[0097] S203: Select candidate nodes from the current candidate node cluster that match the above-mentioned faulty node to obtain replacement nodes.
[0098] In the embodiments described in this specification, before selecting candidate nodes that match the faulty node from the current candidate node cluster to obtain a replacement node, as follows: Figure 3 As shown, Figure 3 A method for determining the current candidate node cluster, the method includes:
[0099] S301: Obtain the attribute information of the above-mentioned faulty node;
[0100] In the embodiments described in this specification, the attribute information of the faulty node may include, but is not limited to, the node's operating system type, storage size, memory size, CPU size, machine type, and model. Based on the attribute information of the faulty node, corresponding candidate nodes can be matched to replace the faulty node in the current cloud node cluster.
[0101] S303: Obtain comprehensive attribute information corresponding to each of multiple preset candidate node clusters;
[0102] In the embodiments of this specification, when there are multiple preset candidate node clusters, for any preset candidate node cluster, the comprehensive attribute information of the preset candidate node cluster can be determined based on the attribute information of each candidate node in the preset candidate node cluster. For example, the set of operating system types of each candidate node in the preset candidate node cluster can be determined as the comprehensive attribute information of the preset candidate node cluster. Alternatively, the memory value range can be determined based on the memory size of each candidate node in the preset candidate node cluster, and the memory value range can be determined as the comprehensive attribute information of the preset candidate node cluster.
[0103] In some embodiments, obtaining the comprehensive attribute information corresponding to each of the multiple preset candidate node clusters includes:
[0104] Obtain the candidate node pool;
[0105] In the embodiments described in this specification, a cloud data center may set up a candidate node pool, in which each candidate node is independent of the others and has no relation to them.
[0106] Based on the attribute information of each candidate node in the above candidate node pool, the above candidate node pool is divided into the above multiple preset candidate node clusters.
[0107] In the embodiments of this specification, candidate nodes with similar or nearly identical attribute information can be formed into a preset candidate node cluster, thereby obtaining multiple preset candidate node clusters; the number of preset candidate node clusters can be set according to the actual situation.
[0108] Based on the attribute information of the candidate nodes in each preset candidate node cluster, the comprehensive attribute information corresponding to each preset candidate node cluster is determined.
[0109] In the embodiments of this specification, a cloud data center can set up a candidate node pool, and can group multiple candidate nodes according to the attribute information of multiple candidate nodes in the candidate node pool to obtain multiple preset candidate node clusters; the attribute information of candidate nodes in each preset candidate node cluster is similar or close. The comprehensive attribute information of the preset candidate node cluster can be determined according to the attribute information of each candidate node in the preset candidate node cluster; for example, the set of operating system types of each candidate node in the preset candidate node cluster can be determined as the comprehensive attribute information of the preset candidate node cluster; the memory value range can also be determined according to the memory size of each candidate node in the preset candidate node cluster, and the memory value range can be determined as the comprehensive attribute information of the preset candidate node cluster.
[0110] In one exemplary embodiment, such as Figure 4 As shown, Figure 4This is an update architecture diagram for a node cluster. The data center includes a cloud node (Kubernetes) cluster, a node controller, and a candidate node cluster. In the Kubernetes cluster, each node is managed by the native Kubernetes resource node. The open-source component NPD is used as a daemon for node health checks. NPD monitors the health status of each node and reports any detected faults to the node controller. If the fault is a problem that exists in the problem database and can be resolved, the node controller selects the corresponding resolution strategy based on the problem type and executes the steps of the corresponding resolution strategy on the corresponding node. If the problem is not in the problem database and is considered unsolvable, the node controller selects a candidate node from the cluster node candidate pool and sends a request to the Kubernetes cluster management server (apiserver) to add the candidate node to the cluster. After the new node is successfully added, a request to delete the node is sent to the Kubernetes cluster management server. The node is then deleted in the Kubernetes cluster, and the node controller performs server reinstallation and configuration initialization on the node. Finally, the node is added back to the node candidate pool, thus completing the full lifecycle management of the node. Unavailable nodes (non-hardware level) can also be re-added to the node candidate pool through reinstallation and configuration initialization, achieving resource recycling. The node candidate pool can be replaced with a node candidate set. A cloud computing data center can have multiple clusters, and each cloud computing data center has a node candidate set, corresponding to multiple Kubernetes clusters. Each Kubernetes cluster selects node machines from the node candidate set, and the conditions that must be met include: operating system type, storage size, memory size, CPU size, and machine model. Server nodes in each Kubernetes cluster must meet corresponding conditions to be added to the cluster.
[0111] S305: The preset candidate node cluster that matches the comprehensive attribute information with the attribute information of the above-mentioned faulty node is determined as the current candidate node cluster.
[0112] In the embodiments of this specification, the comprehensive attribute information of each preset candidate node cluster can be matched with the attribute information of the faulty node; if there are multiple attribute information of the faulty node, the multiple attribute information is matched one by one with the multiple comprehensive attribute information of the same preset candidate node cluster, and the preset candidate node cluster that matches all comprehensive attribute information is determined as the current candidate node cluster.
[0113] For example, the process of selecting candidate nodes from the current candidate node cluster that match the aforementioned failed node to obtain a replacement node includes:
[0114] Any idle candidate node in the current candidate node cluster is selected as a candidate node that matches the faulty node, thus obtaining the replacement node.
[0115] In the embodiments of this specification, if the current candidate node cluster is selected from multiple preset candidate node clusters, it means that the attribute information of the faulty node matches the comprehensive attribute information of the cluster. For example, the attribute information of the faulty node is within the range of the comprehensive attribute information of the cluster. At this time, the attribute information of each candidate node in the current candidate node cluster is similar, and any idle candidate node in the current candidate node cluster can be determined as a candidate node that matches the aforementioned faulty node, thus obtaining the aforementioned replacement node.
[0116] In some embodiments, the above method is applied to a cloud data center, which includes multiple cloud node clusters, each corresponding to a candidate node cluster; before selecting a candidate node from the current candidate node cluster that matches the faulty node to obtain a replacement node, the method further includes:
[0117] The above-mentioned candidate node cluster is determined as the current candidate node cluster;
[0118] Obtain the attribute information of each candidate node in the current candidate node cluster;
[0119] In the embodiments of this specification, the above-mentioned selection of candidate nodes that match the faulty node from the current candidate node cluster to obtain a replacement node includes:
[0120] Obtain the attribute information of the aforementioned faulty nodes;
[0121] Candidate nodes whose attribute information in the current candidate node cluster matches the attribute information of the aforementioned faulty node are identified as the aforementioned replacement nodes.
[0122] In the embodiments of this specification, nodes in a cloud node cluster can be used to interact with clients and provide backend services. A candidate node cluster can be set up for multiple cloud node clusters in a cloud data center. The attribute information of each candidate node in this cluster is different. During the replacement node selection process, replacement nodes can be selected based on the matching results between the attribute information of the candidate nodes and the attribute information of the faulty nodes. Matching two attribute information sets means that the similarity between the two attribute information sets is greater than a preset threshold. When there are multiple attribute information sets for a faulty node, they are matched one by one, and the candidate node corresponding to the attribute information set with the most matches is determined as the replacement node. This ensures that the replacement node has a high similarity to the faulty node and can better replace the faulty node in interacting with the client.
[0123] In the embodiments described in this specification, such as Figure 5 As shown, before selecting candidate nodes that match the faulty node from the current candidate node cluster to obtain a replacement node, the method further includes:
[0124] S501: Determine the fault type corresponding to the above-mentioned faulty node;
[0125] In the embodiments of this specification, the corresponding fault type can be determined based on the fault information corresponding to the fault node; during application, a preset fault type can be determined based on historical fault information, thereby constructing a mapping relationship between fault information and fault type, which facilitates the determination of the fault type corresponding to the fault information.
[0126] S503: Based on the preset fault handling strategy, determine whether there is a target handling strategy that matches the above fault type; the preset fault handling strategy represents the correspondence between the preset fault type and the preset handling strategy.
[0127] In the embodiments of this specification, a preset fault type may correspond to one or more preset processing strategies. The correspondence between the two may be one-to-one or one-to-many. Based on the preset fault processing strategy, it can be found whether there is a fault type for a fault node. If there is a fault type for a fault node, the processing strategy corresponding to the fault type is searched to obtain the target processing strategy. If there is no fault type for a fault node, it is determined that there is no target processing strategy that matches the above fault type.
[0128] In some embodiments, such as Figure 6 As shown, the method for constructing the aforementioned preset fault handling strategy includes:
[0129] S601: Based on historical fault information of historical fault nodes, determine multiple preset fault types;
[0130] In the embodiments of this specification, multiple preset fault types can be determined based on the historical fault information of historical fault nodes, and each preset fault type represents a category of fault.
[0131] S603: Determine at least one preset handling strategy corresponding to each preset fault type;
[0132] In the embodiments of this specification, one or more preset processing strategies can be set for each preset fault type, and the preset processing strategies can be used to repair the faults corresponding to the fault type.
[0133] S605: For any preset fault type, if there are multiple preset processing strategies for the preset fault type, determine the weight value corresponding to each of the multiple preset processing strategies based on the number of historical fault repairs corresponding to the multiple preset processing strategies.
[0134] In the embodiments of this specification, if a fault type has multiple preset processing strategies, the weight value corresponding to each preset processing strategy can be determined based on the number of historical fault repairs corresponding to each preset processing strategy; wherein, the preset processing strategy with more historical fault repairs has a larger weight value. The initial weight value of each preset processing strategy can be the same value, and during application, the weight value can be continuously updated based on the number of fault repairs of each preset processing strategy.
[0135] S607: Based on the preset processing strategies corresponding to each of the above preset fault types, and the weight value corresponding to each preset processing strategy, construct the above preset fault processing strategy.
[0136] In the embodiments of this specification, after determining the preset processing strategy corresponding to each preset fault type and the weight value corresponding to each preset processing strategy, the preset fault processing strategy can be constructed based on the correspondence between the preset fault type, the preset processing strategy and the weight value.
[0137] In the embodiments of this specification, when there are multiple preset processing strategies for a fault type, the weight value corresponding to each preset processing strategy can be determined according to the historical fault repair count corresponding to each preset processing strategy. During the application process, the target processing strategy can be selected according to the weight value, thereby improving the fault repair probability of the fault node.
[0138] In some embodiments, the process of selecting candidate nodes that match the failed node from the current candidate node cluster to obtain a replacement node includes:
[0139] If no target handling strategy matches the above fault type, the candidate node matching the above fault node is selected from the current candidate node cluster to obtain the replacement node.
[0140] In the embodiments of this specification, if there is no target processing strategy that matches the above-mentioned fault type, it means that the fault information corresponding to the fault node is an unrepairable fault. In this case, the fault node can be replaced, thereby improving the fault processing efficiency.
[0141] In some embodiments, such as Figure 7 As shown, the above method also includes:
[0142] S701: If there are multiple candidate processing strategies that match the above-mentioned fault type in the above-mentioned preset fault processing strategy, obtain the weight value corresponding to each of the above-mentioned multiple candidate processing strategies.
[0143] In the embodiments of this specification, after constructing a preset fault handling strategy, if there are multiple candidate handling strategies in the preset fault handling strategy that match the fault type of the fault node, the weight values corresponding to each of the multiple candidate handling strategies are obtained, so that the target handling strategy can be selected from the multiple candidate handling strategies according to the weight values.
[0144] S703: Based on the weight values corresponding to each of the above candidate processing strategies, the target processing strategy is selected from the above candidate processing strategies; the weight value of the target processing strategy is greater than the weight value of the remaining processing strategies; the remaining processing strategies are the strategies other than the target processing strategy among the above candidate processing strategies.
[0145] In the embodiments of this specification, the weight value of the target processing strategy is greater than the weight value of the remaining processing strategies; multiple candidate processing strategies can be sorted from largest to smallest according to their respective weight values, and the candidate processing strategy ranked first is determined as the target processing strategy; if there are multiple strategies with the largest weight values among the multiple candidate processing strategies, any one of the multiple strategies with the largest weight values can be used as the target processing strategy.
[0146] S705: Send a policy execution instruction to the aforementioned faulty node, the policy execution instruction carrying the aforementioned target processing policy; so that the aforementioned faulty node executes the aforementioned target processing policy.
[0147] In the embodiments described in this specification, after determining the target processing strategy, the node controller can generate a strategy execution instruction and send the strategy execution instruction to the faulty node; after receiving the strategy execution instruction, the faulty node can repair the fault based on the target processing strategy in the instruction.
[0148] In some embodiments, after determining the target processing strategy, the node controller can generate fault repair steps according to the target processing strategy and inject the fault repair steps into the Job of the Kubernetes cluster. The Job is used to perform one-time tasks, such as data processing, analysis, testing, and computation. The node controller can send the Job to the faulty node so that the faulty node can execute the Job.
[0149] In one exemplary embodiment, such as Figure 8 As shown, Figure 8This diagram illustrates the working principle of a node controller. Each candidate node in the current candidate node cluster is configured with an NPD (Network Detector). The NPD process on each node encapsulates detected fault information into fault messages and sends them to the node controller's fault message queue. The fault message queue can include fault message 1, fault message 2, ..., fault message k. The node controller's main process periodically consumes messages from the fault message queue, periodically pulls a certain number of messages, parses each message, and determines the fault type. If the message is a recoverable fault, it searches the local database for a corresponding fault recovery strategy, selects the appropriate strategy, and generates fault recovery steps. Based on these recovery steps, it creates a native Kubernetes cluster resource Job, injects the step information into the Job, and the Job executes the fault recovery steps. If the fault is unrecoverable, it generates corresponding unrecoverable fault handling steps, creates a Job based on these steps, injects the step information into the Job, and then the Job executes these handling steps, thereby improving fault handling efficiency.
[0150] In one exemplary embodiment, such as Figure 9 As shown, Figure 9 This is a diagram illustrating the working principle of NPD (Network Detection). NPD is deployed on each cluster node, and a main process is started on each node. Its primary function is to initiate multiple scheduled tasks to monitor various aspects of the cluster nodes and collect data. These tasks include scheduled monitoring of basic node components, application components, hardware resources, system logs, and heartbeat messages. NPD periodically sends heartbeat messages to the node controller. If a fault is detected, it aggregates fault metrics to identify the corresponding fault content and type, then encapsulates this into a fault message and sends it to the node controller.
[0151] In one exemplary embodiment, such as Figure 10 As shown, Figure 10 This diagram illustrates a fault-tolerant recovery principle. After the NPD sends a fault message to the node controller, the node controller parses the message, locates the corresponding fault type and content in its local database, and then identifies the appropriate fault handling steps. The corresponding fault handling steps are then initiated, encapsulated into a Job, and the Job is created to execute these steps.
[0152] In one exemplary embodiment, such as Figure 11 As shown, Figure 11This diagram illustrates the working principle of an unrecoverable node. The NPD (Network Detection) process on each cluster node periodically sends heartbeat messages to the node controller. The node controller also periodically checks for heartbeat messages. If no heartbeat message is found for a given node, the NPD process is restarted. If the NPD process fails to start, the node controller restarts the node. If restarting the node fails, or if restarting the node succeeds but restarting NPD fails, then the node is considered to have experienced an unrecoverable failure. Alternatively, if the node controller finds unrecoverable failure messages in the fault message queue, it also determines that the node has experienced an unrecoverable failure, creates a Job, encapsulates the handling steps for the unrecoverable failure of the corresponding node within the Job, and executes the corresponding steps.
[0153] In some embodiments, such as Figure 12 As shown, after sending the policy execution instruction to the faulty node, the method further includes:
[0154] S1201: Receive the fault handling result sent by the above-mentioned faulty node;
[0155] In the embodiments of this specification, the fault handling result may include a fault repair result and a fault not repair result.
[0156] S1203: Based on the above fault handling results, redetermine the weight values corresponding to each of the above multiple candidate processing strategies to obtain the updated weight values corresponding to each of the above multiple candidate processing strategies.
[0157] In the embodiments of this specification, the weight values corresponding to each of the above-mentioned multiple candidate processing strategies can be re-determined based on the fault handling results, so as to obtain the updated weight values corresponding to each of the above-mentioned multiple candidate processing strategies. For example, if the fault handling result of the target processing strategy is a fault repair result, its corresponding weight value can be increased, and the weight values of other candidate processing strategies corresponding to the same fault type can be decreased.
[0158] For example, based on the above fault handling results, the weight values corresponding to each of the above candidate processing strategies are re-determined, including:
[0159] If the above fault handling results indicate that the fault has been repaired, increase the weight value corresponding to the above target handling strategy.
[0160] If the above fault handling results indicate that the fault has not been repaired, the weight value corresponding to the above target handling strategy will be reduced.
[0161] In the embodiments of this specification, the weights of the target processing strategies can be adjusted according to the fault handling results, so as to facilitate the subsequent priority selection of fault handling strategies with larger weights and higher repair success rates.
[0162] S1205: Update the preset fault handling strategy according to the update weight values corresponding to each of the above candidate processing strategies.
[0163] In the embodiments of this specification, the preset fault handling strategy can undergo adaptive learning. Each fault can have one or more fault handling strategies, and each fault repair strategy is assigned a corresponding weight. The weight is determined by the number of successful fault recovery attempts. For each successful fault recovery, the fault handling strategy with the highest weight is prioritized. Each successful fault handling recalculates the weights of each recovery strategy for that fault. If all handling strategies fail for a fault, the fault is converted into an unrecoverable fault, and the unrecoverable fault strategy is executed. Manual intervention (maintenance personnel) can also adjust the indicators and recovery strategy content of the fault repair strategy based on their experience, adding or deleting fault repair strategies to facilitate subsequent selection of the handling strategy with a higher success rate based on weights.
[0164] In the embodiments of this specification, if the target processing strategy selected in the first screening cannot repair the fault, the remaining processing strategy set can be selected in descending order of weight value to process the fault until the fault is repaired; if all strategies in the remaining processing strategy set cannot repair the fault, the fault information of the fault node can be determined as an unrecoverable fault, and at this time, the fault node needs to be replaced.
[0165] In the embodiments described in this specification, such as Figure 13 As shown, if the above fault handling results indicate that the fault has not been repaired, the above method further includes:
[0166] S1301: Select a strategy to be processed from the set of remaining processing strategies and use it as the current processing strategy; the set of remaining processing strategies includes multiple of the above-mentioned remaining processing strategies.
[0167] In the embodiments described in this specification, the weight value of the above-mentioned strategy to be processed is greater than the weight value of other processing strategies in the above-mentioned remaining processing strategy set; the strategy with the largest weight value can be selected from the remaining processing strategy set as the current processing strategy for fault repair processing.
[0168] S1303: Send a current policy execution instruction to the aforementioned faulty node, the current policy execution instruction carrying the aforementioned current processing policy; so that the aforementioned faulty node executes the aforementioned current processing policy;
[0169] In the embodiments described in this specification, after determining the current processing strategy, the node controller can generate fault repair steps according to the current processing strategy and inject the fault repair steps into the Job of the Kubernetes cluster. The Job is used to perform one-time tasks, such as data processing, analysis, testing, and computation. The node controller can send the Job to the faulty node so that the faulty node can execute the Job.
[0170] S1305: Receive the current fault handling result sent by the above-mentioned faulty node;
[0171] In the embodiments described in this specification, the current fault handling result may include a fault repair result and a fault not repair result.
[0172] S1307: If the current fault handling result indicates that the fault has not been repaired, remove the current handling strategy from the set of remaining handling strategies to obtain the current set of remaining handling strategies;
[0173] In the embodiments described in this specification, if the fault is not repaired, the current remaining processing strategy set can be determined based on the remaining processing strategy set, and strategies can continue to be selected for fault repair.
[0174] S1309: Re-select the current processing strategy from the above-mentioned set of remaining processing strategies; and repeat the above steps of sending the current strategy execution instruction to the above-mentioned fault node until the above-mentioned current fault processing result indicates that the fault has not been repaired, remove the above-mentioned current processing strategy from the above-mentioned set of remaining processing strategies to obtain the current set of remaining processing strategies.
[0175] In the embodiments described in this specification, if fault repair cannot be performed based on the current processing strategy, the remaining strategies in the current strategy set can be traversed to perform fault repair processing, thereby improving fault repair efficiency.
[0176] In the embodiments described in this specification, the above method further includes:
[0177] If the current fault handling results corresponding to each of the remaining processing strategies in the above remaining processing strategy set all indicate that the fault has not been repaired, then the candidate node that matches the above fault node is selected from the current candidate node cluster to obtain the replacement node.
[0178] In the embodiments of this specification, if the current fault handling results corresponding to each of the remaining processing strategies in the above-mentioned remaining processing strategy set all indicate that the fault has not been repaired, the current fault information of the above-mentioned fault node is determined to be an unrepairable fault; at this time, the fault node needs to be replaced, thereby improving the automatic operation and maintenance efficiency of the current cloud node cluster.
[0179] In the embodiments of this specification, if the current fault information of the aforementioned fault node is determined to be an unrepairable fault, the above method further includes:
[0180] The aforementioned fault types and multiple candidate processing strategies matching the aforementioned fault types are removed from the above-mentioned preset fault handling strategies.
[0181] In the embodiments of this specification, if multiple preset fault handling strategies corresponding to a fault type cannot repair the fault information corresponding to the fault node, it indicates that the accuracy of the multiple preset fault handling strategies is low. In this case, the fault type and multiple candidate handling strategies matching the fault type can be deleted from the preset fault handling strategies; or a new fault handling strategy can be constructed based on the fault type to improve the accuracy of the preset fault handling strategies.
[0182] S205: Add the above-mentioned replacement node to the above-mentioned current cloud node cluster, and delete the above-mentioned faulty node from the above-mentioned current cloud node cluster to obtain the current updated cloud node cluster.
[0183] In the embodiments described in this specification, if it is determined that the fault of a faulty node cannot be repaired, a replacement node is identified and added to the current cloud node cluster. The faulty node is then removed from the current cloud node cluster, resulting in a currently updated cloud node cluster. At this point, data from the faulty node can be transferred to the replacement node.
[0184] S207: Initialize the configuration information of the above-mentioned faulty nodes to obtain updated candidate nodes.
[0185] In the embodiments of this specification, the configuration information of the above-mentioned faulty node can be initialized and reinstalled to obtain updated candidate nodes.
[0186] S209: Add the above-mentioned update candidate nodes to the above-mentioned current candidate node cluster to obtain the current update candidate node cluster; the above-mentioned current update candidate node cluster is used to replace the faulty nodes in the above-mentioned current update cloud node cluster.
[0187] In the embodiments of this specification, updated candidate nodes obtained based on faulty nodes can be added to the current candidate node cluster and updated to obtain the current updated candidate node cluster, thereby realizing the reuse of resources and improving the utilization rate of faulty nodes.
[0188] In the embodiments of this specification, after adding the aforementioned update candidate nodes to the current candidate node cluster to obtain the current update candidate node cluster, the method further includes:
[0189] The above-mentioned currently updated cloud node cluster is re-established as the current cloud node cluster, and the above-mentioned currently updated candidate node cluster is re-established as the current candidate node cluster. Then, the process jumps to the above-mentioned step of obtaining the faulty node in the current cloud node cluster.
[0190] In the embodiments of this specification, after updating and obtaining the current updated cloud node cluster and the current updated candidate node cluster, the current updated cloud node cluster can be used as the current cloud node cluster again, and the current updated candidate node cluster can be used as the current candidate node cluster again. Then, the process jumps to the step of obtaining the faulty node in the current cloud node cluster and enters the next cycle of node cluster updates, and so on.
[0191] As can be seen from the technical solutions provided in the embodiments of this specification above, the embodiments of this specification obtain the faulty node in the current cloud node cluster; select candidate nodes that match the faulty node from the current candidate node cluster to obtain the replacement node; add the replacement node to the current cloud node cluster and delete the faulty node from the current cloud node cluster to obtain the current updated cloud node cluster; initialize the configuration information of the faulty node to obtain the updated candidate node; add the updated candidate node to the current candidate node cluster to obtain the current updated candidate node cluster; the current updated candidate node cluster is used to replace the faulty node in the current updated cloud node cluster. This application, upon detecting a faulty node in the cloud node cluster, promptly replaces it with a candidate node, avoiding data processing anomalies caused by the faulty node, realizing automated operation and maintenance of nodes in the cluster, and improving the operational stability and efficiency of each node in the cloud node cluster; and after initializing the configuration information of the faulty node, it adds it to the current candidate node cluster, improving the utilization efficiency of the faulty node and realizing the recycling of resources.
[0192] This specification also provides an update device for a node cluster, such as... Figure 14 As shown, the above-mentioned device includes:
[0193] The fault node acquisition module 1410 is used to acquire fault nodes in the current cloud node cluster.
[0194] The replacement node determination module 1420 is used to filter candidate nodes that match the above-mentioned faulty nodes from the current candidate node cluster to obtain replacement nodes;
[0195] The node replacement module 1430 is used to add the replacement node to the current cloud node cluster and delete the faulty node from the current cloud node cluster to obtain the current updated cloud node cluster.
[0196] The initialization module 1440 is used to initialize the configuration information of the above-mentioned faulty nodes to obtain update candidate nodes;
[0197] The update module 1450 is used to add the above-mentioned update candidate nodes to the above-mentioned current candidate node cluster to obtain the current update candidate node cluster; the above-mentioned current update candidate node cluster is used to replace the faulty nodes in the above-mentioned current update cloud node cluster.
[0198] In one exemplary embodiment, the above-described apparatus further includes:
[0199] The fault type determination module is used to determine the fault type corresponding to the above-mentioned fault nodes;
[0200] The determination module is used to determine whether there is a target processing strategy that matches the above-mentioned fault type based on the preset fault handling strategy; the preset fault handling strategy represents the correspondence between the preset fault type and the preset processing strategy.
[0201] In one exemplary embodiment, the replacement node determination module includes:
[0202] The execution unit is used to select candidate nodes from the current candidate node cluster that match the above-mentioned fault nodes if there is no target processing strategy that matches the above-mentioned fault type, and obtain replacement nodes.
[0203] In one exemplary embodiment, the above-described apparatus further includes:
[0204] The weight acquisition module is used to acquire the weight value corresponding to each of the multiple candidate processing strategies if there are multiple candidate processing strategies that match the above-mentioned fault type in the above-mentioned preset fault processing strategy.
[0205] The strategy determination module is used to select the target processing strategy from the multiple candidate processing strategies based on the weight values corresponding to each of the multiple candidate processing strategies; the weight value of the target processing strategy is greater than the weight values of the remaining processing strategies; the remaining processing strategies are the strategies other than the target processing strategy among the multiple candidate processing strategies.
[0206] The instruction sending module is used to send a policy execution instruction to the aforementioned faulty node, the policy execution instruction carrying the aforementioned target processing policy, so that the aforementioned faulty node executes the aforementioned target processing policy.
[0207] In one exemplary embodiment, the above-described apparatus further includes:
[0208] The preset type determination module is used to determine multiple preset fault types based on historical fault information of historical fault nodes;
[0209] The preset strategy determination module is used to determine at least one preset processing strategy corresponding to each preset fault type;
[0210] The weight determination module is used to determine the weight value of each of the preset processing strategies for any preset fault type if there are multiple preset processing strategies for the preset fault type.
[0211] The strategy construction module is used to construct the aforementioned preset fault handling strategies based on the preset handling strategies corresponding to each of the multiple preset fault types, and the weight values corresponding to each preset handling strategy.
[0212] In one exemplary embodiment, the above-described apparatus further includes:
[0213] The result receiving module is used to receive the fault handling results sent by the aforementioned faulty nodes;
[0214] The weight update module is used to redetermine the weight values corresponding to each of the above multiple candidate processing strategies based on the above fault handling results, and obtain the updated weight values corresponding to each of the above multiple candidate processing strategies.
[0215] The strategy update module is used to update the preset fault handling strategy according to the update weight values corresponding to the multiple candidate processing strategies.
[0216] In one exemplary embodiment, the weight update module includes:
[0217] The first adjustment unit is used to increase the weight value corresponding to the above target processing strategy if the above fault processing result indicates that the fault has been repaired.
[0218] The second adjustment unit is used to reduce the weight value corresponding to the above target processing strategy if the above fault processing result indicates that the fault has not been repaired.
[0219] In an exemplary embodiment, if the fault handling result indicates that the fault has not been repaired, the apparatus further includes:
[0220] The current strategy determination module is used to select a strategy to be processed from the set of remaining processing strategies as the current processing strategy; the set of remaining processing strategies includes multiple of the aforementioned remaining processing strategies.
[0221] The current instruction sending module is used to send a current policy execution instruction to the aforementioned faulty node, wherein the current policy execution instruction carries the aforementioned current processing policy, so that the aforementioned faulty node executes the aforementioned current processing policy;
[0222] The current result receiving module is used to receive the current fault handling results sent by the aforementioned faulty nodes;
[0223] The strategy elimination module is used to remove the current processing strategy from the set of remaining processing strategies if the current fault handling result indicates that the fault has not been repaired, thus obtaining the current set of remaining processing strategies.
[0224] The repeat module is used to re-select the current processing strategy from the above-mentioned set of current remaining processing strategies; and repeat the above steps of sending the current strategy execution instruction to the above-mentioned fault node until the above-mentioned current processing strategy is removed from the above-mentioned set of remaining processing strategies if the above-mentioned current fault processing result indicates that the fault has not been repaired, so as to obtain the current set of remaining processing strategies.
[0225] In one exemplary embodiment, the above-described apparatus further includes:
[0226] The node replacement module is used to select candidate nodes from the current candidate node cluster that match the faulty node if the current fault handling results of each of the remaining processing strategies in the above remaining processing strategy set indicate that the fault has not been repaired, and to obtain the replacement node.
[0227] In one exemplary embodiment, the above-described apparatus further includes:
[0228] The attribute acquisition module is used to acquire the attribute information of the aforementioned faulty nodes;
[0229] The comprehensive attribute acquisition module is used to acquire comprehensive attribute information corresponding to each of multiple preset candidate node clusters;
[0230] The cluster determination module is used to determine the preset candidate node clusters that match the comprehensive attribute information with the attribute information of the above-mentioned faulty nodes as the current candidate node clusters.
[0231] In one exemplary embodiment, the replacement node determination module includes:
[0232] The node replacement unit is used to determine any idle candidate node in the current candidate node cluster as a candidate node that matches the faulty node, and thus obtain the replacement node.
[0233] In one exemplary embodiment, the above-mentioned comprehensive attribute acquisition module includes:
[0234] A battery acquisition unit is used to acquire a pool of candidate nodes;
[0235] The preset cluster determination unit is used to divide the candidate node pool into multiple preset candidate node clusters based on the attribute information of each candidate node in the candidate node pool.
[0236] The comprehensive attribute determination unit is used to determine the comprehensive attribute information corresponding to each preset candidate node cluster based on the attribute information of the candidate nodes in each preset candidate node cluster.
[0237] In one exemplary embodiment, the apparatus is applied to a cloud data center, which includes multiple cloud node clusters, each corresponding to a candidate node cluster; the apparatus further includes:
[0238] The cluster determination module is used to determine the above-mentioned candidate node cluster as the above-mentioned current candidate node cluster;
[0239] The candidate attribute acquisition module is used to obtain the attribute information of each candidate node in the current candidate node cluster.
[0240] In one exemplary embodiment, the replacement node determination module includes:
[0241] The attribute acquisition unit is used to acquire the attribute information of the aforementioned faulty nodes;
[0242] The replacement node determination unit is used to determine the candidate node whose attribute information in the current candidate node cluster matches the attribute information of the faulty node as the replacement node.
[0243] In one exemplary embodiment, the above-described apparatus further includes:
[0244] The jump module is used to re-establish the aforementioned currently updated cloud node cluster as the current cloud node cluster, re-establish the aforementioned currently updated candidate node cluster as the current candidate node cluster, and jump to the aforementioned step of obtaining the faulty node in the current cloud node cluster.
[0245] The apparatus and method embodiments described above are based on the same inventive concept.
[0246] This specification provides an update device for a node cluster, which includes a processor and a memory. The memory stores at least one instruction or at least one program, which is loaded and executed by the processor to implement the node cluster update method provided in the above method embodiments.
[0247] Embodiments of this application also provide a computer storage medium, which can be disposed in a terminal to store at least one instruction or at least one program related to implementing a node cluster update method in the method embodiment. The at least one instruction or at least one program is loaded and executed by the processor to implement the node cluster update method provided in the above method embodiment.
[0248] Embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the node cluster update method provided in the above-described method embodiments.
[0249] Optionally, in the embodiments of this specification, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0250] The memory described in the embodiments of this specification can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for the functions, etc.; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide the processor with access to the memory.
[0251] The node cluster update method embodiments provided in this specification can be executed on mobile terminals, computer terminals, servers, or similar computing devices. Taking running on a server as an example, Figure 15 This is a hardware structure block diagram of a server for a node cluster update method provided in an embodiment of this specification. For example... Figure 15As shown, the server 1500 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 1510 (CPUs 1510 may include, but are not limited to, microprocessors (MCUs) or programmable logic devices (FPGAs), a memory 1530 for storing data, and one or more storage media 1520 (e.g., one or more mass storage devices) for storing application programs 1523 or data 1522. The memory 1530 and storage media 1520 may be temporary or persistent storage. The program stored in the storage media 1520 may include one or more modules, each module may include a series of instruction operations on the server. Furthermore, the CPU 1510 may be configured to communicate with the storage media 1520 and execute the series of instruction operations in the storage media 1520 on the server 1500. Server 1500 may also include one or more power supplies 1560, one or more wired or wireless network interfaces 1550, one or more input / output interfaces 1540, and / or one or more operating systems 1521, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0252] The input / output interface 1540 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of server 1500. In one example, the input / output interface 1540 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 1540 may be a radio frequency (RF) module for wireless communication with the Internet.
[0253] Those skilled in the art will understand that Figure 15 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, server 1500 may also include... Figure 15 The more or fewer components shown, or having the same Figure 15 The different configurations shown.
[0254] As can be seen from the embodiments of the node cluster update method, apparatus, device, or storage medium provided in this application, this application obtains the faulty node in the current cloud node cluster; selects candidate nodes that match the faulty node from the current candidate node cluster to obtain replacement nodes; adds the replacement nodes to the current cloud node cluster and deletes the faulty node from the current cloud node cluster to obtain the current updated cloud node cluster; initializes the configuration information of the faulty node to obtain updated candidate nodes; adds the updated candidate nodes to the current candidate node cluster to obtain the current updated candidate node cluster; the current updated candidate node cluster is used to replace the faulty node in the current updated cloud node cluster. When a faulty node is detected in the cloud node cluster, this application immediately replaces it with a candidate node, avoiding data processing anomalies caused by the faulty node, realizing automated operation and maintenance of nodes in the cluster, and improving the operational stability and efficiency of each node in the cloud node cluster; and after initializing the configuration information of the faulty node, it adds it to the current candidate node cluster, improving the utilization efficiency of the faulty node and realizing the recycling of resources.
[0255] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments of this specification have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0256] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0257] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer storage medium, such as a read-only memory, a disk, or an optical disk.
[0258] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for updating a node cluster, characterized in that, The method includes: Get the faulty nodes in the current cloud node cluster; Obtain the attribute information of the faulty node; Obtain a candidate node pool; based on the attribute information of each candidate node in the candidate node pool, divide the candidate node pool into multiple preset candidate node clusters; based on the attribute information of the candidate nodes in each preset candidate node cluster, determine the comprehensive attribute information corresponding to each preset candidate node cluster. The preset candidate node cluster that matches the comprehensive attribute information with the attribute information of the faulty node is determined as the current candidate node cluster. Any idle candidate node in the current candidate node cluster is identified as a candidate node that matches the faulty node, and a replacement node is obtained. The replacement node is added to the current cloud node cluster, and the faulty node is removed from the current cloud node cluster to obtain the current updated cloud node cluster; The configuration information of the faulty node is initialized to obtain updated candidate nodes; The update candidate node is added to the current candidate node cluster to obtain the current update candidate node cluster; the current update candidate node cluster is used to replace the faulty node in the current update cloud node cluster.
2. The method according to claim 1, characterized in that, Before obtaining the replacement node, the method further includes: Determine the fault type corresponding to the faulty node; Based on a preset fault handling strategy, determine whether there is a target handling strategy that matches the fault type; the preset fault handling strategy represents the correspondence between preset fault types and preset handling strategies; The step of determining any idle candidate node in the current candidate node cluster as a candidate node that matches the faulty node, and obtaining a replacement node, includes: If no target processing strategy matches the fault type, any idle candidate node in the current candidate node cluster is selected as a candidate node that matches the fault node, and a replacement node is obtained.
3. The method according to claim 2, characterized in that, The method further includes: If there are multiple candidate processing strategies in the preset fault handling strategy that match the fault type, obtain the weight value corresponding to each of the multiple candidate processing strategies; Based on the weight values corresponding to each of the multiple candidate processing strategies, the target processing strategy is selected from the multiple candidate processing strategies; the weight value of the target processing strategy is greater than the weight values of the remaining processing strategies; the remaining processing strategies are the strategies other than the target processing strategy among the multiple candidate processing strategies. A policy execution instruction is sent to the faulty node, the policy execution instruction carrying the target processing policy, so that the faulty node executes the target processing policy.
4. The method according to claim 3, characterized in that, The method for constructing the preset fault handling strategy includes: Based on historical fault information of historical fault nodes, multiple preset fault types are determined; Determine at least one preset handling strategy corresponding to each preset fault type; For any preset fault type, if there are multiple preset processing strategies for the preset fault type, the weight value corresponding to each of the multiple preset processing strategies is determined based on the number of historical fault repairs corresponding to the multiple preset processing strategies. The preset fault handling strategy is constructed based on the preset handling strategies corresponding to each of the multiple preset fault types and the weight value corresponding to each preset handling strategy.
5. The method according to claim 4, characterized in that, After sending the policy execution instruction to the faulty node, the method further includes: Receive the fault handling result sent by the faulty node; Based on the fault handling results, the weight values corresponding to each of the multiple candidate processing strategies are re-determined to obtain the updated weight values corresponding to each of the multiple candidate processing strategies. The preset fault handling strategy is updated according to the update weight value corresponding to each of the multiple candidate processing strategies.
6. The method according to claim 5, characterized in that, The step of re-determining the weight values corresponding to each of the multiple candidate processing strategies based on the fault handling results includes: If the fault handling result indicates that the fault has been repaired, increase the weight value corresponding to the target handling strategy; If the fault handling result indicates that the fault has not been repaired, the weight value corresponding to the target handling strategy is reduced.
7. The method according to claim 6, characterized in that, If the fault handling result indicates that the fault has not been repaired, the method further includes: A strategy to be processed is selected from the set of remaining processing strategies and used as the current processing strategy; the set of remaining processing strategies includes multiple remaining processing strategies. Send a current policy execution instruction to the faulty node, the current policy execution instruction carrying the current processing policy; so that the faulty node executes the current processing policy; Receive the current fault handling result sent by the faulty node; If the current fault handling result indicates that the fault has not been repaired, the current handling strategy is removed from the set of remaining handling strategies to obtain the current set of remaining handling strategies; The current processing strategy is re-selected from the current remaining processing strategy set; and the steps of sending the current strategy execution instruction to the faulty node are repeated until the current fault processing result indicates that the fault has not been repaired, and the current processing strategy is removed from the remaining processing strategy set to obtain the current remaining processing strategy set.
8. The method according to claim 7, characterized in that, The method further includes: If the current fault handling results corresponding to each of the remaining processing strategies in the remaining processing strategy set all indicate that the fault has not been repaired, then any idle candidate node in the current candidate node cluster is determined as a candidate node that matches the faulty node, and a replacement node is obtained.
9. The method according to any one of claims 1-8, characterized in that, After adding the updated candidate node to the current candidate node cluster to obtain the current updated candidate node cluster, the method further includes: The currently updated cloud node cluster is re-established as the current cloud node cluster, and the currently updated candidate node cluster is re-established as the current candidate node cluster. Then, the process jumps to the step of obtaining the faulty node in the current cloud node cluster.
10. An update device for a node cluster, characterized in that, The device includes: The fault node acquisition module is used to acquire fault nodes in the current cloud node cluster; A replacement node determination module is used to: acquire attribute information of the faulty node; acquire a candidate node pool; divide the candidate node pool into multiple preset candidate node clusters based on the attribute information of each candidate node in the candidate node pool; determine comprehensive attribute information corresponding to each preset candidate node cluster based on the attribute information of the candidate nodes in each preset candidate node cluster; determine the preset candidate node cluster whose comprehensive attribute information matches the attribute information of the faulty node as the current candidate node cluster; and determine any idle candidate node in the current candidate node cluster as a candidate node that matches the faulty node, thereby obtaining a replacement node. The node replacement module is used to add the replacement node to the current cloud node cluster and delete the faulty node from the current cloud node cluster to obtain the current updated cloud node cluster. An initialization module is used to initialize the configuration information of the faulty node to obtain updated candidate nodes; The update module is used to add the update candidate node to the current candidate node cluster to obtain the current update candidate node cluster; the current update candidate node cluster is used to replace the faulty node in the current update cloud node cluster.
11. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or at least one program being loaded and executed by the processor to implement the node cluster update method as described in any one of claims 1-9.
12. A computer storage medium, characterized in that, The computer storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the node cluster update method as described in any one of claims 1-9.
Citation Information
Patent Citations
Fault processing method and device, electronic equipment and storage medium
CN114691395A
Cluster node control method and device, equipment and medium
CN114826892A