A virtual cluster startup control method, system, device and storage medium

CN115185645BActive Publication Date: 2026-09-11INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210913017.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-31
Publication Date
2026-09-11
Estimated Expiration
2042-07-31

AI Technical Summary

Technical Problem

而集群中一个重点为防脑裂,一般做法都为通过仲裁来判断业务要启动的节点,防止多端同时启动,导致数据不一致,而且,需要单独的仲裁设备

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115185645B_ABST
    Figure CN115185645B_ABST
Patent Text Reader

Abstract

The application provides a virtual cluster starting control method, system, storage medium and equipment, the method comprises the following steps: obtaining the number of virtual clusters contained in the whole physical cluster, the network isolation between the virtual clusters, wherein only one virtual machine in the same virtual cluster is started on the physical machine; the heartbeat link of the physical cluster is virtualized into the heartbeat link of the virtual cluster based on the heartbeat link of the physical cluster, the state of the physical cluster heartbeat link is consistent with the state of the virtual heartbeat link; the virtual node on the physical machine communicates with all physical machines in the cluster where the physical machine is located and the virtual machine node on the corresponding physical machine. The application determines whether to start the cluster and take over the resources by the state of each node when the virtual node starts, does not need a separate arbitration device, when the virtual machine already contains the cluster machine business configuration information, the state of the virtual machine when starting is determined by relying on the state of the physical cluster, so as to determine whether to take over the resources and start the business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and specifically to a virtual cluster startup control method, system, device, and storage medium. Background Technology

[0002] In the control of virtual cluster startup, a virtual cluster refers to an independent cluster created on top of a physical cluster through virtual containers or virtualization, which can independently provide services, such as a NAS AP cluster system. A key aspect of cluster control is preventing split-brain scenarios. Common practice is to use arbitration to determine which node should start the service, preventing multiple endpoints from starting simultaneously and causing data inconsistency. Furthermore, a separate arbitration device is required. Summary of the Invention

[0003] In view of this, the purpose of this invention is to propose an improved virtual cluster startup control method, system, storage medium and device, which does not require a separate arbitration device. When the virtual machine already contains cluster machine service configuration information, the startup state will depend on the physical cluster state to determine the virtual machine startup state, thereby determining whether to take over resources and start services.

[0004] To achieve the above objectives, in one respect, the present invention provides a virtual cluster startup control method, wherein the method includes the following steps:

[0005] Get the number of virtual clusters contained in the entire physical cluster. The virtual clusters are isolated from each other by network. Within the same virtual cluster, only one virtual machine is started on the physical machine.

[0006] The heartbeat links within the physical cluster are virtualized into virtual cluster heartbeat links, and the heartbeat link status of the physical cluster is consistent with the virtual heartbeat link status.

[0007] Virtual nodes on physical machines communicate with all physical machines in the cluster where the physical machine resides, as well as the virtual nodes on the corresponding physical machines.

[0008] As a further aspect of the present invention, if the physical machine is not in the cluster, the network will be isolated, and the virtual nodes on the physical machine will not be able to communicate with the other physical nodes and the virtual nodes of the other physical nodes.

[0009] As a further aspect of the present invention, virtual machines and physical machines communicate with each other via a heartbeat link, wherein the message communication is used to obtain basic operating information.

[0010] As a further aspect of the present invention, the virtual cluster startup control method further includes:

[0011] After the virtual machine starts, it first checks if a cluster configuration exists. If no cluster configuration exists, it waits to be added to the cluster or to rebuild the cluster. If a cluster configuration exists, it first checks if the physical node is online in the cluster. If it is not online, it waits and does not start the cluster. If the current physical node is online, it starts the cluster.

[0012] As a further aspect of the present invention, when other physical nodes are online at the same time, if only the current node virtual machine is started, the cluster is started; if other node virtual machines are started, it is first determined whether the heartbeat between the virtual machines is connected.

[0013] If connectivity exists, start the cluster; otherwise, check if the heartbeat connection with the physical node is established.

[0014] If all nodes are connected, it means the link is normal. Other nodes are either in the startup or stuck phase. Start the cluster. Otherwise, restart and check the status until the status is correct before starting the cluster.

[0015] As a further aspect of the present invention, if only the current node is started after the cluster is started and the heartbeat of other nodes is not connected, the heartbeat of the corresponding physical node is connected to query the virtual machine status. If it can be found, it means that there is a problem inside the virtual machine. The virtual machine is restarted and all resources are started. If it cannot be found, the resources are taken over directly.

[0016] As a further aspect of the present invention, if the heartbeat of the corresponding physical node cannot be connected, it is determined whether the current physical node is a configured node. If so, all resources are taken over; if it is not a configured node, the current virtual machine is restarted and the startup process is re-entered.

[0017] As a further embodiment of the present invention, if there are nodes with heartbeat communication, they are added to the cluster, and resources are started on the corresponding nodes according to the preset node priority.

[0018] As a further aspect of the present invention, the virtual cluster startup control method further includes:

[0019] At startup, it first determines whether the single-node startup condition is met. After starting the cluster, it then determines the status of each virtual machine node to decide whether to take over resources to provide services.

[0020] Another aspect of the present invention provides a virtual cluster startup control system, comprising:

[0021] The virtual cluster configuration module is used to obtain the number of virtual clusters contained in the entire physical cluster. The virtual clusters are isolated from each other by network. Within the same virtual cluster, only one virtual machine is started on the physical machine.

[0022] The virtualization module is used to virtualize the heartbeat links within the physical cluster into the heartbeat links of the virtual cluster. The heartbeat link status of the physical cluster is consistent with the virtual heartbeat link status.

[0023] The node communication module is used for communication between virtual nodes on physical machines and all physical machines in the cluster where the physical machine is located, as well as the virtual nodes on the corresponding physical machines.

[0024] In another aspect, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, performs any of the virtual cluster startup control methods according to the present invention.

[0025] In another aspect, the present invention provides a computer-readable storage medium storing computer program instructions that, when executed, implement any of the virtual cluster startup control methods according to the present invention.

[0026] The present invention has at least the following beneficial technical effects:

[0027] This invention proposes a virtual cluster startup control method, system, storage medium, and device. It determines whether to start the cluster and take over resources by the status of each node when the virtual node starts, without the need for a separate arbitration device. When the virtual machine already contains cluster machine service configuration information, it will rely on the status of the physical cluster to determine the status of the virtual machine at startup, thereby determining whether to take over resources and start services.

[0028] In addition, the virtual cluster startup control method first determines whether it meets the single-node startup criteria. After the cluster starts, it assesses the status of each virtual machine node to decide whether to take over resources to provide services. By judging the current physical node, the heartbeat connectivity status with each physical node, and the heartbeat status between virtual nodes, it ultimately determines the node that will start the service resources, providing a solution for cluster startup without arbitration.

[0029] These or other aspects of this application will become more apparent from the following description of embodiments. It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the application. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.

[0031] In the diagram:

[0032] Figure 1 A flowchart illustrating an embodiment of the virtual cluster startup control method according to the present invention is shown;

[0033] Figure 2 A schematic block diagram of an embodiment of the virtual cluster startup control system according to the present invention is shown;

[0034] Figure 3 A schematic diagram of the hardware structure of a computer device for implementing a virtual cluster startup control method according to the present invention is shown;

[0035] Figure 4 A schematic diagram of an embodiment of a computer-readable storage medium for implementing a virtual cluster startup control method according to the present invention is shown; Detailed Implementation

[0036] The present application will now be further described in conjunction with the accompanying drawings and specific embodiments. It should be noted that, without conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments.

[0037] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this application.

[0038] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two different entities or different parameters with the same name. Therefore, "first" and "second" are merely for convenience of expression and should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such as other steps or units inherent in a process, method, system, product, or device that includes a series of steps or units.

[0039] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0040] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0041] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0042] The common practice for preventing split-brain in a cluster is to use arbitration to determine which node the service should start, preventing multiple devices from starting simultaneously and causing data inconsistency. In addition, a separate arbitration device is required.

[0043] Therefore, this invention proposes an improved virtual cluster startup control method, system, storage medium, and device. It eliminates the need for a separate arbitration device. When the virtual machine already contains cluster machine service configuration information, the startup state depends on the physical cluster state to determine whether to take over resources and start the service.

[0044] See Figure 1 As shown, an embodiment of the present invention provides a virtual cluster startup control method, wherein the method includes the following steps S10-S30;

[0045] Step S10: Obtain the number of virtual clusters contained in the entire physical cluster. The virtual clusters are isolated from each other by network. In the same virtual cluster, only one virtual machine is started on the physical machine.

[0046] Step S20: Virtualize the heartbeat link within the physical cluster into a virtual cluster heartbeat link, and the heartbeat link status of the physical cluster is consistent with the virtual heartbeat link status.

[0047] Step S30: The virtual nodes on the physical machine communicate with all physical machines in the cluster where the physical machine is located, as well as the virtual nodes on the corresponding physical machines.

[0048] In some embodiments, if a physical machine is not in the cluster, the network is isolated, and the virtual nodes on that physical machine cannot communicate with the other physical nodes and the virtual nodes of the other physical nodes.

[0049] In this embodiment of the invention, only one virtual machine in the same virtual cluster is started on the physical machine, but the entire physical cluster can contain multiple virtual clusters, and the networks between the virtual clusters are isolated. In this embodiment, the heartbeat link within the physical cluster is used to virtualize the heartbeat link of the virtual cluster, ensuring that the heartbeat link status of the physical cluster is consistent with the virtual heartbeat link status. Therefore, the virtual nodes on the physical machine can communicate with all physical machines in the cluster where the physical machine is located, as well as the virtual machine nodes on the corresponding physical machines. If the physical machine is not in the cluster, the network will be isolated, and its virtual nodes will not be able to communicate with other physical nodes or their virtual nodes.

[0050] In some embodiments of the present invention, virtual machines and physical machines communicate with each other via a heartbeat link, wherein the message communication is used to obtain basic operating information.

[0051] In this embodiment, the basic operational information obtained can be CPU pressure, network traffic, virtual machines existing on the physical machine, etc.

[0052] In some embodiments, after the virtual machine starts, it first checks whether a cluster configuration exists. If not, it waits to be added to the cluster or to rebuild the cluster. If a cluster configuration exists, it first determines whether the physical nodes are online in the cluster. If not, it waits without starting the cluster.

[0053] If only the current physical node is online, then start the cluster. If other physical nodes are online simultaneously, and only the current node's virtual machine is running, then start the cluster; if other node virtual machines are running, first check if the heartbeat connection with the other virtual machines is working. If it is, then start the cluster; otherwise, check if the heartbeat connection with the physical nodes is working. If both are working, the link is normal, and the other node virtual machines are either starting up or stuck, then start the cluster. Otherwise, restart and check the status; only start the cluster if the status is satisfactory.

[0054] In some embodiments, after starting the cluster, if only the current node starts and cannot communicate with the heartbeats of other nodes, the heartbeat of the corresponding physical node is used to query the virtual machine status. If the status can be found, it indicates that there is a problem inside the virtual machine. The virtual machine is restarted and all resources are started. If the status cannot be found, the resources are taken over directly.

[0055] If the heartbeat of the corresponding physical node fails to connect, determine whether the current physical node is a configured node. If it is, take over all resources; otherwise, restart the current virtual machine and re-enter the startup process. If a node with a working heartbeat exists, add it to the cluster, and start resources on the corresponding node according to the preset node priority.

[0056] In some embodiments of the present invention, the virtual cluster startup control method further includes:

[0057] At startup, it first determines whether the single-node startup condition is met. After starting the cluster, it then determines the status of each virtual machine node to decide whether to take over resources to provide services.

[0058] In this embodiment of the invention, the control method for starting the virtual cluster is mainly to determine the node for starting the business resources by judging the current physical node, the heartbeat connectivity status with each physical node, and the heartbeat status between virtual nodes.

[0059] If, at startup, only the current virtual machine node exists and the corresponding physical node is in a cluster state, then the cluster is started.

[0060] If there are other physical nodes in the cluster, the decision to start the cluster is based on the heartbeat connectivity status between the current node and the other physical nodes.

[0061] After the cluster starts, if it cannot communicate with the virtual nodes of other nodes via heartbeat, it will determine whether to start the resources based on the heartbeat status with the corresponding physical node and whether it is a configured node. If the existing virtual nodes are communicating via heartbeat, they will form a cluster, and the resources will be started on the corresponding nodes according to the node start order configured in the resource settings.

[0062] It should be noted that the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may, for example, be executed synchronously or asynchronously in multiple modules.

[0063] In a second aspect, the present invention also provides a virtual cluster startup control system. Figure 2 A schematic block diagram of an embodiment of the virtual cluster startup control system according to the present invention is shown. Figure 2 As shown, the system includes:

[0064] The virtual cluster configuration module 100 is used to obtain the number of virtual clusters contained in the entire physical cluster. The virtual clusters are isolated from each other by network. In the same virtual cluster, only one virtual machine is started on the physical machine.

[0065] The virtualization module 200 is used to virtualize the heartbeat link within the physical cluster into a virtual cluster heartbeat link, and the state of the physical cluster heartbeat link is consistent with the state of the virtual heartbeat link.

[0066] The node communication module 300 is used for communication between virtual nodes on physical machines and all physical machines in the cluster where the physical machine is located, as well as the virtual nodes on the corresponding physical machines.

[0067] It should be understood that although the above description follows a certain order, these steps are not necessarily executed in that order. Unless otherwise expressly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, some steps in this embodiment may include multiple steps or multiple stages, which are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be performed alternately or in turn with other steps or at least a portion of the steps or stages in other steps.

[0068] It should be noted that although several modules or units of the device for performing actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0069] A third aspect of the present invention also provides a computer device 1000, including a memory 1001 and a processor 1002, wherein the memory stores a computer program, which, when executed by the processor, implements the method of any of the above embodiments.

[0070] like Figure 3 The diagram shown is a hardware structure schematic of an embodiment of a computer device for executing a virtual cluster startup control method provided by the present invention. Figure 3 Taking the computer device 1000 shown as an example, this computer device includes a processor 1002 and a memory 1001, and may also include an input device 430 and an output device 440. The processor 1002, memory 1001, input device 430, and output device 440 can be connected via a bus or other means. Figure 3 Taking a bus connection as an example, input device 430 can receive input digital or character information and generate signal inputs related to virtual cluster startup control. Output device 440 may include display devices such as a display screen.

[0071] Memory 1001, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the virtual cluster startup control method in this embodiment. Memory 1001 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created by the use of the virtual cluster startup control method, etc. In addition, memory 1001 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 1001 may optionally include memory remotely located relative to processor 1002, and these remote memories can be connected to the local module via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0072] In some embodiments, processor 1002 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. Processor 1002 is typically used to control the overall operation of computer device 1000. In this embodiment, processor 1002 is used to run program code stored in memory 1001 or process data. In this embodiment, the processors 1002 of multiple computer devices 1000 execute various server functions and data processing by running non-volatile software programs, instructions, and modules stored in memory 1001, thereby implementing the virtual cluster startup control method of the above-described method embodiment, including the following steps:

[0073] Get the number of virtual clusters contained in the entire physical cluster. The virtual clusters are isolated from each other by network. Within the same virtual cluster, only one virtual machine is started on the physical machine.

[0074] The heartbeat links within the physical cluster are virtualized into virtual cluster heartbeat links, and the heartbeat link status of the physical cluster is consistent with the virtual heartbeat link status.

[0075] Virtual nodes on physical machines communicate with all physical machines in the cluster where the physical machine resides, as well as the virtual nodes on the corresponding physical machines.

[0076] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-compatible storage medium. When executed, the program can include the processes of the embodiments of the above methods, that is, implementing the virtual cluster startup control method of the above method embodiments, including the following steps:

[0077] Get the number of virtual clusters contained in the entire physical cluster. The virtual clusters are isolated from each other by network. Within the same virtual cluster, only one virtual machine is started on the physical machine.

[0078] The heartbeat links within the physical cluster are virtualized into virtual cluster heartbeat links, and the heartbeat link status of the physical cluster is consistent with the virtual heartbeat link status.

[0079] Virtual nodes on physical machines communicate with all physical machines in the cluster where the physical machine resides, as well as the virtual nodes on the corresponding physical machines.

[0080] A fourth aspect of the present invention also provides a computer-readable storage medium. Figure 4 A schematic diagram of a computer-readable storage medium for a virtual cluster startup control method provided according to an embodiment of the present invention is shown. Figure 4 As shown, the computer-readable storage medium 2000 stores computer program instructions 2001, which can be executed by a processor. When the computer program instructions 2001 are executed, they implement the method of any of the above embodiments, that is, implement the virtual cluster startup control method of the above method embodiments, including the following steps:

[0081] Get the number of virtual clusters contained in the entire physical cluster. The virtual clusters are isolated from each other by network. Within the same virtual cluster, only one virtual machine is started on the physical machine.

[0082] The heartbeat links within the physical cluster are virtualized into virtual cluster heartbeat links, and the heartbeat link status of the physical cluster is consistent with the virtual heartbeat link status.

[0083] Virtual nodes on physical machines communicate with all physical machines in the cluster where the physical machine resides, as well as the virtual nodes on the corresponding physical machines.

[0084] It should be understood that, where there is no conflict, all the embodiments, features and advantages described above for the virtual cluster startup control method according to the present invention are equally applicable to the virtual cluster startup control system and storage medium according to the present invention.

[0085] Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the functionality of various illustrative components, blocks, modules, circuits, and steps has been generally described. Whether this functionality is implemented as software or as hardware depends on the specific application and the design constraints imposed on the system as a whole. Those skilled in the art can implement the functionality in various ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the embodiments disclosed herein.

[0086] Finally, it should be noted that the computer-readable storage medium (e.g., memory) described herein can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. By way of example, and not limitation, non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which can act as external cache memory. By way of example, and not limitation, RAM can be obtained in various forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The storage devices disclosed herein are intended to include, but are not limited to, these and other suitable types of memory.

[0087] The various exemplary logic blocks, modules, and circuits described herein can be implemented or performed using the following components designed to perform the functions herein: general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general-purpose processor may be a microprocessor, but alternatively, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP, and / or any other such configuration.

[0088] In summary, this invention proposes a virtual cluster startup control method, system, storage medium, and device. It determines whether to start the cluster and take over resources by the state of each node when the virtual node starts, without the need for a separate arbitration device. When the virtual machine already contains cluster machine service configuration information, it will rely on the state of the physical cluster to determine the state of the virtual machine at startup, thereby determining whether to take over resources and start services.

[0089] In addition, the virtual cluster startup control method first determines whether it meets the single-node startup criteria. After the cluster starts, it assesses the status of each virtual machine node to decide whether to take over resources to provide services. By judging the current physical node, the heartbeat connectivity status with each physical node, and the heartbeat status between virtual nodes, it ultimately determines the node that will start the service resources, providing a solution for cluster startup without arbitration.

[0090] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.

[0091] It should be understood that, as used herein, the singular form "a" is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations of one or more of the associatedly listed items. The embodiment numbers disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0092] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.

Claims

1. A virtual cluster startup control method, characterized in that, Includes the following steps: Get the number of virtual clusters contained in the entire physical cluster. The virtual clusters are isolated from each other by network. Within the same virtual cluster, only one virtual machine is started on the physical machine. The heartbeat links within the physical cluster are virtualized into virtual cluster heartbeat links, and the heartbeat link status of the physical cluster is consistent with the virtual heartbeat link status. Virtual nodes on physical machines communicate with all physical machines in the cluster where the physical machine resides, as well as the virtual machine nodes on the corresponding physical machines. After the virtual machine starts, it first checks whether a cluster configuration exists. If no cluster configuration exists, it waits to be pulled into the cluster or re-establishes the cluster. If a cluster configuration exists, it first determines whether the physical node is online in the cluster. If it is not online in the cluster, it waits and does not start the cluster. If the current physical node is online, it starts the cluster. When other physical nodes are online at the same time, if only the current node virtual machine is started, start the cluster; if other node virtual machines are started, first check whether the heartbeat with other virtual machines is connected; if it is connected, start the cluster; otherwise, check whether the heartbeat with physical nodes is connected; if they are all connected, it means that the link is normal and other node virtual machines are in the startup or stuck stage, start the cluster; otherwise, restart and check the status until the status is met before starting the cluster.

2. The virtual cluster startup control method according to claim 1, characterized in that, If a physical machine is not in the cluster, the network will be isolated, and the virtual nodes on that physical machine will not be able to communicate with the other physical nodes or the virtual nodes of the other physical nodes.

3. The virtual cluster startup control method according to claim 2, characterized in that, Virtual machines and physical machines communicate with each other via heartbeat links, which are used to obtain basic operational information.

4. The virtual cluster startup control method according to claim 1, characterized in that, After starting the cluster, if only the current node is running and cannot communicate with other nodes via heartbeat, then connect to the heartbeat of the corresponding physical node to check the virtual machine status. If the status can be found, it indicates that there is a problem inside the virtual machine. Restart the virtual machine and start all resources. If the status cannot be found, take over the resources directly.

5. The virtual cluster startup control method according to claim 1, characterized in that, If the heartbeat of the corresponding physical node cannot be connected, determine whether the current physical node is a configured node. If it is, take over all resources. If it is not a configured node, restart the current virtual machine and re-enter the startup process. If a node with a heartbeat connection exists, it is added to the cluster, and resources are started on the corresponding node according to the preset node priority.

6. A virtual cluster startup control system, characterized in that, include: The virtual cluster configuration module is used to obtain the number of virtual clusters contained in the entire physical cluster. The virtual clusters are isolated from each other by network. Within the same virtual cluster, only one virtual machine is started on the physical machine. The virtualization module is used to virtualize the heartbeat links within the physical cluster into the heartbeat links of the virtual cluster. The heartbeat link status of the physical cluster is consistent with the virtual heartbeat link status. The node communication module is used to communicate between virtual nodes on physical machines and all physical machines in the cluster where the physical machine is located, as well as the virtual machine nodes on the corresponding physical machines. The virtual cluster configuration module is also used to check whether a cluster configuration exists after the virtual machine starts. If no cluster configuration exists, it waits to be pulled into the cluster or re-establishes the cluster. If a cluster configuration exists, it first determines whether the physical node is in the cluster online state. If it is not in the cluster online state, it waits and does not start the cluster. If the current physical node is in the online state, it starts the cluster. The node communication module is also used to start the cluster when other physical nodes are online at the same time. If only the current node virtual machine is started, the cluster is started. If other node virtual machines are started, the cluster is started first to determine whether the heartbeat with other virtual machines is connected. If the heartbeat is connected, the cluster is started. Otherwise, the cluster is started to determine whether the heartbeat with physical nodes is connected. If both are connected, it means that the link is normal and other node virtual machines are in the start-up or stuck stage. The cluster is started. Otherwise, the cluster is restarted and the status is checked until the status is met before starting the cluster.

7. A computer device, comprising a memory and a processor, characterized in that, The memory stores a computer program, which, when executed by the processor, performs the virtual cluster startup control method as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The system stores computer program instructions, which, when executed, implement the virtual cluster startup control method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Hyper-converged platform fault recovery method, device, electronic equipment and storage medium

    CN112148485A