Node cluster updating method and device, electronic equipment and storage medium
By automatically obtaining and replacing failed nodes, the problem of inefficient operation and maintenance of private cloud clusters is solved, and efficient operation and maintenance of cloud node clusters is realized.
Patent Information
- Application Number
- CN202310706336.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2043-06-14
AI Technical Summary
The operation and maintenance of private cloud clusters rely on manual operations, resulting in low management efficiency and inability to quickly keep up with resource changes, increasing human resources investment and operation and maintenance costs.
Provide a node cluster update method and device, which automatically obtains faulty nodes, filters replacement nodes, performs node replacement and configuration initialization, realizes automatic operation and maintenance of the cluster, and improves operation stability and efficiency.
The automated operation and maintenance of cloud node clusters is realized, data processing exceptions caused by faulty nodes are avoided, node operation stability and efficiency are improved, and the utilization efficiency of faulty nodes is improved through resource recycling.
Smart Images

Figure CN119155303A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for updating a node cluster. Background Art
[0002] Since the operation and maintenance of private cloud clusters are basically completed by the operation and maintenance personnel in the computer room, the clusters delivered by private clouds have a fixed number of servers. If a cluster node is unavailable, or the cluster resources are insufficient and the cluster needs to expand the node capacity, the operation and maintenance personnel in the computer room need to complete it manually.
[0003] The management of private cloud cluster nodes is currently completed by the operation and maintenance personnel in the computer room, which increases the manpower investment and has low management efficiency for cluster nodes. When the elasticity of private cloud cluster resources changes greatly or quickly, the manual operation and maintenance method cannot keep up with the speed of cluster resource changes. Summary of the invention
[0004] The present application provides a node cluster update method, device, electronic device and storage medium, which can realize the automated operation and maintenance of nodes in the cluster and improve the operation stability and efficiency of each node in the cloud node cluster.
[0005] On the one hand, the present application provides a method for updating a node cluster, the method comprising:
[0006] Get the faulty nodes in the current cloud node cluster;
[0007] Select a candidate node that matches the failed node from the current candidate node cluster to obtain a replacement node;
[0008] Adding the replacement node to the current cloud node cluster and deleting the failed node from the current cloud node cluster to obtain a current updated cloud node cluster;
[0009] Initializing the configuration information of the faulty node to obtain an updated candidate node;
[0010] The update candidate node is added to the current candidate node cluster to obtain a 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] Another aspect provides a node cluster update device, the device comprising:
[0012] The fault node acquisition module is used to obtain the fault nodes in the current cloud node cluster;
[0013] A replacement node determination module is used to select a candidate node matching the failed node from the current candidate node cluster to obtain a replacement node;
[0014] A node replacement module, used to add the replacement node to the current cloud node cluster and delete the failed node from the current cloud node cluster to obtain a current updated cloud node cluster;
[0015] An initialization module, used to initialize the configuration information of the faulty node to obtain an updated candidate node;
[0016] The update module is used to add the update candidate node to the current candidate node cluster to obtain a 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 an exemplary embodiment, the apparatus further comprises:
[0018] A fault type determination module, 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 processing strategy; the preset fault processing strategy represents the corresponding relationship between the preset fault type and the preset processing strategy.
[0020] In an exemplary embodiment, the replacement node determination module includes:
[0021] The execution unit is used to screen a candidate node matching the fault node from the current candidate node cluster to obtain a replacement node if there is no target processing strategy matching the fault type.
[0022] In an exemplary embodiment, the apparatus further comprises:
[0023] A weight acquisition module, used for acquiring weight values corresponding to each of the plurality of candidate processing strategies if there are a plurality of candidate processing strategies matching the fault type in the preset fault processing strategy;
[0024] A strategy determination module, configured to select the target processing strategy from the plurality of candidate processing strategies based on the weight values corresponding to the plurality of candidate processing strategies respectively; the weight value of the target processing strategy is greater than the weight values of the remaining processing strategies; the remaining processing strategies are strategies other than the target processing strategy among the plurality of candidate processing strategies;
[0025] The instruction sending module is used to send a policy execution instruction to the faulty node, wherein the policy execution instruction carries the target processing policy, so that the faulty node executes the target processing policy.
[0026] In an exemplary embodiment, the apparatus further comprises:
[0027] A preset type determination module, used to determine multiple preset fault types based on historical fault information of historical fault nodes;
[0028] A preset strategy determination module, used to determine at least one preset processing strategy corresponding to each preset fault type;
[0029] A weight determination module, for determining, for any preset fault type, if there are multiple preset processing strategies for the preset fault type, the weight values corresponding to each of the multiple preset processing strategies based on the number of historical fault repair times corresponding to the multiple preset processing strategies;
[0030] The strategy building module is used to build the preset fault processing strategy based on the preset processing strategies corresponding to the multiple preset fault types and the weight value corresponding to each preset processing strategy.
[0031] In an exemplary embodiment, the apparatus further comprises:
[0032] A result receiving module, used for receiving the fault processing result sent by the fault node;
[0033] A weight updating module, configured to re-determine the weight values corresponding to the plurality of candidate processing strategies based on the fault processing result, and obtain updated weight values corresponding to the plurality of candidate processing strategies;
[0034] The strategy updating module is used to update the preset fault processing strategy according to the update weight values corresponding to each of the multiple candidate processing strategies.
[0035] In an exemplary embodiment, the weight updating module includes:
[0036] A first adjustment unit, configured to increase a 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 configured 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 device further includes:
[0039] A current strategy determination module, used to select a to-be-processed strategy from a remaining processing strategy set as a current processing strategy; the remaining processing strategy set includes a plurality of the remaining processing strategies;
[0040] A current instruction sending module, used to send a current strategy execution instruction to the faulty node, wherein the current strategy execution instruction carries the current processing strategy, so that the faulty node executes the current processing strategy;
[0041] A current result receiving module, used to receive the current fault processing result sent by the fault node;
[0042] A strategy elimination module, configured to eliminate the current processing strategy from the remaining processing strategy set if the current fault processing result indicates that the fault has not been repaired, so as to obtain a current remaining processing strategy set;
[0043] A repeating module is used to re-screen the current processing strategy from the current remaining processing strategy set; and repeat the step of sending the current strategy execution instruction to the faulty node until the current fault processing result indicates that the fault is not repaired, and removing the current processing strategy from the remaining processing strategy set to obtain the current remaining processing strategy set.
[0044] In an exemplary embodiment, the apparatus further comprises:
[0045] The node replacement module is used to select a candidate node matching the faulty node from the current candidate node cluster to obtain a replacement node if the current fault processing results corresponding to the remaining processing strategies in the remaining processing strategy set all indicate that the fault is not repaired.
[0046] In an exemplary embodiment, the apparatus further comprises:
[0047] An attribute acquisition module, used to acquire attribute information of the faulty node;
[0048] A comprehensive attribute acquisition module is used to obtain comprehensive attribute information corresponding to each of multiple preset candidate node clusters;
[0049] A cluster determination module, configured to determine a preset candidate node cluster whose comprehensive attribute information matches the attribute information of the faulty node as the current candidate node cluster;
[0050] In an 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 matching the failed node to obtain the replacement node.
[0052] In an exemplary embodiment, the comprehensive attribute acquisition module includes:
[0053] A battery acquisition unit, used to acquire a candidate node pool;
[0054] A preset cluster determining unit, configured to divide the candidate node pool into the plurality of preset candidate node clusters based on 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 an exemplary embodiment, the apparatus is applied to a cloud data center, the cloud data center includes a plurality of cloud node clusters, the plurality of cloud node clusters correspond to a candidate node cluster; the apparatus further includes:
[0057] A cluster determination module, configured to determine the candidate node cluster as the current candidate node cluster;
[0058] The candidate attribute acquisition module is used to obtain attribute information of each candidate node in the current candidate node cluster.
[0059] In an exemplary embodiment, the replacement node determination module includes:
[0060] An attribute acquisition unit, used to acquire attribute information of the faulty node;
[0061] The replacement node determination unit is used to determine a candidate node in the current candidate node cluster whose attribute information matches the attribute information of the failed node as the replacement node.
[0062] In an exemplary embodiment, the apparatus further comprises:
[0063] The jump module is used to re-use the current update cloud node cluster as the current cloud node cluster, and re-use the current update 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 comprising a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program 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, wherein the computer storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program 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 a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes to implement the node cluster update method as described above.
[0067] The node cluster update method, device, electronic device and storage medium provided by the present application have the following technical effects:
[0068] This application obtains the faulty node in the current cloud node cluster; selects the candidate node that matches the faulty node from the current candidate node cluster to obtain the replacement node; adds the replacement node 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 the updated candidate node; adds 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. When the present application detects a faulty node in the cloud node cluster, it promptly replaces it with a candidate node, avoiding data processing anomalies caused by the faulty node, realizing the automated operation and maintenance of the 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 is added to the current candidate node cluster, improving the utilization efficiency of the faulty node and realizing the recycling of resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the technical solutions and advantages of the embodiments of this specification or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0070] Figure 1 It is a schematic diagram of an update system of a node cluster provided in an embodiment of this specification;
[0071] Figure 2 It is a flowchart of a node cluster update method provided in an embodiment of this specification;
[0072] Figure 3 is a flowchart of a method for determining a current candidate node cluster provided by an embodiment of this specification;
[0073] Figure 4 This is an update architecture diagram of a node cluster provided in an embodiment of this specification;
[0074] Figure 5 is a flowchart of a method for determining whether there is a target processing strategy matching the fault type provided by an embodiment of this specification;
[0075] Figure 6 It is a flowchart of a method for constructing a preset fault handling strategy provided in an embodiment of this specification;
[0076] Figure 7 It is a flowchart of a method for sending a policy execution instruction to a faulty node provided by an embodiment of this specification;
[0077] Figure 8 It is a working principle diagram of a node controller provided in an embodiment of this specification;
[0078] Fig. 9 This is a working principle diagram of an NPD provided in an embodiment of this specification;
[0079] Fig.10 This is a recovery principle diagram of a fault-recoverable method provided by an embodiment of this specification;
[0080] Fig.11 This is a working principle diagram of a non-fail-recoverable node provided in an embodiment of this specification;
[0081] Fig.12 is a flowchart of a method for updating the preset fault handling strategy provided by an embodiment of this specification;
[0082] Fig.13 is a flowchart of a method for repeatedly sending a current policy execution instruction to the faulty node provided in an embodiment of this specification;
[0083] Fig.14 It is a structural diagram of an updating device for a node cluster provided in an embodiment of this specification;
[0084] Fig.15 It is a structural diagram of a server provided in an embodiment of this specification. DETAILED DESCRIPTION
[0085] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0086] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.
[0087] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.
[0088] A private cloud is a cloud infrastructure with software and hardware resources created within a firewall so that departments within an organization or enterprise can share resources within the data center. In addition to hardware resources, cloud equipment (IaaS, Infrastructure as a Service) software is generally required to create a private cloud.
[0089] Private cloud computing also includes three levels: cloud hardware, cloud platform, and cloud service. The difference is that cloud hardware is the user's own personal computer or server, not the data center of the cloud computing vendor. The purpose of cloud computing vendors to build data centers is to provide public cloud services to millions of users, so they need to have tens of millions of servers. Private cloud computing only serves friends and relatives for individuals, and only serves employees, customers, and suppliers of enterprises for enterprises. Therefore, an individual or enterprise's own personal computer or server is sufficient to provide cloud services. The method of 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 and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0091] See also Figure 1 , Figure 1 is a schematic diagram of a node cluster update system provided in an embodiment of this specification, such as Figure 1 As shown, the update system of the node cluster may include at least a server 01 and a client 02 .
[0092] Specifically, in the embodiments of this specification, the server 01 may include an independently operated server, or a distributed server, or a server cluster composed of multiple servers, and may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, 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 server 01 may be used to obtain a faulty node in the current cloud node cluster; select a candidate node that matches the faulty node from the current candidate node cluster to obtain a 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 an 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.
[0093] Specifically, in the embodiments of this specification, the client 02 may include physical devices such as smart phones, desktop computers, tablet computers, laptop computers, digital assistants, smart wearable devices, smart speakers, vehicle terminals, smart TVs, etc., and may also include software running in physical devices, such as web pages provided by some service providers to users, or applications provided by these service providers to users. Specifically, the client 02 may be used to display faulty nodes and replacement nodes.
[0094] The following describes a node cluster update method of the present application. Figure 2 It is a flowchart of a node cluster update method provided in an embodiment of this specification. This specification provides method operation steps as described in the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or server product is executed, it can be executed in the order shown in the embodiment or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment). Specifically, Figure 2 As shown, the above method can be applied to Figure 1 In the server shown, the server may be a node controller, and the method may include:
[0095] S201: Obtain the faulty nodes in the current cloud node cluster.
[0096] In the embodiments of this specification, the current cloud node cluster can be a kubernetes (abbreviated as K8S) cluster in the cloud data center. The kubernetes cluster is a system used to implement container cluster management, which is used to automatically deploy, expand and manage containers. The current cloud node cluster can include multiple nodes, each of which is a server, and each node is managed by the native resource node (node) of kubernetes. NPD is a K8S add-on (Addon) whose purpose is to expose node failures to the upper-level components of cluster management. The open source component NPD (node-problem-detector) is used as a daemon process for node health checks. NPD determines the faulty node by monitoring the health status of each node and the problems detected, and reports it to the node controller; the node controller can thereby obtain the faulty node in the current cloud node cluster, and can obtain the fault information and attribute information corresponding to the faulty node.
[0097] S203: Filter candidate nodes that match the above-mentioned faulty node from the current candidate node cluster to obtain replacement nodes.
[0098] In the embodiment of this specification, before selecting a candidate node matching the above-mentioned failed node from the current candidate node cluster to obtain a replacement node, as Figure 3 As shown, Figure 3 A method for determining a current candidate node cluster includes:
[0099] S301: Acquire the attribute information of the above-mentioned faulty node;
[0100] In the embodiments of 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, model, etc. According to the attribute information of the faulty node, the corresponding candidate node can be matched to achieve the replacement of the faulty node in the current cloud node cluster.
[0101] S303: Obtain comprehensive attribute information corresponding to each of a plurality of preset candidate node clusters;
[0102] In an embodiment of the present 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, a set consisting of the 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; and a memory value range can also 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, the above-mentioned obtaining of comprehensive attribute information corresponding to each of the plurality of preset candidate node clusters includes:
[0104] Get the candidate node pool;
[0105] In the embodiments of the present specification, a cloud data center may set up a candidate node pool, and each candidate node in the candidate node pool is independent of each other and has no association relationship.
[0106] Based on the attribute information of each candidate node in the candidate node pool, the candidate node pool is divided into the plurality of preset candidate node clusters;
[0107] In the embodiments of the present specification, candidate nodes with similar or close attribute information may be formed into a preset candidate node cluster, thereby obtaining multiple preset candidate node clusters; the number of preset candidate node clusters may be set according to actual conditions.
[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 an embodiment of the present specification, a cloud data center may set up a candidate node pool, and may 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 the candidate nodes in each preset candidate node cluster is similar or close. The comprehensive attribute information of the preset candidate node cluster may 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 may be determined as the comprehensive attribute information of the preset candidate node cluster; the memory value range may also be determined according to the memory size of each candidate node in the preset candidate node cluster, and the memory value range may be determined as the comprehensive attribute information of the preset candidate node cluster.
[0110] In an exemplary embodiment, if Figure 4 As shown, Figure 4This is an updated architecture diagram of a node cluster, in which a data center includes a cloud node (Kubernetes) cluster, a node controller, and a candidate node cluster of the cluster. In the Kubernetes cluster, each node is managed by the native resource node of Kubernetes, and the open source component NPD is used as a daemon for node health check. NPD monitors the health status of each node and reports the detected fault problem to the node controller. If the fault problem belongs to a problem existing in the problem library and can be solved, the node controller selects a corresponding solution strategy according to the type of problem and executes the steps of the corresponding solution strategy on the corresponding node. If the fault problem is not in the problem library and is an unsolvable problem, the node controller will select a candidate node from the cluster node candidate pool, and then send a request to add a new node to the management server (apiserver) of the Kubernetes cluster to add the candidate node to the cluster. After the new node successfully joins the cluster, it will send a request to delete the node to the management server of the Kubernetes cluster, and delete the node in the Kubernetes cluster. Then the node controller will reinstall the server of the node, perform node configuration initialization, and then add the node to the node candidate pool, thereby completing the full life cycle management of the node. Unavailable nodes (non-hardware level) can also rejoin the node candidate pool through reinstallation configuration initialization, realizing the recycling of resources. The node candidate pool can be replaced with the node candidate set here. A cloud computing data center can have many clusters. Each cloud computing data center has a node candidate set corresponding to multiple Kubernetes clusters. Each Kubernetes cluster selects a node machine from the node candidate set. The conditions that need to be met are: operating system type, storage size, memory size, CPU size, and machine model, etc. The server node in each kubernetes cluster needs to meet the corresponding conditions to join the cluster.
[0111] S305: Determine a preset candidate node cluster whose comprehensive attribute information matches the attribute information of the faulty node as the current candidate node cluster.
[0112] In the embodiments of the present 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 are matched one by one with the multiple comprehensive attribute information of the same preset candidate node cluster, and the preset candidate node cluster in which all the comprehensive attribute information are matched is determined as the above-mentioned current candidate node cluster.
[0113] Exemplarily, the above-mentioned screening of a candidate node matching the above-mentioned faulty node from the current candidate node cluster to obtain a replacement node includes:
[0114] Any idle candidate node in the current candidate node cluster is determined as a candidate node matching the faulty node to obtain the replacement node.
[0115] In the embodiment of the present 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 comprehensive attribute information range 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 matching the above-mentioned faulty node to obtain the above-mentioned replacement node.
[0116] In some embodiments, the above method is applied to a cloud data center, the above cloud data center includes multiple cloud node clusters, and the above multiple cloud node clusters correspond to a candidate node cluster; before the above method selects a candidate node matching the above failed node from the current candidate node cluster to obtain a replacement node, the above method also includes:
[0117] Determine the candidate node cluster as the current candidate node cluster;
[0118] Obtaining the attribute information of each candidate node in the above current candidate node cluster;
[0119] In the embodiment of the present specification, the above-mentioned screening of candidate nodes matching the above-mentioned failed node from the current candidate node cluster to obtain a replacement node includes:
[0120] Obtaining attribute information of the above faulty node;
[0121] A candidate node in the current candidate node cluster whose attribute information matches the attribute information of the failed node is determined as the replacement node.
[0122] In the embodiments of the present specification, the nodes in the cloud node cluster can be used to interact with the client and provide background services for the client. A candidate node cluster can be set for multiple cloud node clusters in the cloud data center. The attribute information of each candidate node in the cluster is different. In the process of replacing the node screening, the replacement node can be screened out according to the matching result of the attribute information of the candidate node and the attribute information of the faulty node; the matching of two attribute information means that the similarity of the two attribute information is greater than a preset threshold. When there are multiple attribute information of the faulty node, they are matched one by one, and the candidate node corresponding to the attribute information with the largest number of matches is determined as the replacement node, so as to ensure that the replacement node has a high similarity with the faulty node and can better replace the faulty node to interact with the client.
[0123] In the embodiments of this specification, Figure 5 As shown, before selecting a candidate node matching 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 faulty node;
[0125] In the embodiments of the present specification, the corresponding fault type can be determined based on the fault information corresponding to the fault node; during the application process, the preset fault type can be determined based on the historical fault information, thereby constructing a mapping relationship between the fault information and the fault type, which facilitates the determination of the fault type corresponding to the fault information.
[0126] S503: Based on the preset fault processing strategy, determine whether there is a target processing strategy that matches the above fault type; the above preset fault processing strategy represents the corresponding relationship between the preset fault type and the preset processing strategy.
[0127] In the embodiments of the present specification, a preset fault type may correspond to one or more preset processing strategies, and the correspondence between the two may be a one-to-one or one-to-many relationship. According to the preset fault processing strategy, it is possible to find out whether there is a fault type of the fault node; if there is a fault type of the fault node, then find the processing strategy corresponding to the fault type to obtain the target processing strategy; if there is no fault type of the fault node, it is determined that there is no target processing strategy that matches the above fault type.
[0128] In some embodiments, Figure 6 As shown, the method for constructing the above preset fault handling strategy includes:
[0129] S601: Determine multiple preset fault types based on historical fault information of historical fault nodes;
[0130] In the embodiment of the present specification, a plurality of preset fault types may be determined according to historical fault information of historical fault nodes, and each preset fault type represents a type of fault.
[0131] S603: Determine at least one preset processing strategy corresponding to each preset fault type;
[0132] In the embodiments of the present specification, one or more preset processing strategies may be set for each preset fault type, and the preset processing strategies may be used to repair the fault 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 values corresponding to each of the multiple preset processing strategies based on the number of historical fault repair times corresponding to the multiple preset processing strategies;
[0134] In the embodiments of this specification, if there are multiple preset processing strategies for a fault type, the weight values corresponding to each preset processing strategy can be determined according to the number of historical fault repairs corresponding to each preset processing strategy; wherein, the preset processing strategy with more historical fault repair times has a larger corresponding weight value. The initial weight values of each preset processing strategy can be the same value, and during the application process, the weight values can be continuously updated according to the number of fault repairs of each preset processing strategy.
[0135] S607: Constructing the preset fault processing strategy based on the preset processing strategies corresponding to the plurality of preset fault types and the weight value corresponding to each preset processing strategy.
[0136] In the embodiment of the present 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 according to the corresponding relationship between the preset fault type, the preset processing strategy and the weight value.
[0137] In an embodiment of the present specification, when there are multiple preset processing strategies for a fault type, 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. During the application process, the target processing strategy can be screened out based on the weight value, thereby improving the fault repair probability of the faulty node.
[0138] In some embodiments, the above-mentioned screening of candidate nodes matching the above-mentioned failed node from the current candidate node cluster to obtain a replacement node includes:
[0139] If there is no target processing strategy that matches the above fault type, a candidate node matching the above faulty node is screened from the current candidate node cluster to obtain a replacement node.
[0140] In the embodiment of the present specification, if there is no target processing strategy matching the above fault type, it means that the fault information corresponding to the faulty node is an unrepairable fault. At this time, the faulty node can be replaced, thereby improving the fault processing efficiency.
[0141] In some embodiments, Figure 7 As shown, the above method also includes:
[0142] S701: If there are multiple candidate processing strategies matching the above fault type in the above preset fault processing strategies, obtain weight values corresponding to each of the above multiple candidate processing strategies;
[0143] In an embodiment of the present specification, after constructing a preset fault handling strategy, if there are multiple candidate processing strategies in the preset fault handling strategy that match the fault type of the faulty node, the weight values corresponding to each of the multiple candidate processing strategies are obtained, so that the target processing strategy can be screened out from the multiple candidate processing strategies based on the weight values.
[0144] S703: based on the weight values corresponding to the plurality of candidate processing strategies, selecting the target processing strategy from the plurality of 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 strategies other than the target processing strategy among the plurality of candidate processing strategies;
[0145] In an embodiment of the present specification, the weight value of the above-mentioned target processing strategy is greater than the weight values of the remaining processing strategies; multiple candidate processing strategies can be sorted from large to small according to their corresponding weight values, and the candidate processing strategy ranked first can be 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 faulty node, wherein the policy execution instruction carries the target processing policy, so that the faulty node executes the target processing policy.
[0147] In an embodiment of the present specification, the node controller may generate a policy execution instruction after determining the target processing strategy, and send the policy execution instruction to the faulty node; after receiving the policy execution instruction, the faulty node may 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, computing and other requirements; the Job can be sent to the faulty node so that the faulty node executes the Job.
[0149] In an exemplary embodiment, if Figure 8 As shown, Figure 8The figure is a working principle diagram of a node controller. Each candidate node in the current candidate node cluster is set with an NPD. The NPD process on the node will encapsulate the monitored fault information into a fault message and send it to the fault message queue of the node controller. The fault message queue can include fault message 1, fault message 2, ..., fault message k; the main process of the node controller will consume the messages in the fault message queue regularly, pull a certain number of messages regularly, parse each message, and determine the fault type of the message. If it is a message of a recoverable fault, it will search the local database for the corresponding fault type of recovery fault strategy, select the corresponding fault repair strategy, and generate the fault recovery steps; according to the fault recovery steps, create the native resource Job of the kubernetes cluster, inject the step information into the Job, and the Job will execute the fault recovery steps. If it is an unrecoverable fault, generate the processing steps corresponding to the unrecoverable fault, create a Job according to these steps, inject the step information into the Job, and then the Job will execute these processing steps, thereby improving the fault handling efficiency.
[0150] In an exemplary embodiment, if Fig. 9 As shown, Fig. 9 This is a working principle diagram of NPD. NPD is deployed on each cluster node. It starts a main process on the cluster node. The main working principle is to start multiple scheduled tasks to monitor various aspects of the cluster nodes and collect data, such as starting the scheduled monitoring task of the node basic components, starting the scheduled monitoring task of the node application components, starting the cluster node hardware resource scheduled monitoring task, starting the node system log scheduled monitoring task, and starting the scheduled task of sending heartbeat messages. NPD will send heartbeat messages to the node controller regularly. If a fault is detected, the aggregated fault indicators will be found to match the fault content and fault type, and then encapsulated as a fault message and sent to the node controller.
[0151] In an exemplary embodiment, if Fig.10 As shown, Fig.10 This is a recovery principle diagram for fault recovery. After the NPD sends a fault message to the node controller, the node controller parses the fault message, finds the fault type and fault content corresponding to the fault message in the local database, and then finds the corresponding fault handling steps. Start the corresponding fault handling steps, encapsulate the steps into a job, and then create a job to execute the fault handling steps.
[0152] In an exemplary embodiment, if Fig.11 As shown, Fig.11The figure is a working principle diagram of a non-failure-recoverable node. The NPD of the cluster node will periodically send heartbeat messages to the node controller, and the node controller will also periodically check the heartbeat messages in the same time period. If the heartbeat message of the corresponding node is not detected, the NPD process of the corresponding node will be restarted. If the NPD process fails to start, the node controller will restart the node. If the node restart fails or the NPD restart fails after the node restart is successful, it is determined that an unrecoverable fault has occurred in the node; or if the node controller finds that the fault message type of some nodes in the fault message queue is an unrecoverable fault, it is also determined that an unrecoverable fault has occurred in the node and then starts to create a Job, encapsulates the processing steps of the corresponding node's unrecoverable fault in the Job, and executes the corresponding steps.
[0153] In some embodiments, Fig.12 As shown, after sending the policy execution instruction to the faulty node, the method further includes:
[0154] S1201: receiving the fault processing result sent by the faulty node;
[0155] In the embodiment of this specification, the fault handling result may include a fault repaired result and a fault unrepaired result.
[0156] S1203: Based on the fault processing result, re-determine the weight values corresponding to the plurality of candidate processing strategies, and obtain updated weight values corresponding to the plurality of candidate processing strategies;
[0157] In the embodiments of the present specification, the weight values corresponding to each of the above-mentioned multiple candidate processing strategies can be re-determined according to the fault handling result, and the updated weight values corresponding to each of the above-mentioned multiple candidate processing strategies can be obtained; for example, if the fault handling result of the target processing strategy is a fault repair result, then its corresponding weight value is increased, and the weight values of other candidate processing strategies corresponding to the same fault type can also be reduced.
[0158] Exemplarily, based on the fault processing result, re-determining the weight values corresponding to the plurality of candidate processing strategies includes:
[0159] If the above fault handling result indicates that the fault has been repaired, increase the weight value corresponding to the above target handling strategy;
[0160] If the above fault handling result indicates that the fault has not been repaired, reduce the weight value corresponding to the above target handling strategy.
[0161] In the embodiments of the present specification, the weight of the target processing strategy can be adjusted according to the fault processing result of the target processing strategy, so as to facilitate the subsequent priority selection of the fault processing strategy with a larger weight and a higher repair success rate.
[0162] S1205: updating the preset fault handling strategy according to the update weight values corresponding to the multiple candidate handling strategies.
[0163] In the embodiments of the present specification, the preset fault handling strategy can be adaptively learned. Each fault may correspond to one or more fault handling strategies. Each fault repair strategy is set with a corresponding weight. The size of the weight is determined by the number of successful fault recovery. Each time a fault is recovered, the fault handling strategy with a large weight is given priority for execution. Each time a fault is successfully handled, the weights corresponding to each recovery strategy for this fault are recalculated. If all handling strategies for a fault are invalid, the fault is converted into an unrecoverable fault, and the strategy for unrecoverable faults is executed. Manual (operation and maintenance personnel) can also adjust the indicators of the fault repair strategy and the content of the recovery strategy according to their own experience, and add or delete the fault repair strategy, so as to facilitate the subsequent selection of a processing strategy with a higher repair success rate based on the weight.
[0164] In an embodiment of the present specification, if the target processing strategy screened for the first time cannot repair the fault, the strategies in the remaining processing strategy set can be selected in order from large to small according to the weight values to handle 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 faulty node can be determined as an unrecoverable fault, and the faulty node needs to be replaced.
[0165] In the embodiments of this specification, Fig.13 As shown, if the above fault handling result indicates that the fault has not been repaired, the above method also includes:
[0166] S1301: Filter out a to-be-processed strategy from a remaining processing strategy set as a current processing strategy; the remaining processing strategy set includes a plurality of the remaining processing strategies;
[0167] In the embodiment of the present specification, the weight value of the above-mentioned strategy to be processed is greater than the weight values of other processing strategies in the above-mentioned remaining processing strategy set; the strategy with the largest weight value can continue to be selected from the remaining processing strategy set as the current processing strategy for fault repair processing.
[0168] S1303: Sending a current strategy execution instruction to the faulty node, wherein the current strategy execution instruction carries the current processing strategy, so that the faulty node executes the current processing strategy;
[0169] In an embodiment of the present 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, calculation and other requirements; the Job can be sent to the faulty node so that the faulty node executes the Job.
[0170] S1305: receiving the current fault processing result sent by the faulty node;
[0171] In the embodiment of the present specification, the current fault processing result may include a fault repaired result and a fault unrepaired result.
[0172] S1307: If the current fault processing result indicates that the fault is not repaired, remove the current processing strategy from the remaining processing strategy set to obtain a current remaining processing strategy set;
[0173] In the embodiment of the present specification, when the fault is not repaired, the current remaining processing strategy set can be determined according to the remaining processing strategy set, and the strategy can be continuously screened to repair the fault.
[0174] S1309: Re-screen the current processing strategy from the above-mentioned current remaining processing strategy set; and repeat the above-mentioned step of sending the current strategy execution instruction to the above-mentioned fault node to the above-mentioned if the above-mentioned current fault processing result indicates that the fault is not repaired, eliminating the above-mentioned current processing strategy from the above-mentioned remaining processing strategy set to obtain the current remaining processing strategy set.
[0175] In the embodiment of the present specification, when the fault repair cannot be performed based on the current processing strategy, the strategies in the current remaining strategy set can be continuously traversed to perform fault repair processing, thereby improving the fault repair efficiency.
[0176] In the embodiment of this specification, the above method also includes:
[0177] If the current fault processing results corresponding to the remaining processing strategies in the remaining processing strategy set all indicate that the fault is not repaired, a candidate node matching the faulty node is screened from the current candidate node cluster to obtain a replacement node.
[0178] In an embodiment of the present specification, if the current fault processing results corresponding to each remaining processing strategy 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 faulty node is determined as an unrepairable fault; at this time, the faulty node needs to be replaced, thereby improving the automatic operation and maintenance efficiency of the current cloud node cluster.
[0179] In the embodiment of the present specification, if the current fault information of the faulty node is determined to be an unrepairable fault, the method further includes:
[0180] The fault type and multiple candidate processing strategies matching the fault type are deleted from the preset fault processing strategies.
[0181] In an embodiment of the present specification, if multiple preset fault handling strategies corresponding to a fault type are unable to repair the fault information corresponding to the fault node, it means that the accuracy of the multiple preset fault handling strategies is low. At this time, the above-mentioned fault type and multiple candidate handling strategies matching the above-mentioned fault type can be deleted from the above-mentioned preset fault handling strategies; or a new fault handling strategy can be constructed according to the fault type to improve the accuracy of the preset fault handling strategy.
[0182] S205: Add the replacement node to the current cloud node cluster, and delete the faulty node from the current cloud node cluster to obtain a current updated cloud node cluster.
[0183] In the embodiment of the present specification, when it is determined that the fault of the faulty node cannot be repaired, a replacement node is determined, and the replacement node is added to the above-mentioned current cloud node cluster, and the above-mentioned faulty node is deleted from the above-mentioned current cloud node cluster to obtain the current updated cloud node cluster. At this time, the data in the faulty node can be transferred to the replacement node.
[0184] S207: Initialize the configuration information of the faulty node to obtain an updated candidate node.
[0185] In the embodiment of the present specification, the configuration information of the above-mentioned faulty node may be initialized and reinstalled to obtain an updated candidate node.
[0186] S209: adding the above-mentioned update candidate node 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 node in the above-mentioned current update cloud node cluster.
[0187] In the embodiments of the present specification, the updated candidate nodes obtained according to the faulty nodes may be added to the current candidate node cluster and updated to obtain the current updated candidate node cluster, thereby achieving resource reuse and improving the utilization rate of the faulty nodes.
[0188] In the embodiment of the present specification, after adding the update candidate node to the current candidate node cluster to obtain the current update candidate node cluster, the method further includes:
[0189] The above-mentioned current update cloud node cluster is re-used as the current cloud node cluster, and the above-mentioned current update candidate node cluster is re-used as the current candidate node cluster, and jumps to the above-mentioned step of obtaining the faulty node in the current cloud node cluster.
[0190] In an embodiment of the present specification, after the current update cloud node cluster and the current update candidate node cluster are updated, the above-mentioned current update cloud node cluster can be reused as the current cloud node cluster, and the above-mentioned current update candidate node cluster can be reused as the current candidate node cluster, and the process can be skipped to the above-mentioned step of obtaining the faulty nodes in the current cloud node cluster to enter the next cycle of node cluster update, and so on.
[0191] It can be seen from the technical solutions provided by the above embodiments of this specification that the embodiments of this specification obtain the node that fails in the current cloud node cluster to obtain the failed node; select the candidate node that matches the failed 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 failed node from the current cloud node cluster to obtain the current updated cloud node cluster; initialize the configuration information of the failed 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 failed node in the current updated cloud node cluster. When the present application detects a failed node in the cloud node cluster, it promptly replaces it with a candidate node, thereby avoiding the data processing anomaly caused by the failed node, realizing the automated operation and maintenance of the nodes in the cluster, and improving the operational stability and efficiency of each node in the cloud node cluster; and after the configuration information of the failed node is initialized, it is added to the current candidate node cluster, thereby improving the utilization efficiency of the failed node and realizing the recycling of resources.
[0192] The embodiment of this specification also provides a node cluster update device, such as Fig.14 As shown, the above device comprises:
[0193] A fault node acquisition module 1410 is used to acquire the fault nodes in the current cloud node cluster;
[0194] A replacement node determination module 1420 is used to select a candidate node matching the above-mentioned failed node from the current candidate node cluster to obtain a replacement node;
[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 a current updated cloud node cluster;
[0196] Initialization module 1440, used to initialize the configuration information of the above-mentioned faulty node to obtain an updated candidate node;
[0197] The updating module 1450 is used to add the above-mentioned update candidate node 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 node in the above-mentioned current update cloud node cluster.
[0198] In an exemplary embodiment, the above device further includes:
[0199] A fault type determination module is used to determine the fault type corresponding to the above fault node;
[0200] The determination module is used to determine whether there is a target processing strategy matching the above fault type based on the preset fault processing strategy; the above preset fault processing strategy represents the corresponding relationship between the preset fault type and the preset processing strategy.
[0201] In an exemplary embodiment, the replacement node determination module includes:
[0202] The execution unit is used to screen a candidate node matching the above-mentioned fault node from the current candidate node cluster to obtain a replacement node if there is no target processing strategy matching the above-mentioned fault type.
[0203] In an exemplary embodiment, the above device further includes:
[0204] A weight acquisition module, used for acquiring weight values corresponding to each of the plurality of candidate processing strategies if there are a plurality of candidate processing strategies matching the fault type in the preset fault processing strategies;
[0205] A strategy determination module, configured to select the target processing strategy from the plurality of candidate processing strategies based on the weight values corresponding to the plurality of candidate processing strategies respectively; the weight value of the target processing strategy is greater than the weight values of the remaining processing strategies; the remaining processing strategies are strategies other than the target processing strategy among the plurality of candidate processing strategies;
[0206] The instruction sending module is used to send a policy execution instruction to the above-mentioned fault node, wherein the above-mentioned policy execution instruction carries the above-mentioned target processing strategy; so that the above-mentioned fault node executes the above-mentioned target processing strategy.
[0207] In an exemplary embodiment, the above device further includes:
[0208] A preset type determination module, used to determine multiple preset fault types based on historical fault information of historical fault nodes;
[0209] A preset strategy determination module, used to determine at least one preset processing strategy corresponding to each preset fault type;
[0210] A weight determination module, for determining, for any preset fault type, if there are multiple preset processing strategies for the preset fault type, the weight values corresponding to each of the multiple preset processing strategies based on the number of historical fault repair times corresponding to the multiple preset processing strategies;
[0211] The strategy building module is used to build the above-mentioned preset fault processing strategy based on the preset processing strategies corresponding to the above-mentioned multiple preset fault types and the weight value corresponding to each preset processing strategy.
[0212] In an exemplary embodiment, the above device further includes:
[0213] A result receiving module, used to receive the fault processing result sent by the above fault node;
[0214] A weight updating module, used to re-determine the weight values corresponding to the above-mentioned multiple candidate processing strategies based on the above-mentioned fault processing result, and obtain the updated weight values corresponding to the above-mentioned multiple candidate processing strategies;
[0215] The strategy updating module is used to update the above-mentioned preset fault handling strategy according to the update weight values corresponding to each of the above-mentioned multiple candidate handling strategies.
[0216] In an exemplary embodiment, the weight updating module includes:
[0217] A 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;
[0218] The second adjustment unit is configured to reduce the weight value corresponding to the target processing strategy if the 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] A current strategy determination module is used to select a to-be-processed strategy from a remaining processing strategy set as a current processing strategy; the remaining processing strategy set includes a plurality of the remaining processing strategies;
[0221] A current instruction sending module is used to send a current strategy execution instruction to the above-mentioned faulty node, wherein the above-mentioned current strategy execution instruction carries the above-mentioned current processing strategy; so that the above-mentioned faulty node executes the above-mentioned current processing strategy;
[0222] A current result receiving module is used to receive the current fault processing result sent by the above fault node;
[0223] A strategy elimination module is used to eliminate the current processing strategy from the remaining processing strategy set if the current fault processing result indicates that the fault has not been repaired, so as to obtain the current remaining processing strategy set;
[0224] The repetition module is used to re-screen the current processing strategy from the above-mentioned current remaining processing strategy set; and repeat the above-mentioned step of sending the current strategy execution instruction to the above-mentioned fault node to the above-mentioned if the above-mentioned current fault processing result indicates that the fault is not repaired, eliminating the above-mentioned current processing strategy from the above-mentioned remaining processing strategy set to obtain the current remaining processing strategy set.
[0225] In an exemplary embodiment, the above device further includes:
[0226] The node replacement module is used to select a candidate node matching the above-mentioned faulty node from the current candidate node cluster to obtain a replacement node if the current fault processing results corresponding to each remaining processing strategy in the above-mentioned remaining processing strategy set all indicate that the fault has not been repaired.
[0227] In an exemplary embodiment, the above device further includes:
[0228] An attribute acquisition module is used to obtain attribute information of the above-mentioned fault node;
[0229] A comprehensive attribute acquisition module is used to obtain comprehensive attribute information corresponding to each of multiple preset candidate node clusters;
[0230] A cluster determination module, used to determine a preset candidate node cluster whose comprehensive attribute information matches the attribute information of the above-mentioned faulty node as the above-mentioned current candidate node cluster;
[0231] In an 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 matching the faulty node to obtain the replacement node.
[0233] In an exemplary embodiment, the comprehensive attribute acquisition module includes:
[0234] A battery acquisition unit, used to acquire a candidate node pool;
[0235] A preset cluster determining unit, configured to divide the candidate node pool into the plurality of preset candidate node clusters based on 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 an exemplary embodiment, the above-mentioned device is applied to a cloud data center, and the above-mentioned cloud data center includes multiple cloud node clusters, and the above-mentioned multiple cloud node clusters correspond to one candidate node cluster; the above-mentioned device also includes:
[0238] A cluster determination module, used to determine the candidate node cluster as the current candidate node cluster;
[0239] The candidate attribute acquisition module is used to obtain the attribute information of each candidate node in the above current candidate node cluster.
[0240] In an exemplary embodiment, the replacement node determination module includes:
[0241] An attribute acquisition unit, used to acquire attribute information of the above-mentioned fault node;
[0242] The replacement node determination unit is used to determine a candidate node in the current candidate node cluster whose attribute information matches the attribute information of the failed node as the replacement node.
[0243] In an exemplary embodiment, the above device further includes:
[0244] The jump module is used to re-use the above-mentioned current update cloud node cluster as the current cloud node cluster, and re-use the above-mentioned current update candidate node cluster as the current candidate node cluster, and jump to the above-mentioned step of obtaining the faulty node in the current cloud node cluster.
[0245] The device and method embodiments in the above-mentioned device embodiments are based on the same inventive concept.
[0246] An embodiment of the present specification provides an update device for a node cluster, the device comprising 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 a node cluster update method as provided in the above method embodiment.
[0247] An embodiment of the present application also provides a computer storage medium, which can be set in a terminal to store at least one instruction or at least one program related to a node cluster update method for implementing a 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] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes to implement the node cluster update method provided in the above method embodiment.
[0249] Optionally, in the embodiments of this specification, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0250] The memory described in the embodiments of this specification can be used to store software programs and modules, and 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, wherein the program storage area may store an operating system, application programs required for functions, etc.; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a 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 embodiment provided in the embodiments of this specification can be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Taking running on a server as an example, Fig.15 1 is a hardware structure block diagram of a server of a node cluster update method provided in an embodiment of this specification. Fig.15As shown, the server 1500 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1510 (the central processing unit 1510 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1530 for storing data, and one or more storage media 1520 (such as one or more mass storage devices) for storing application programs 1523 or data 1522. Among them, the memory 1530 and the storage medium 1520 can be short-term storage or permanent storage. The program stored in the storage medium 1520 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit 1510 can be configured to communicate with the storage medium 1520 and execute a series of instruction operations in the storage medium 1520 on the server 1500. The server 1500 may also include one or more power supplies 1560, one or more wired or wireless network interfaces 1550, one or more input and output interfaces 1540, and / or one or more operating systems 1521, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0252] The input / output interface 1540 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the server 1500. In one example, the input / output interface 1540 includes a network adapter (Network Interface Controller, NIC), which may be connected to other network devices via a base station so as to communicate with the Internet. In one example, the input / output interface 1540 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0253] It can be understood by those skilled in the art that Fig.15 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.15 More or fewer components as shown, or with Fig.15 Different configurations are shown.
[0254] It can be seen from the embodiments of the node cluster update method, device, equipment or storage medium provided by the present application that the present application obtains the node that fails in the current cloud node cluster to obtain the failed node; selects the candidate node that matches the failed node from the current candidate node cluster to obtain the replacement node; adds the replacement node to the current cloud node cluster, and deletes the failed node from the current cloud node cluster to obtain the current updated cloud node cluster; initializes the configuration information of the failed node to obtain the updated candidate node; adds 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 failed node in the current updated cloud node cluster. When the present application detects a failed node in the cloud node cluster, it promptly replaces it with a candidate node, avoids the data processing anomaly caused by the failed node, realizes the automated operation and maintenance of the nodes in the cluster, and improves the operation stability and efficiency of each node in the cloud node cluster; and after the configuration information of the failed node is initialized, it is added to the current candidate node cluster, which improves the utilization efficiency of the failed node and realizes the recycling of resources.
[0255] It should be noted that the above sequence of the embodiments of this specification is for description only and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of this specification. 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 an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0256] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0257] A person skilled in the art will appreciate that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0258] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for updating a node cluster, characterized in that: The method comprises: Get the faulty nodes in the current cloud node cluster; Select a candidate node that matches the failed node from the current candidate node cluster to obtain a replacement node; Adding the replacement node to the current cloud node cluster and deleting the failed node from the current cloud node cluster to obtain a current updated cloud node cluster; Initializing the configuration information of the faulty node to obtain an updated candidate node; The update candidate node is added to the current candidate node cluster to obtain a 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 selecting a candidate node matching the failed node from the current candidate node cluster to obtain a replacement node, the method further includes: Determine the fault type corresponding to the faulty node; Based on a preset fault handling strategy, determining whether there is a target handling strategy that matches the fault type; the preset fault handling strategy represents a corresponding relationship between the preset fault type and the preset handling strategy; The step of selecting a candidate node matching the failed node from the current candidate node cluster to obtain a replacement node includes: If there is no target processing strategy that matches the fault type, a candidate node that matches the faulty node is screened from the current candidate node cluster to obtain a replacement node.
3. The method according to claim 2, characterized in that The method further comprises: If there are multiple candidate processing strategies matching the fault type in the preset fault processing strategy, obtaining weight values corresponding to each of the multiple candidate processing strategies; Based on the weight values corresponding to 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 strategies other than the target processing strategy among the multiple candidate processing strategies; Sending a policy execution instruction to the faulty node, wherein the policy execution instruction carries 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 processing strategy corresponding to each preset fault type; For any preset fault type, if there are multiple preset processing strategies for the preset fault type, determine the weight values corresponding to each of the multiple preset processing strategies based on the number of historical fault repair times corresponding to the multiple preset processing strategies; The preset fault processing strategy is constructed based on the preset processing strategies corresponding to the multiple preset fault types and the weight value corresponding to each preset processing 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: Receiving a fault processing result sent by the fault node; Based on the fault processing result, re-determine the weight values corresponding to each of the multiple candidate processing strategies to obtain updated weight values corresponding to each of the multiple candidate processing strategies; The preset fault processing strategy is updated according to the update weight values corresponding to each of the multiple candidate processing strategies.
6. The method according to claim 5, characterized in that The re-determining the weight values corresponding to the plurality of candidate processing strategies based on the fault processing result 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: Filter out a to-be-processed strategy from a remaining processing strategy set as a current processing strategy; the remaining processing strategy set includes a plurality of the remaining processing strategies; Sending a current strategy execution instruction to the faulty node, wherein the current strategy execution instruction carries the current processing strategy; so that the faulty node executes the current processing strategy; Receiving a current fault processing result sent by the fault node; If the current fault processing result indicates that the fault is not repaired, remove the current processing strategy from the remaining processing strategy set to obtain a current remaining processing strategy set; Re-screen the current processing strategy from the current remaining processing strategy set; and repeat the step of sending the current strategy execution instruction to the faulty node until the current fault processing result indicates that the fault is not repaired, and remove the current processing strategy 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 comprises: If the current fault processing results corresponding to the remaining processing strategies in the remaining processing strategy set all indicate that the fault is not repaired, a candidate node matching the faulty node is screened from the current candidate node cluster to obtain a replacement node.
9. The method according to claim 1, characterized in that: Before selecting a candidate node matching the failed node from the current candidate node cluster to obtain a replacement node, the method further includes: Acquire attribute information of the faulty node; Obtain comprehensive attribute information corresponding to each of multiple preset candidate node clusters; Determine a preset candidate node cluster whose comprehensive attribute information matches the attribute information of the faulty node as the current candidate node cluster; The step of selecting a candidate node matching the failed node from the current candidate node cluster to obtain a replacement node includes: Any idle candidate node in the current candidate node cluster is determined as a candidate node matching the faulty node to obtain the replacement node.
10. The method according to claim 9, characterized in that The obtaining of comprehensive attribute information corresponding to each of the plurality of preset candidate node clusters includes: Get the candidate node pool; Based on the attribute information of each candidate node in the candidate node pool, dividing the candidate node pool into the plurality of preset candidate node clusters; 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.
11. The method according to claim 1, characterized in that: The method is applied to a cloud data center, the cloud data center includes multiple cloud node clusters, and the multiple cloud node clusters correspond to one candidate node cluster; Before selecting a candidate node matching the failed node from the current candidate node cluster to obtain a replacement node, the method further includes: Determine the candidate node cluster as the current candidate node cluster; Obtaining attribute information of each candidate node in the current candidate node cluster; The step of selecting a candidate node matching the failed node from the current candidate node cluster to obtain a replacement node includes: Acquire attribute information of the faulty node; A candidate node in the current candidate node cluster whose attribute information matches the attribute information of the failed node is determined as the replacement node.
12. The method according to any one of claims 1 to 11, characterized in that: After adding the update candidate node to the current candidate node cluster to obtain the current update candidate node cluster, the method further includes: The current updating cloud node cluster is re-used as the current cloud node cluster, and the current updating candidate node cluster is re-used as the current candidate node cluster, and the process proceeds to the step of obtaining the faulty node in the current cloud node cluster.
13. A node cluster update device, characterized in that: The device comprises: The fault node acquisition module is used to obtain the fault nodes in the current cloud node cluster; A replacement node determination module is used to select a candidate node matching the failed node from the current candidate node cluster to obtain a replacement node; A node replacement module, used to add the replacement node to the current cloud node cluster and delete the failed node from the current cloud node cluster to obtain a current updated cloud node cluster; An initialization module, used to initialize the configuration information of the faulty node to obtain an updated candidate node; The update module is used to add the update candidate node to the current candidate node cluster to obtain a 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.
14. An electronic device, characterized in that: The device includes: a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the node cluster update method as described in any one of claims 1-12.
15. A computer storage medium, characterized in that The computer storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the node cluster update method as described in any one of claims 1-12.
Citation Information
Patent Citations
Server cluster system and load balancing implementation method thereof
CN104283948A
Failure handling method and failure handling cluster in high availability system
CN107147540A
Node scheduling method and system for fault transfer of cluster storage system
CN107342905A
Channel reparation method and device and terminal
CN107707392A
Underground cable fault repairing method and device based on model selection
CN110837898A
Cited By
Database cluster management method, device, equipment and computer program product
CN120407544A
Matching method and device, electronic equipment, storage medium and program product
CN121125457A
