A host resource synchronization method, system and device based on virtualization platform

By configuring resource synchronization information in the virtualization platform and saving it to the host resource synchronization configuration library, the problem of resource inconsistency after abnormal power outage of the physical host is solved, and automatic resource synchronization and efficient resource consistency are achieved.

CN113687987BActive Publication Date: 2025-02-07SHANDONG HAILIANG INFORMATION TECH RES INST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110873684.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-30
Publication Date
2025-02-07
Estimated Expiration
2041-07-30

AI Technical Summary

Technical Problem

In the virtualization platform, after the physical host is powered off abnormally, the resources of the management and host layers are inconsistent, resulting in low resource synchronization efficiency and manual intervention is required.

Method used

Provide a host resource synchronization method based on virtualization platform. By detecting the task operation of the physical host, the resource synchronization information is configured and saved to the host resource synchronization configuration library. After the target host is online, determine whether the target resource synchronization information exists. If it exists, perform the synchronous resource operation and allow the host to go online.

Benefits of technology

It realizes automatic synchronization of host resources after the physical host is launched, ensuring resource consistency between the management and host layers, improving resource synchronization efficiency, and reducing the need for manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113687987B_ABST
    Figure CN113687987B_ABST
Patent Text Reader

Abstract

The present invention discloses a host resource synchronization method, system and device based on a virtualization platform. When an abnormal power failure of a physical host corresponding to the virtualization platform is detected, resource synchronization information is configured for the physical host based on the task running status on the physical host, and the resource synchronization information is saved to a preset host resource synchronization configuration library; after detecting that the target host is online, it is determined whether there is target resource synchronization information corresponding to the target host in the host resource synchronization configuration library; if so, the synchronization resource operation of the target host is performed according to the target resource synchronization information, and after the synchronization resource operation is successfully completed, the target host is allowed to go online; if not, the target host is allowed to go online directly. It can be seen that the present application can automatically synchronize host resources after the physical host corresponding to the virtualization platform is online, thereby ensuring the resource consistency of the management layer and the host layer, and improving the resource synchronization efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of virtualization platforms, and in particular to a host resource synchronization method, system and device based on a virtualization platform. Background Art

[0002] In a virtualization platform, the management end of the virtualization platform issues tasks to the physical host corresponding to the virtualization platform. The physical host executes the operation steps corresponding to the task according to the issued task, and feedbacks the task completion message to the platform management end after completing the task. If the physical host is powered off abnormally, the tasks that are running on the physical host will fail to execute. For these failed tasks, the physical host may have executed some resource creation operations. For example, a task includes the operations of creating a disk and configuring a network card. When the physical host is powered off abnormally, the disk creation operation may have been completed. However, after the physical host is powered off abnormally, the platform management end and the physical host lose communication. The platform management end only knows that the physical host task execution failed, but does not know that the physical host has completed the disk creation operation. In this case, the host resources displayed on the management interface do not have the created disk corresponding to this task, resulting in inconsistent resources between the management layer and the host layer. At present, when the physical host is back online, manual intervention is required to synchronize the resources between the management layer and the host layer, but the manual intervention resource synchronization method is time-consuming, resulting in low resource synchronization efficiency.

[0003] Therefore, how to provide a solution to the above technical problems is a problem that technicians in this field need to solve at present. Summary of the invention

[0004] The purpose of the present invention is to provide a host resource synchronization method, system and device based on a virtualization platform, which can automatically synchronize host resources after the physical host corresponding to the virtualization platform goes online, ensure the resource consistency of the management layer and the host layer, and improve the resource synchronization efficiency.

[0005] In order to solve the above technical problems, the present invention provides a host resource synchronization method based on a virtualization platform, which is applied to a processor, comprising:

[0006] When an abnormal power failure of a physical host corresponding to the virtualization platform is detected, resource synchronization information is configured for the physical host based on the task running status on the physical host, and the resource synchronization information is saved to a preset host resource synchronization configuration library;

[0007] After detecting that the target host is online, determining whether there is target resource synchronization information corresponding to the target host in the host resource synchronization configuration library; wherein the target host is any of the physical hosts;

[0008] If so, executing a synchronization resource operation of the target host according to the target resource synchronization information, and allowing the target host to go online after the synchronization resource operation is successfully completed;

[0009] If not, the target host is allowed to go online directly.

[0010] Preferably, the process of configuring resource synchronization information for the physical host based on the task running status on the physical host includes:

[0011] Based on the target task that failed to execute on the physical host and the extent to which the target task has been executed, resource synchronization event information representing the event to be synchronized corresponding to the target task is configured, and multiple event item information representing multiple host resources and resource synchronization processes involved in the event are configured for the event to be synchronized; wherein the resource synchronization event information and the event item information together constitute the resource synchronization information.

[0012] Preferably, the resource synchronization event information includes the host ID of the physical host, the target task ID, the event ID and event status to be synchronized, the execution order of each target task and the execution order of each event to be synchronized within the same target task;

[0013] Then, according to the resource synchronization event information and the event item information, a process of performing a synchronization resource operation of the physical host includes:

[0014] Determine the physical host with abnormal power failure according to the host ID in the resource synchronization event information;

[0015] Determine, according to the target task ID in the resource synchronization event information, the target task that failed to execute corresponding to the abnormally powered-off physical host;

[0016] Determine the event to be synchronized corresponding to the target task that failed to execute according to the event to be synchronized id in the resource synchronization event information;

[0017] Determining the to-be-synchronized event waiting to be executed according to the event status of the to-be-synchronized event;

[0018] According to the execution order of each target task and the execution order of each event to be synchronized within the same target task, the execution order of all events to be synchronized and waiting to be executed corresponding to each target task is determined;

[0019] According to the execution order of all the to-be-synchronized events waiting to be executed and the multiple event item information corresponding to each of the to-be-synchronized events, the to-be-synchronized events are executed in sequence.

[0020] Preferably, the event item information includes resource type, REST interface address used by synchronization resources, resource id, event item priority, number of retries, timeout period, and whether to skip in case of failure;

[0021] Then, according to the multiple event item information corresponding to the event to be synchronized, the process of executing the event to be synchronized includes:

[0022] Determine the execution order of each event item corresponding to the event to be synchronized according to the event item priority in the target event item information; wherein the target event item information represents the event item information corresponding to the target event item, and the target event item is any of the event items;

[0023] Execute each event item in sequence according to the execution order of each event item and a series of information including the resource type corresponding to the target event item, the rest interface address used by the synchronization resource, the resource ID, the number of retries, the timeout period, and whether to skip if failed.

[0024] Preferably, the process of executing the target event item according to a series of information such as the resource type corresponding to the target event item, the rest interface address used by the synchronization resource, the resource id, the number of retries, the timeout period, and whether to skip the failure includes:

[0025] Determining the resource type involved in the target event item according to the resource type in the target event item information;

[0026] Determine the REST interface of the resource involved in synchronizing the target event item according to the REST interface address used by the synchronization resource in the target event item information;

[0027] Determine the resource to be synchronized corresponding to the target event item according to the resource ID in the target event item information;

[0028] According to the number of retries, timeout time and whether to skip if failed in the target event item information, determine in sequence the number of times the target event item is allowed to be repeatedly executed, the maximum execution time allowed and whether the final execution failure allows direct skipping to execute the next event item;

[0029] The target event item is executed according to a series of information including the rest interface corresponding to the target event item, the resources to be synchronized, the number of repeated executions allowed, the maximum execution time allowed, and whether the final execution failure allows direct skipping of the next event item.

[0030] Preferably, the resource types include CPU, memory, virtual machine, storage pool, disk, network card and port;

[0031] The process of determining the resource type involved in the target event item according to the resource type in the target event item information includes:

[0032] According to the resource type in the target event item information, the resource type involved in the target event item is determined from multiple resource types including CPU, memory, virtual machine, storage pool, disk, network card and port.

[0033] Preferably, the process of executing the target host's resource synchronization operation according to the target resource synchronization information includes:

[0034] Load all resource synchronization event information and event item information corresponding to the target host from the host resource synchronization configuration library into the queue to be executed;

[0035] Based on the resource synchronization event information and event item information in the queue to be executed, the synchronization resource operations of the target host are executed in sequence.

[0036] Preferably, the host resource synchronization method based on the virtualization platform also includes:

[0037] When executing the synchronization resource operation of the target host, recording the resource synchronization related logs into the preset synchronization log library;

[0038] If the synchronization resource operation of the target host fails, a manual intervention reminder is performed to enable a manual operation to complete the synchronization resource operation of the target host according to the log information in the synchronization log library.

[0039] In order to solve the above technical problems, the present invention also provides a host resource synchronization system based on a virtualization platform, comprising:

[0040] An information configuration module, configured to configure resource synchronization information for the physical host based on the task running status on the physical host when an abnormal power failure of the physical host corresponding to the virtualization platform is detected, and save the resource synchronization information to a preset host resource synchronization configuration library;

[0041] A synchronization judgment module is used to determine whether there is target resource synchronization information corresponding to the target host in the host resource synchronization configuration library after detecting that the target host is online; if so, execute the synchronization online module; if not, execute the direct online module; wherein the target host is any of the physical hosts;

[0042] A synchronous online module, used to execute a synchronous resource operation of the target host according to the target resource synchronization information, and allow the target host to go online after the synchronous resource operation is successfully completed;

[0043] The direct online module is used to allow the target host to go online directly.

[0044] Preferably, the process of configuring resource synchronization information for the physical host based on the task running status on the physical host includes:

[0045] Based on the target task that failed to execute on the physical host and the degree to which the target task has been executed, resource synchronization event information representing the event to be synchronized corresponding to the target task is configured, and multiple event item information representing multiple host resources involved in the event and the resource synchronization process is configured for the event to be synchronized.

[0046] Preferably, the resource synchronization event information includes the host ID of the physical host, the target task ID, the event ID and event status to be synchronized, the execution order of each target task and the execution order of each event to be synchronized within the same target task;

[0047] The event item information includes resource type, REST interface address used by synchronization resources, resource id, event item priority, number of retries, timeout period, and whether to skip if failed.

[0048] In order to solve the above technical problems, the present invention also provides a host resource synchronization device based on a virtualization platform, comprising:

[0049] Memory for storing computer programs;

[0050] A processor is used to implement the steps of any of the above-mentioned host resource synchronization methods based on a virtualization platform when executing the computer program.

[0051] The present invention provides a host resource synchronization method based on a virtualization platform, which is applied to a processor. When an abnormal power failure of a physical host corresponding to a virtualization platform is detected, resource synchronization information is configured for the physical host based on the task running status on the physical host, and the resource synchronization information is saved to a preset host resource synchronization configuration library; after detecting that the target host is online, it is determined whether there is target resource synchronization information corresponding to the target host in the host resource synchronization configuration library; if so, the target host's synchronization resource operation is performed according to the target resource synchronization information, and after the synchronization resource operation is successfully completed, the target host is allowed to go online; if not, the target host is allowed to go online directly. It can be seen that the present application can automatically synchronize host resources after the physical host corresponding to the virtualization platform is online, thereby ensuring the resource consistency of the management layer and the host layer, and improving the efficiency of resource synchronization.

[0052] The present invention also provides a host resource synchronization system and device based on a virtualization platform, which have the same beneficial effects as the above-mentioned host resource synchronization method. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the prior art and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0054] Figure 1 A flowchart of a host resource synchronization method based on a virtualization platform provided by an embodiment of the present invention;

[0055] Figure 2 A flowchart of a host power failure exception processing based on a virtualization platform provided by an embodiment of the present invention;

[0056] Figure 3 A flow chart of host online resource synchronization based on a virtualization platform provided by an embodiment of the present invention;

[0057] Figure 4 A schematic diagram of the structure of a host resource synchronization system based on a virtualization platform provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0058] The core of the present invention is to provide a host resource synchronization method, system and device based on a virtualization platform, which can synchronize host resources after the physical host corresponding to the virtualization platform goes online, ensure the resource consistency of the management layer and the host layer, and improve the resource synchronization efficiency.

[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0060] Please refer to Figure 1 , Figure 1 The present invention provides a flowchart of a method for synchronizing host resources based on a virtualization platform according to an embodiment of the present invention.

[0061] The host resource synchronization method based on the virtualization platform includes:

[0062] Step S1: when an abnormal power failure of a physical host corresponding to a virtualization platform is detected, resource synchronization information is configured for the physical host based on the task running status on the physical host, and the resource synchronization information is saved to a preset host resource synchronization configuration library.

[0063] Specifically, there is more than one physical host corresponding to the virtualization platform. The present application detects whether each physical host corresponding to the virtualization platform is abnormally powered off. If a physical host corresponding to the virtualization platform is detected to be abnormally powered off, the task running status on the abnormally powered off physical host is obtained, and based on the task running status on the abnormally powered off physical host, resource synchronization information for guiding host resource synchronization is automatically configured for the abnormally powered off physical host, and then the resource synchronization information is automatically saved to a preset host resource synchronization configuration library to provide a basis for subsequent synchronization of host resources.

[0064] More specifically, it is known that the management end of the virtualization platform sends tasks to the physical host corresponding to the virtualization platform, and the physical host executes the operation steps corresponding to the task according to the task sent by the management end. If the physical host is powered off abnormally, the tasks that are running on the physical host will fail to execute. These failed tasks are the key to the inconsistency of resources between the management layer and the host layer. The process of obtaining the task running status on the physical host that has been powered off abnormally is specifically as follows: obtaining the tasks that the physical host is running at the time of the abnormal power outage and the degree to which these tasks have been executed, and determining these running tasks as failed tasks corresponding to the physical host that has been powered off abnormally, so as to configure resource synchronization information for the physical host that has been powered off abnormally.

[0065] Step S2: After detecting that the target host is online, determine whether there is target resource synchronization information corresponding to the target host in the host resource synchronization configuration library; if so, execute step S3; if not, execute step S4. Step S3: According to the target resource synchronization information, execute the target host's synchronization resource operation, and after the synchronization resource operation is successfully completed, allow the target host to go online. Step S4: Allow the target host to go online directly.

[0066] It should be noted that the target host of the present application refers to any physical host corresponding to the virtualization platform.

[0067] Specifically, the present application detects whether the target host is online. If the target host is detected to be online, it automatically determines whether there is resource synchronization information corresponding to the target host in the host resource synchronization configuration library (referred to as target resource synchronization information). If there is target resource synchronization information corresponding to the target host in the host resource synchronization configuration library, it indicates that it is necessary to synchronize the resources of the target host. Then, the target host is automatically synchronized with the target resource according to the target resource synchronization information. Then, after the target host's synchronization operation is successfully completed, the target host is allowed to go online (resource synchronization mode → online mode). If there is no target resource synchronization information corresponding to the target host in the host resource synchronization configuration library, it indicates that it is not necessary to synchronize the resources of the target host, and the target host is allowed to go online directly (online mode).

[0068] It can be seen that this application can automatically synchronize host resources after the physical host corresponding to the virtualization platform goes online, ensuring resource consistency between the management layer and the host layer and improving resource synchronization efficiency.

[0069] Based on the above embodiments:

[0070] Please refer to Figure 2 and Figure 3 , Figure 2 A flowchart of a host power failure exception processing based on a virtualization platform provided by an embodiment of the present invention, Figure 3 A flow chart of host online resource synchronization based on a virtualization platform is provided in an embodiment of the present invention.

[0071] As an optional embodiment, the process of configuring resource synchronization information for the physical host based on the task running status on the physical host includes:

[0072] Based on the target task that failed to execute on the physical host and the degree to which the target task has been executed, resource synchronization event information representing the event to be synchronized corresponding to the target task is configured, and multiple event item information representing multiple host resources and resource synchronization processes involved in the event are configured for the event to be synchronized; wherein the resource synchronization event information and the event item information together constitute the resource synchronization information.

[0073] Specifically, the configuration process of the resource synchronization information for guiding the synchronization of host resources in the present application is:

[0074] For any physical host that has an abnormal power outage, first determine the failed task (called the target task) corresponding to the physical host that has an abnormal power outage and the degree to which the target task has been executed, and then configure the target task with resource synchronization event information (stored in the resource synchronization event library) that represents the event to be synchronized corresponding to the target task. At the same time, for the event to be synchronized corresponding to the target task, configure multiple event item information (stored in the event item library) that represents multiple host resources involved in the event and the resource synchronization process, that is, one event item information represents a host resource involved in the event to be synchronized and the synchronization process of this host resource.

[0075] For example, the task of creating a virtual machine on a physical host includes the following steps: 1) configuring the CPU (central processing unit); 2) configuring the memory; 3) creating disk 1 and disk 2; 4) configuring network card 1 and network card 2. If a physical host currently has only one task of creating a first virtual machine, and an abnormal power outage occurs when disk 2 is created but network card 1 is not configured, and the platform management end only knows that the execution of this physical host task has failed, then the process of configuring resource synchronization information for this physical host is: first determine that the target task corresponding to this physical host that has failed to execute is the task of creating the first virtual machine, and the extent to which the target task has been executed is that disk 2 has been created but network card 1 has not been configured. It can be understood that the event to be synchronized corresponding to the target task is: delete the resources generated by this physical host when executing the task of creating the first virtual machine; the event to be synchronized corresponds to 4 event items, namely, releasing the CPU resources generated by this physical host when executing the task of creating the first virtual machine, releasing the memory resources generated by this physical host when executing the task of creating the first virtual machine, deleting disk 1 created by this physical host when executing the task of creating the first virtual machine, and deleting disk 2 created by this physical host when executing the task of creating the first virtual machine. Then, resource synchronization event information is configured based on this as the target task, and event item information is configured for the event to be synchronized.

[0076] As an optional embodiment, the resource synchronization event information includes the host ID of the physical host, the target task ID, the event ID and event status to be synchronized, the execution order of each target task and the execution order of each event to be synchronized within the same target task;

[0077] The process of executing the synchronization resource operation of the physical host according to the resource synchronization event information and the event item information includes:

[0078] Determine the physical host with abnormal power failure based on the host ID in the resource synchronization event information;

[0079] According to the target task ID in the resource synchronization event information, determine the target task that failed to execute corresponding to the physical host with abnormal power failure;

[0080] Determine the event to be synchronized corresponding to the target task that failed to execute according to the event ID to be synchronized in the resource synchronization event information;

[0081] Determine the synchronization event to be executed according to the event status of the synchronization event;

[0082] According to the execution order of each target task and the execution order of each synchronization event within the same target task, the execution order of all synchronization events waiting to be executed corresponding to each target task is determined;

[0083] According to the execution order of all pending synchronization events waiting to be executed and multiple event item information corresponding to each pending synchronization event, each pending synchronization event is executed in sequence.

[0084] Specifically, the resource synchronization event information of the present application includes: 1) the host ID (Identity document) of the physical host that has abnormal power outage, and the physical host that has abnormal power outage can be determined through the host ID; 2) the ID of the target task that failed to execute corresponding to the physical host that has abnormal power outage, and the target task that failed to execute corresponding to the physical host that has abnormal power outage can be determined through the target task ID; 3) the ID and event status (the default is to be executed) of the event to be synchronized corresponding to the target task, and the event to be synchronized corresponding to the target task can be determined through the event to be synchronized ID, and the event to be synchronized is determined to be waiting for execution based on the event status of the event to be synchronized; 4) the execution order of each target task and the execution order of each event to be synchronized within the same target task, so that each event to be synchronized in each target task is executed in sequence according to the execution order based on the multiple event item information corresponding to each event to be synchronized.

[0085] As an optional embodiment, the event item information includes resource type, REST interface address used by synchronization resource, resource id, event item priority, number of retries, timeout period and whether to skip if failed;

[0086] Then, according to the multiple event item information corresponding to the event to be synchronized, the process of executing the event to be synchronized includes:

[0087] Determine the execution order of each event item corresponding to the event to be synchronized according to the event item priority in the target event item information; wherein the target event item information represents the event item information corresponding to the target event item, and the target event item is any event item;

[0088] Execute each event item in sequence according to the execution order of each event item and the resource type corresponding to the target event item, the rest interface address used by the synchronization resource, the resource id, the number of retries, the timeout period, and whether to skip the failure.

[0089] This embodiment is described in detail in the subsequent embodiments, and this application will not repeat it here.

[0090] As an optional embodiment, the process of executing the target event item according to a series of information such as the resource type corresponding to the target event item, the rest interface address used by the synchronization resource, the resource ID, the number of retries, the timeout period, and whether to skip the failure includes:

[0091] Determine the resource type involved in the target event item according to the resource type in the target event item information;

[0092] Determine the REST interface of the resource involved in the synchronization target event item according to the REST interface address used by the synchronization resource in the target event item information;

[0093] Determine the resource to be synchronized corresponding to the target event item according to the resource ID in the target event item information;

[0094] According to the number of retries, timeout time and whether to skip if failed in the target event item information, determine the number of times the target event item is allowed to be repeated, the maximum allowed execution time and whether to skip directly to execute the next event item if the final execution fails;

[0095] The target event item is executed based on a series of information such as the rest interface corresponding to the target event item, the resources to be synchronized, the number of repeated executions allowed, the maximum execution time allowed, and whether the final execution failure allows direct skipping of the next event item.

[0096] Specifically, the event item information of the present application includes: 1) the resource type involved in the event item, such as if the event item is to release CPU resources, then the resource type involved in the event item is CPU resources; 2) the rest interface address used for synchronization resources (the rest interface is specifically an atomic operation rest interface, which supports the functions of creating resources, synchronizing resource status, and deleting resources); 3) resource id, which can be used to determine the resources (i.e., resources to be synchronized) of the operation corresponding to the event item. If the event item is to release the CPU resources generated when creating the task of the first virtual machine, then the resource id can be used to determine the resources of the operation corresponding to the event item: the CPU resources generated when creating the task of the first virtual machine; 4) event item priority, which can be used to determine the execution order of the event item; 5) the number of retries, which is used to set a single The event item is allowed to fail a certain number of times, and can be repeatedly executed until it succeeds; 6) Timeout period, which is used to set the maximum execution time of a single event item to prevent the host from being in resource synchronization mode for a long time and unable to be used normally; 7) Whether to skip on failure, which is used to set whether a single event item is allowed to fail in the end but does not affect the normal execution result of the entire synchronization event, that is, whether a single event item is allowed to skip directly to the next event item if it fails in the end (if skipping is allowed, the next event item can be skipped directly after the single event item fails in the end. If only the event item that allows skipping fails, the synchronization resource operation is ultimately considered successful; if skipping is not allowed, the next event item will not be executed after the single event item fails in the end, and the synchronization resource operation is directly determined to have failed), to ensure that the host is online normally as much as possible. It should be noted that the situation where a single event item ultimately fails is: the number of repeated executions of the single event item exceeds the set number of retries, and / or the execution time of the single event item exceeds the set timeout period.

[0097] As an optional embodiment, the resource types include CPU, memory, virtual machine, storage pool, disk, network card and port;

[0098] The process of determining the resource type involved in the target event item according to the resource type in the target event item information includes:

[0099] According to the resource type in the target event item information, the resource type involved in the target event item is determined from multiple resource types including CPU, memory, virtual machine, storage pool, disk, network card and port.

[0100] Specifically, the resource types involved in the events to be synchronized include CPU (central processing unit), memory, virtual machine, storage pool, disk, network card and port.

[0101] As an optional embodiment, the process of performing a resource synchronization operation of a target host according to the target resource synchronization information includes:

[0102] Load all resource synchronization event information and event item information corresponding to the target host from the host resource synchronization configuration library into the queue to be executed;

[0103] Based on the resource synchronization event information and event item information in the queue to be executed, the synchronization resource operations of the target host are executed in sequence.

[0104] Specifically, when executing the synchronization resource operation of the target host according to the target resource synchronization information, the present application can first load all the resource synchronization event information and event item information corresponding to the target host from the host resource synchronization configuration library into the queue to be executed, and then execute the synchronization resource operation of the target host in sequence based on the resource synchronization event information and event item information in the queue to be executed.

[0105] As an optional embodiment, the host resource synchronization method based on the virtualization platform also includes:

[0106] When executing the synchronization resource operation of the target host, record the resource synchronization related logs into the preset synchronization log library;

[0107] If the synchronization resource operation of the target host fails, a manual intervention reminder is performed to enable the manual operation to complete the synchronization resource operation of the target host according to the log information in the synchronization log library.

[0108] Furthermore, the present application can also record resource synchronization related logs into a preset synchronization log library when executing the synchronization resource operation of the target host. If the synchronization resource operation of the target host fails, it enters the resource synchronization failure mode, specifically, a manual intervention reminder is performed, the purpose is to enable the manual to complete the synchronization resource operation of the target host according to the log information in the synchronization log library, and allow the target host to enter the online mode after the manual intervention is successful, at which time the virtualization platform can use all the resources of the target host normally.

[0109] In summary, if Figure 2 As shown, after the host is abnormally powered off, the resource synchronization event information is configured to the resource synchronization event library, and the event item information (such as event item 1, event item 2, event item 3) is configured to the event item library (the resource synchronization event library and the event item library together constitute the host resource synchronization configuration library). After the configuration is completed, the event item status is pending execution.

[0110] like Figure 3 As shown, after the host is back online, the resource synchronization event information and event item information are read from the host resource synchronization configuration library, and the resource synchronization event (including event item 1, event item 2, and event item 3) is executed. After the synchronization is completed, the log is recorded to the synchronization log library, and the resource synchronization result is checked. If the synchronization is successful, the host online mode is entered; if the synchronization fails, the resource synchronization failure mode is entered, and the system is manually online after repair.

[0111] Please refer to Figure 4 , Figure 4 A schematic diagram of the structure of a host resource synchronization system based on a virtualization platform provided by an embodiment of the present invention.

[0112] The host resource synchronization system based on the virtualization platform includes:

[0113] The information configuration module 1 is used to configure resource synchronization information for the physical host based on the task running status on the physical host when an abnormal power failure of the physical host corresponding to the virtualization platform is detected, and save the resource synchronization information to a preset host resource synchronization configuration library;

[0114] The synchronization judgment module 2 is used to determine whether there is target resource synchronization information corresponding to the target host in the host resource synchronization configuration library after detecting that the target host is online; if so, the synchronization online module 3 is executed; if not, the direct online module 4 is executed; wherein the target host is any physical host;

[0115] The synchronization online module 3 is used to execute the synchronization resource operation of the target host according to the target resource synchronization information, and allow the target host to go online after the synchronization resource operation is successfully completed;

[0116] The direct online module 4 is used to allow the target host to go online directly.

[0117] As an optional embodiment, the process of configuring resource synchronization information for the physical host based on the task running status on the physical host includes:

[0118] Based on the target task that failed to execute on the physical host and the degree to which the target task has been executed, resource synchronization event information representing the event to be synchronized corresponding to the target task is configured, and multiple event item information representing multiple host resources involved in the event and the resource synchronization process is configured for the event to be synchronized.

[0119] As an optional embodiment, the resource synchronization event information includes the host ID of the physical host, the target task ID, the event ID and event status to be synchronized, the execution order of each target task and the execution order of each event to be synchronized within the same target task;

[0120] The event item information includes resource type, REST interface address used by synchronization resources, resource id, event item priority, number of retries, timeout period, and whether to skip failure.

[0121] For an introduction to the host resource synchronization system provided in this application, please refer to the embodiment of the above-mentioned host resource synchronization method, and this application will not go into details here.

[0122] The present application also provides a host resource synchronization device based on a virtualization platform, comprising:

[0123] Memory for storing computer programs;

[0124] A processor is used to implement any of the steps of the above-mentioned host resource synchronization method based on a virtualization platform when executing a computer program.

[0125] For an introduction to the host resource synchronization device provided in the present application, please refer to the embodiment of the above-mentioned host resource synchronization method, and the present application will not go into details here.

[0126] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0127] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A host resource synchronization method based on a virtualization platform, characterized in that: Applicable to processors, including: When an abnormal power failure of a physical host corresponding to the virtualization platform is detected, resource synchronization information is configured for the physical host based on the task running status on the physical host, and the resource synchronization information is saved to a preset host resource synchronization configuration library; After detecting that the target host is online, determining whether there is target resource synchronization information corresponding to the target host in the host resource synchronization configuration library; wherein the target host is any of the physical hosts; If so, executing a synchronization resource operation of the target host according to the target resource synchronization information, and allowing the target host to go online after the synchronization resource operation is successfully completed; If not, the target host is allowed to go online directly; Specifically, the process of configuring resource synchronization information for the physical host based on the task running status on the physical host includes: configuring resource synchronization event information representing the event to be synchronized corresponding to the target task based on the target task that failed to be executed on the physical host and the degree to which the target task has been executed, and configuring multiple event item information representing multiple host resources and resource synchronization processes involved in the event for the event to be synchronized; wherein the resource synchronization event information and the event item information together constitute the resource synchronization information; The resource synchronization event information includes the host ID of the physical host, the target task ID, the event ID and event status to be synchronized, the execution order of each target task and the execution order of each event to be synchronized within the same target task; The process of executing the synchronous resource operation of the physical host according to the resource synchronization event information and the event item information includes: determining the physical host with abnormal power outage according to the host ID in the resource synchronization event information; determining the target task that failed to execute corresponding to the physical host with abnormal power outage according to the target task ID in the resource synchronization event information; determining the to-be-synchronized event corresponding to the failed target task according to the to-be-synchronized event ID in the resource synchronization event information; determining the to-be-synchronized event waiting to be executed according to the event status of the to-be-synchronized event; determining the execution order of all to-be-synchronized events waiting to be executed corresponding to each target task according to the execution order of each target task and the execution order of each to-be-synchronized event in the same target task; and executing each to-be-synchronized event in sequence according to the execution order of all to-be-synchronized events waiting to be executed and the multiple event item information corresponding to each to-be-synchronized event.

2. The host resource synchronization method based on a virtualization platform according to claim 1, characterized in that: The event item information includes resource type, REST interface address used by synchronization resources, resource id, event item priority, number of retries, timeout period, and whether to skip if failed; Then, according to the multiple event item information corresponding to the event to be synchronized, the process of executing the event to be synchronized includes: Determine the execution order of each event item corresponding to the event to be synchronized according to the event item priority in the target event item information; wherein the target event item information represents the event item information corresponding to the target event item, and the target event item is any of the event items; Execute each event item in sequence according to the execution order of each event item and a series of information including the resource type corresponding to the target event item, the rest interface address used by the synchronization resource, the resource ID, the number of retries, the timeout period, and whether to skip if failed.

3. The host resource synchronization method based on a virtualization platform as claimed in claim 2, characterized in that: The process of executing the target event item according to a series of information such as the resource type corresponding to the target event item, the rest interface address used by the synchronization resource, the resource ID, the number of retries, the timeout period, and whether to skip if failed, includes: Determining the resource type involved in the target event item according to the resource type in the target event item information; Determine the REST interface of the resource involved in synchronizing the target event item according to the REST interface address used by the synchronization resource in the target event item information; Determine the resource to be synchronized corresponding to the target event item according to the resource ID in the target event item information; According to the number of retries, timeout time and whether to skip if failed in the target event item information, determine in sequence the number of times the target event item is allowed to be repeatedly executed, the maximum execution time allowed and whether the final execution failure allows direct skipping to execute the next event item; The target event item is executed according to a series of information including the rest interface corresponding to the target event item, the resources to be synchronized, the number of repeated executions allowed, the maximum execution time allowed, and whether the final execution failure allows direct skipping of the next event item.

4. The host resource synchronization method based on a virtualization platform as claimed in claim 3, characterized in that: The resource types include CPU, memory, virtual machine, storage pool, disk, network card and port; The process of determining the resource type involved in the target event item according to the resource type in the target event item information includes: According to the resource type in the target event item information, the resource type involved in the target event item is determined from multiple resource types including CPU, memory, virtual machine, storage pool, disk, network card and port.

5. The host resource synchronization method based on a virtualization platform according to claim 1, characterized in that: The process of executing the synchronization resource operation of the target host according to the target resource synchronization information includes: Load all resource synchronization event information and event item information corresponding to the target host from the host resource synchronization configuration library into the queue to be executed; Based on the resource synchronization event information and event item information in the queue to be executed, the synchronization resource operations of the target host are executed in sequence.

6. The host resource synchronization method based on a virtualization platform according to any one of claims 1 to 5, characterized in that: The host resource synchronization method based on the virtualization platform also includes: When executing the synchronization resource operation of the target host, recording the resource synchronization related logs into the preset synchronization log library; If the synchronization resource operation of the target host fails, a manual intervention reminder is performed to enable a manual operation to complete the synchronization resource operation of the target host according to the log information in the synchronization log library.

7. A host resource synchronization system based on a virtualization platform, characterized in that: include: An information configuration module, configured to configure resource synchronization information for the physical host based on the task running status on the physical host when an abnormal power failure of the physical host corresponding to the virtualization platform is detected, and save the resource synchronization information to a preset host resource synchronization configuration library; A synchronization judgment module is used to judge whether there is target resource synchronization information corresponding to the target host in the host resource synchronization configuration library after detecting that the target host is online; If yes, then execute the synchronous online module; if no, then execute the direct online module; wherein the target host is any of the physical hosts; A synchronous online module, used to execute a synchronous resource operation of the target host according to the target resource synchronization information, and allow the target host to go online after the synchronous resource operation is successfully completed; A direct online module, used to allow the target host to go online directly; The information configuration module is specifically used to configure resource synchronization event information representing the event to be synchronized corresponding to the target task that failed to be executed on the physical host and the degree to which the target task has been executed, and configure multiple event item information representing multiple host resources and resource synchronization processes involved in the event for the event to be synchronized; wherein the resource synchronization event information and the event item information together constitute the resource synchronization information; The resource synchronization event information includes the host ID of the physical host, the target task ID, the event ID and event status to be synchronized, the execution order of each target task and the execution order of each event to be synchronized within the same target task; The synchronous online module is specifically used to determine the physical host with abnormal power outage according to the host ID in the resource synchronization event information; determine the target task that failed to execute corresponding to the physical host with abnormal power outage according to the target task ID in the resource synchronization event information; determine the to-be-synchronized event corresponding to the failed target task according to the to-be-synchronized event ID in the resource synchronization event information; determine the to-be-synchronized event waiting to be executed according to the event status of the to-be-synchronized event; determine the execution order of all to-be-synchronized events waiting to be executed corresponding to each target task according to the execution order of each target task and the execution order of each to-be-synchronized event in the same target task; execute each to-be-synchronized event in sequence according to the execution order of all to-be-synchronized events waiting to be executed and the multiple event item information corresponding to each to-be-synchronized event.

8. A host resource synchronization device based on a virtualization platform, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the host resource synchronization method based on a virtualization platform as described in any one of claims 1 to 6 when executing the computer program.

Citation Information

Patent Citations

  • Management method and device for disaster tolerance of virtualization platform

    CN110377456A