A management method, device, equipment and medium for a virtualized cluster
By enabling virtualization cluster nodes to collaboratively manage primary nodes based on statistical information, the method prevents split-brain scenarios and ensures data consistency and stability in virtualization clusters.
Patent Information
- Application Number
- CN202111138001.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-27
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2041-09-27
AI Technical Summary
The existing technology cannot effectively eliminate the occurrence of cluster split brains in virtualized clusters, especially when the communication link of the primary and secondary nodes is interrupted or the arbitration node is down, there are still problems of cluster splitting and data inconsistency.
The target nodes in the virtualized cluster obtain the operation information of all nodes, and determine the status changes of the master node based on the statistical information, including the silence of the backup node, upgrade, control instruction forwarding, node autonomy and communication prohibition, etc., to avoid the generation of multiple master nodes.
It effectively avoids the cluster split brain phenomenon in virtualized clusters, ensures the normal operation of computing nodes and data consistency, does not rely on a single arbitration node and is not restricted by network status.
Smart Images

Figure CN113961402B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of servers, and particularly to a management method, device, equipment and medium for a virtualized cluster. Background Art
[0002] In a virtualized cluster, in order to ensure the availability of the cluster system, it is usually necessary to specify at least two or more servers in the virtualized cluster as management nodes. Among them, one management node is the primary node, and the other management nodes are standby nodes. When the primary node is running normally, key information such as databases in the virtualized cluster will be synchronously replicated from the primary node to the standby nodes in real time. If the primary node encounters an abnormality or failure and cannot provide relevant services to other computing nodes in the virtualized cluster, the standby node will be upgraded to the primary node and manage the computing nodes in the virtualized cluster. When both the primary node and the standby node in the virtualized cluster are alive and can communicate with each other, the primary node will notify the standby node to remain in a silent state. However, if the communication link between the primary node and the standby node is interrupted, since the standby node cannot determine whether the primary node is alive, the standby node may be wrongly upgraded to the primary node, and in this case, a phenomenon of cluster split-brain may occur.
[0003] In the prior art, in order to avoid the occurrence of cluster split-brain, usually an arbitration node is added to the virtualized cluster or a management module is added to each computing node in the virtualized cluster. Please refer to Figure 1 and Figure 2 , Figure 1 a topological schematic diagram when an arbitration node is added to the virtualized cluster; Figure 2 a topological schematic diagram when a management module is added to each computing node in the virtualized cluster.
[0004] In the first solution, an arbitration node is used to monitor the primary and standby nodes in the virtualization cluster. That is, if the arbitration node detects that the primary node has an abnormality, the arbitration node will notify the standby node to be upgraded to the primary node. However, in this solution, if the arbitration node crashes or the communication connection with the primary and standby nodes is interrupted, the problem of cluster split-brain will still occur. In the second solution, a management module is added to each computing node in the virtualization cluster. Among them, only the management module on one computing node is active, while the management modules on other computing nodes are silent. The active management module needs to synchronize key information such as the database in the virtualization cluster to all silent management modules. However, the data synchronization algorithm of this solution is very complex, and when the network state of the virtualization cluster is poor, not only will the computing nodes inside have inconsistent stored data, but also the virtualization cluster may be split into multiple independent small clusters, and each small cluster will elect a new management node, so there will still be the problem of cluster split-brain.
[0005] In summary, although the cluster management methods in the prior art can avoid the phenomenon of cluster split-brain to a certain extent, they cannot effectively prevent the occurrence of cluster split-brain in the virtualization cluster, and this problem urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] In view of this, the purpose of the present invention is to provide a management method, device, equipment and medium for a virtualization cluster to effectively prevent the occurrence of cluster split-brain in the virtualization cluster. The specific solutions are as follows:
[0007] A management method for a virtualization cluster, which is applied to a target node in the virtualization cluster; includes:
[0008] Obtain the operation information of all nodes in the virtualization cluster to obtain statistical information;
[0009] When it is determined according to the statistical information that the primary node in the virtualization cluster is running normally, notify the standby node in the virtualization cluster to remain in a silent state;
[0010] When it is determined according to the statistical information that the primary node has crashed, notify a standby node in the virtualization cluster to be upgraded to the current primary node of the virtualization cluster;
[0011] When it is determined according to the statistical information that the communication connection between the first node and the primary node is interrupted, notify the nodes that maintain a communication connection with the primary node to forward the control instructions of the primary node to the first node, so that the primary node can control the first node;
[0012] When it is determined according to the statistical information that both the primary node and the standby node are down, control is performed on the target node itself;
[0013] When it is determined according to the statistical information that the communication connections between the second node and the primary node and with some nodes in the virtualization cluster are all interrupted, the standby node in the virtualization cluster is notified to prohibit establishing a communication connection with the second node.
[0014] Preferably, the virtualization cluster is specifically a one-primary-one-standby or one-primary-multi-standby computing cluster.
[0015] Preferably, after the process of notifying the standby node in the virtualization cluster to prohibit establishing a communication connection with the second node, it further includes:
[0016] Mark the second node.
[0017] Preferably, it further includes:
[0018] When the second node restarts successfully, the primary node is notified to re-control the second node.
[0019] Preferably, after the process of controlling the target node itself, it further includes:
[0020] When the primary node returns to normal, it resumes control by the primary node.
[0021] Preferably, after the process of notifying a standby node in the virtualization cluster to be upgraded to the current primary node of the virtualization cluster, it further includes:
[0022] When the primary node returns to normal, the current primary node is notified to demote the primary node to a standby node of the virtualization cluster.
[0023] Correspondingly, the present invention also discloses a management device for a virtualization cluster, which is applied to a target node in the virtualization cluster; including:
[0024] An information statistics module, configured to obtain the running information of all nodes in the virtualization cluster to obtain statistical information;
[0025] A status notification module, configured to notify the standby node in the virtualization cluster to maintain a silent state when it is determined according to the statistical information that the primary node in the virtualization cluster is running normally;
[0026] A node upgrade module, configured to notify a standby node in the virtualization cluster to be upgraded to the current primary node of the virtualization cluster when it is determined according to the statistical information that the primary node is down;
[0027] An information forwarding module, configured to, when it is determined according to the statistical information that the communication connection between the first node and the master node is interrupted, notify the nodes that maintain a communication connection with the master node to forward the control instructions of the master node to the first node, so that the master node controls the first node;
[0028] A node control module, configured to, when it is determined according to the statistical information that both the master node and the standby node are down, control the target node itself;
[0029] A communication prohibition module, configured to, when it is determined according to the statistical information that the communication connections between the second node and the master node and with some nodes in the virtualization cluster are both interrupted, notify the standby nodes in the virtualization cluster to prohibit establishing a communication connection with the second node.
[0030] Correspondingly, the present invention also discloses a management device for a virtualization cluster, including:
[0031] A memory, configured to store a computer program;
[0032] A processor, configured to implement the steps of a management method for a virtualization cluster as disclosed above when executing the computer program.
[0033] Correspondingly, the present invention also discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of a management method for a virtualization cluster as disclosed above are implemented.
[0034] In the present invention, first, the target node in the virtualized cluster obtains the running information of all nodes in the virtualized cluster to obtain the statistical information of all nodes in the virtualized cluster; when it is determined according to the statistical information that the master node in the virtualized cluster is running normally, the target node will notify the standby nodes in the virtualized cluster to remain in a silent state; when it is determined according to the statistical information that the master node has crashed, the target node will notify a standby node in the virtualized cluster to be upgraded to the current master node of the virtualized cluster; when it is determined according to the statistical information that the communication connection between the first node in the virtualized cluster and the master node is interrupted, the target node will notify the nodes that maintain a communication connection with the master node to forward the control instructions of the master node to the first node, so that the master node can control the first node; when it is determined according to the statistical information that both the master node and the standby nodes are in a crashed state, the target node will control itself, thus forming an autonomous state of the computing nodes; when it is determined according to the statistical information that the communication connections between the second node in the virtualized cluster and the master node and some nodes in the virtualized cluster are both interrupted, the target node will notify the standby nodes in the virtualized cluster to prohibit establishing a communication connection with the second node, thereby avoiding the generation of multiple master nodes in the virtualized cluster. Compared with the prior art, since this method determines the master node in the virtualized cluster through negotiation among all computing nodes in the virtualized cluster, it does not need to rely on a single arbitration node in the virtualized cluster, and moreover, this method is not limited by the network state in the virtualized cluster to correctly manage each computing node in the virtualized cluster. Therefore, through this method, the phenomenon of cluster split-brain in the virtualized cluster can be effectively avoided. Correspondingly, a management device, equipment, and medium for a virtualized cluster provided by the present invention also have the above beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.
[0036] Figure 1 Topological schematic diagram when adding an arbitration node to the virtualized cluster;
[0037] Figure 2 Topological schematic diagram when adding a management module to each computing node in the virtualized cluster;
[0038] Figure 3 Flowchart of a management method for a virtualized cluster provided by an embodiment of the present invention;
[0039] Figure 4A topological schematic diagram of a virtualization cluster provided by an embodiment of the present invention;
[0040] Figure 5 A schematic diagram showing that some nodes in the virtualization cluster provided by an embodiment of the present invention cannot establish communication connections with the master node and other nodes;
[0041] Figure 6 A structural diagram of a management device for a virtualization cluster provided by an embodiment of the present invention;
[0042] Figure 7 A structural diagram of a management device for a virtualization cluster provided by an embodiment of the present invention. Detailed implementation manners
[0043] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0044] Please refer to Figure 3 , Figure 3 A flowchart of a management method for a virtualization cluster provided by an embodiment of the present invention. The method includes:
[0045] Step S11: Obtain the running information of all nodes in the virtualization cluster to obtain statistical information;
[0046] Step S12: When it is determined according to the statistical information that the master node in the virtualization cluster is running normally, notify the standby nodes in the virtualization cluster to maintain a silent state;
[0047] Step S13: When it is determined according to the statistical information that the master node has crashed, notify a standby node in the virtualization cluster to be upgraded to the current master node of the virtualization cluster;
[0048] Step S14: When it is determined according to the statistical information that the communication connection between the first node and the master node is interrupted, notify the nodes that maintain a communication connection with the master node to forward the control instructions of the master node to the first node, so that the master node can control the first node;
[0049] Step S15: When it is determined according to the statistical information that both the master node and the standby node have crashed, control the target node itself;
[0050] Step S16: When it is determined according to the statistical information that the communication connections between the second node and the master node and between the second node and some nodes in the virtualization cluster are both interrupted, notify the standby nodes in the virtualization cluster to prohibit establishing communication connections with the second node.
[0051] In this embodiment, a method for managing a virtualized cluster is provided. By using this method to manage the virtualized cluster, the phenomenon of split-brain in the virtualized cluster can be effectively avoided. In this management method, the target node in the virtualized cluster is used as the execution subject for description. Among them, the target node refers to any node in the virtualized cluster.
[0052] Please refer to Figure 4 , Figure 4 , which is a topological schematic diagram of a virtualized cluster provided by an embodiment of the present invention. In this method, the target node first obtains the running information of all nodes in the virtualized cluster to obtain statistical information, and then judges the running status of the primary and standby nodes and the running status of each computing node in the virtualized cluster according to the statistical information.
[0053] If the target node determines according to the statistical information that the primary node in the virtualized cluster is running normally, the target node will notify the standby node in the virtualized cluster to remain in a silent state. That is, the primary node will synchronize key information such as the database in the virtualized cluster to the standby node in the virtualized cluster in real time, and will manage all computing nodes in the virtualized cluster.
[0054] If the target node determines according to the statistical information that all computing nodes in the virtualized cluster cannot establish a communication connection with the primary node in the virtualized cluster, it means that the primary node in the virtualized cluster has crashed. In this case, the target node will notify a standby node in the virtualized cluster to be upgraded to the current primary node in the virtualized cluster. At this time, all computing nodes in the virtualized cluster will be managed by the current primary node in the virtualized cluster.
[0055] If the target node determines according to the statistical information that the communication connection between the first node and the primary node in the virtualized cluster is interrupted, and the first node can still communicate with other computing nodes in the virtualized cluster, in order to enable the primary node in the virtualized cluster to control the first node, the target node will notify the node that maintains a communication connection with the primary node to forward the control instruction sent by the primary node to the first node.
[0056] That is, when there is a node in the virtualized cluster that cannot establish a communication connection with the master node, the nodes in the virtualized cluster that can establish a communication connection with the master node will become the information transfer stations between the master node and the nodes in the virtualized cluster that cannot establish a communication connection with the master node. It can be conceived that through such a setting method, the nodes that cannot establish a communication connection with the master node can still receive the control instructions sent by the master node and accept the management and control of the master node. It should be noted that in actual applications, the first node can be either a computing node in the virtualized cluster that cannot establish a communication connection with the master node or multiple computing nodes in the virtualized cluster that cannot establish a communication connection with the master node.
[0057] If the target node determines based on the statistical information that all computing nodes in the virtualized cluster can neither establish a communication connection with the master node nor establish a communication connection with the standby node, it means that both the master node and the standby node in the virtualized cluster are in a down state. In this case, to avoid the occurrence of split-brain in the virtualized cluster, the target node will then control itself, so that all computing nodes in the virtualized cluster can enter the autonomous state, ensure the normal operation of the virtual machines on each computing node, and at the same time wait for the recovery of the master node in the virtualized cluster.
[0058] If the target node determines based on the statistical information that the second node in the virtualized cluster can neither establish a communication connection with the master node nor establish a communication connection with some nodes in the virtualized cluster to form an island, the second node will enter the maintenance state and shut down the virtual machines running on it. And, to avoid the occurrence of split-brain in the virtualized cluster, the target node will notify the standby node in the virtualized cluster not to establish a communication connection with the second node, that is, the second node cannot select the standby node in the virtualized cluster to become the master node, so as to avoid the generation of two master nodes in the virtualized cluster.
[0059] Please refer to Figure 5 , Figure 5 which is a schematic diagram of some nodes in the virtualized cluster provided by the embodiment of the present invention that cannot establish a communication connection with the master node and other nodes. In Figure 5 , computing node 1, computing node 2, computing node 3, computing node 4, computing node 5, computing node 6, computing node 7, and computing node 8 are all nodes in the virtualized cluster. Among them, the four nodes of computing node 5, computing node 6, computing node 7, and computing node 8 can neither establish a communication connection with the master node in the virtualized cluster nor establish a communication connection with computing node 1, computing node 2, computing node 3, and computing node 4 in the virtualized cluster.
[0060] When the above-mentioned situation occurs, since the computing nodes 1, 2, 3, and 4 in the virtualization cluster can establish communication connections with the master node, the virtual machines on these 4 nodes can run normally. And the computing nodes 5, 6, 7, and 8 in the virtualization cluster must enter the maintenance state and cannot choose a standby node in the virtualization cluster to become the master node to prevent the phenomenon of cluster split-brain in the virtualization cluster.
[0061] It can be understood that since this method determines the master node in the virtualization cluster through negotiation among all computing nodes in the virtualization cluster, it does not need to rely on a single arbitration node in the virtualization cluster. Moreover, this method is not limited by the network state in the virtualization cluster to correctly manage each computing node in the virtualization cluster. Therefore, through this method, the phenomenon of cluster split-brain in the virtualization cluster can be effectively avoided.
[0062] In this embodiment, first, the target node in the virtualization cluster obtains the running information of all nodes in the virtualization cluster to obtain the statistical information of all nodes in the virtualization cluster; if it is determined according to the statistical information that the master node in the virtualization cluster is running normally, the target node will notify the standby nodes in the virtualization cluster to remain in a silent state; if it is determined according to the statistical information that the master node has crashed, the target node will notify a standby node in the virtualization cluster to be upgraded to the current master node of the virtualization cluster; if it is determined according to the statistical information that the communication connection between the first node in the virtualization cluster and the master node is interrupted, the target node will notify the nodes that maintain communication connections with the master node to forward the control instructions of the master node to the first node, so that the master node can control the first node; if it is determined according to the statistical information that both the master node and the standby nodes are in a crashed state, the target node will control itself to form an autonomous state of the computing nodes; if it is determined according to the statistical information that the communication connections between the second node in the virtualization cluster and the master node and with some nodes in the virtualization cluster are both interrupted, the target node will notify the standby nodes in the virtualization cluster to prohibit establishing communication connections with the second node, thus avoiding the generation of multiple master nodes in the virtualization cluster. Compared with the prior art, since this method determines the master node in the virtualization cluster through negotiation among all computing nodes in the virtualization cluster, it does not need to rely on a single arbitration node in the virtualization cluster. Moreover, this method is not limited by the network state in the virtualization cluster to correctly manage each computing node in the virtualization cluster. Therefore, through this method, the phenomenon of cluster split-brain in the virtualization cluster can be effectively avoided.
[0063] Based on the above embodiment, this embodiment further describes and optimizes the technical solution. As a preferred implementation manner, the virtualization cluster is specifically a one-master-one-standby or one-master-multi-standby computing cluster.
[0064] In this embodiment, the virtualized cluster can be set as a computing cluster with one master and one standby, or can be set as a computing cluster with one master and multiple standbys. That is, in practical applications, one master node and one standby node can be set in the virtualized cluster, or one master node and multiple standby nodes can be set in the virtualized cluster.
[0065] Obviously, through the technical solution provided in this embodiment, the application scope of the management method provided in this application can be broadened.
[0066] Based on the above embodiment, this embodiment further describes and optimizes the technical solution. As a preferred implementation manner, after the step of notifying the standby node in the virtualized cluster to prohibit establishing a communication connection with the second node, the following steps are further included:
[0067] Mark the second node.
[0068] It can be imagined that if the target node in the virtualized cluster determines according to the statistical information that the second node can neither establish a communication connection with the master node nor establish a communication connection with some nodes in the virtualized cluster, it indicates that the network of the second node in the virtualized cluster has an abnormality or a fault. In this case, the second node can be marked so that the maintenance personnel can quickly find the node with the abnormality or the fault from the virtualized cluster.
[0069] As a preferred implementation manner, the above management method further includes:
[0070] When the second node restarts successfully, notify the master node to control the second node again.
[0071] It can be understood that when the second node in the virtualized cluster can neither establish a communication connection with the master node nor establish a communication connection with some nodes in the virtualized cluster, the second node will enter the maintenance state and will perform a self-restart. If the second node restarts successfully, the second node will re-establish a communication connection with the master node in the virtualized cluster. At this time, the master node will control the second node again and ensure the availability of the second node.
[0072] Based on the above embodiment, this embodiment further describes and optimizes the technical solution. As a preferred implementation manner, after the step of controlling the target node itself, the following steps are further included:
[0073] When the master node returns to normal, it will be controlled by the master node again.
[0074] In practical applications, when both the primary node and the standby node in a virtualization cluster are down, all computing nodes in the virtualization cluster will enter an autonomous state to ensure the normal operation of virtual machines on each computing node. If, after maintenance by maintenance personnel or self-adjustment of the primary node, the primary node in the virtualization cluster resumes normal operation, all computing nodes in the virtualization cluster will then re-establish a communication connection with the primary node and resume being controlled by the primary node.
[0075] Obviously, through the technical solution provided in this embodiment, the normal and stable operation of the virtualization cluster can be ensured.
[0076] Based on the above embodiment, this embodiment further describes and optimizes the technical solution. As a preferred implementation, after the process of notifying a standby node in the virtualization cluster to be upgraded to the current primary node of the virtualization cluster in the above step, it further includes:
[0077] When the primary node resumes normal operation, notify the current primary node to downgrade the primary node to a standby node of the virtualization cluster.
[0078] It can be understood that when the primary node in the virtualization cluster fails, to ensure the normal operation of the virtualization cluster, the target node will notify a standby node in the virtualization cluster to be upgraded to the current primary node in the virtualization cluster. If, after a period of time, the original primary node in the virtualization cluster recovers from the down state to the normal state and attempts to continue taking over each computing node in the virtualization cluster.
[0079] In this case, to avoid the phenomenon of split-brain in the virtualization cluster, the target node will reject the management of the original primary node in the virtualization cluster. At the same time, it will notify the current primary node in the virtualization cluster to downgrade the original primary node to a standby node, keep it in a silent state, and accept data synchronization from the current primary node.
[0080] Obviously, through the technical solution provided in this embodiment, the overall reliability of the virtualization cluster during operation can be further ensured.
[0081] Please refer to Figure 6 , Figure 6 which is a structural diagram of a management device for a virtualization cluster provided by an embodiment of the present invention. The device includes:
[0082] An information statistics module 21, configured to obtain the operation information of all nodes in the virtualization cluster to obtain statistical information;
[0083] A status notification module 22, configured to notify the standby nodes in the virtualization cluster to remain in a silent state when it is determined according to the statistical information that the primary node in the virtualization cluster is operating normally;
[0084] The node upgrade module 23 is used to notify a standby node in the virtualization cluster to be upgraded to the current master node of the virtualization cluster when it is determined according to the statistical information that the master node has crashed;
[0085] The information forwarding module 24 is used to notify the nodes that maintain communication connections with the master node to forward the control instructions of the master node to the first node when it is determined according to the statistical information that the communication connection between the first node and the master node is interrupted, so that the master node can control the first node;
[0086] The node control module 25 is used to control the target node itself when it is determined according to the statistical information that both the master node and the standby node have crashed;
[0087] The communication prohibition module 26 is used to notify the standby nodes in the virtualization cluster to prohibit establishing communication connections with the second node when it is determined according to the statistical information that the communication connections between the second node and the master node and some nodes in the virtualization cluster are both interrupted.
[0088] The management device of a virtualization cluster provided by an embodiment of the present invention has the beneficial effects of the management method of a virtualization cluster disclosed above.
[0089] Please refer to Figure 7 , Figure 7 which is the structural diagram of a management device of a virtualization cluster provided by an embodiment of the present invention. The device includes:
[0090] A memory 31 for storing computer programs;
[0091] A processor 32 for implementing the steps of the management method of a virtualization cluster as disclosed above when executing the computer program.
[0092] The management device of a virtualization cluster provided by an embodiment of the present invention has the beneficial effects of the management method of a virtualization cluster disclosed above.
[0093] Correspondingly, an embodiment of the present invention also discloses a computer-readable storage medium. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the management method of a virtualization cluster as disclosed above are implemented.
[0094] The computer-readable storage medium provided by an embodiment of the present invention has the beneficial effects of the management method of a virtualization cluster disclosed above.
[0095] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method section.
[0096] Finally, it should also be noted that in this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent in such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
[0097] The above has introduced in detail a method, device, equipment and medium for managing a virtualized cluster provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A management method for a virtualized cluster, characterized in that, Applied to a target node in a virtualization cluster, where the target node is any node in the virtualization cluster; including: Obtain the running information of all nodes in the virtualization cluster to obtain statistical information; When it is determined according to the statistical information that the master node in the virtualization cluster is running normally, notify the standby nodes in the virtualization cluster to remain in a silent state; When it is determined according to the statistical information that the master node has crashed, notify a standby node in the virtualization cluster to be upgraded to the current master node of the virtualization cluster; When it is determined according to the statistical information that the communication connection between the first node and the master node is interrupted, notify the nodes that maintain a communication connection with the master node to forward the control instructions of the master node to the first node, so that the master node can control the first node; the first node is one or more computing nodes in the virtualization cluster that cannot establish a communication connection with the master node; When it is determined according to the statistical information that both the master node and the standby nodes have crashed, control the target node itself; When it is determined according to the statistical information that the communication connections between the second node and the master node and between the second node and some nodes in the virtualization cluster are both interrupted, notify the standby nodes in the virtualization cluster to prohibit establishing a communication connection with the second node and shut down the virtual machines running on the second node, so that the second node cannot select the standby nodes in the virtualization cluster to become the master node.
2. The management method according to claim 1, characterized in that The virtualization cluster is specifically a one-master-one-standby or one-master-multi-standby computing cluster.
3. The management method according to claim 1, wherein After the process of notifying the standby nodes in the virtualization cluster to prohibit establishing a communication connection with the second node, it further includes: Mark the second node.
4. The management method according to claim 3, characterized in that, It further includes: When the second node restarts successfully, notify the master node to control the second node again.
5. The management method according to claim 1, characterized in that, After the process of controlling the target node itself, it further includes: When the master node returns to normal, resume being controlled by the master node.
6. The management method according to any one of claims 1 to 5, characterized in that After the process of notifying a standby node in the virtualization cluster to be upgraded to the current master node of the virtualization cluster, it further includes: When the master node returns to normal, notify the current master node to demote the master node to a standby node of the virtualization cluster.
7. A management device for a virtualized cluster, characterized in that, Applied to a target node in a virtualization cluster, where the target node is any node in the virtualization cluster; including: An information statistics module, configured to obtain the running information of all nodes in the virtualization cluster to obtain statistical information; A status notification module, configured to, when it is determined according to the statistical information that the master node in the virtualization cluster is running normally, notify the standby nodes in the virtualization cluster to remain in a silent state; A node upgrade module, configured to, when it is determined according to the statistical information that the master node has crashed, notify a standby node in the virtualization cluster to be upgraded to the current master node of the virtualization cluster; An information forwarding module, configured to, when it is determined according to the statistical information that the communication connection between the first node and the master node is interrupted, notify the node that maintains a communication connection with the master node to forward the control instruction of the master node to the first node, so that the master node controls the first node; the first node is one computing node or multiple computing nodes in the virtualization cluster that cannot establish a communication connection with the master node; A node control module, configured to, when it is determined according to the statistical information that both the master node and the standby node are down, control the target node itself; A communication prohibition module, configured to, when it is determined according to the statistical information that the communication connections between the second node and the master node and between the second node and some nodes in the virtualization cluster are both interrupted, notify the standby node in the virtualization cluster to prohibit establishing a communication connection with the second node, and shut down the virtual machines running on the second node, so that the second node cannot select the standby node in the virtualization cluster to become the master node.
8. A management device for a virtualized cluster, characterized in that, Comprising: A memory, configured to store a computer program; A processor, configured to implement the steps of a management method for a virtualization cluster according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of a management method for a virtualization cluster according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Master-slave node switching method and device
CN112367198A