Cloud host migration method and device, equipment, medium and program product
By receiving and processing migration requests during the cloud host migration process and calling the operation node in time to perform migration rollback operations, the problem of failure in the existing technology cannot be handled in time, and the efficiency of exception handling and source node recovery is improved.
Patent Information
- Application Number
- CN202411147869.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-11-26
AI Technical Summary
The existing cloud host migration solution has the problem that failure cannot be discovered and handled in time during the migration process, resulting in difficulty in handling exceptions and restoring source nodes.
By receiving the cloud host migration request from the user, obtaining the destination node information, and calling the operation node to perform the migration operation based on this information; when an exception occurs, the first operation node and/or the second operation node are called to perform the migration rollback operation, so that the source The node returns to the unmigrated state, and the second operation node is the target operation node that was executed before the exception.
It realizes unified monitoring and management of operation nodes, improves the timeliness of exception handling and the timeliness of source node recovery to the unmigrated state, and reduces the complexity and efficiency of exception handling.
Smart Images

Figure CN119031035A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a cloud host migration method, device, equipment, medium and program product. Background Art
[0002] In a cloud computing environment, cloud host migration is a key technology used to migrate virtual machines between different physical machines to achieve load balancing, hardware maintenance and other purposes. The cloud host migration process includes migration preparation, actual data migration, network migration, resource cleanup and other steps. Existing cloud host migration solutions usually complete the migration task through the mutual collaboration between multiple components, namely, the operation nodes in the cloud host migration process, such as the application interface layer, scheduling layer, host nodes, network nodes, etc. Each operation node independently handles the tasks within its scope of responsibility. If an error or failure occurs in a component or migration operation during the migration process, there is a problem that the failure cannot be discovered and handled in time. Summary of the invention
[0003] In order to solve the above technical problems, the present disclosure provides a cloud host migration method, device, equipment, medium and program product.
[0004] A first aspect of an embodiment of the present disclosure provides a cloud host migration method, including:
[0005] Receive a cloud host migration request sent by a user, and obtain destination node information corresponding to the cloud host migration request;
[0006] Calling the operation node based on the destination node information to execute the cloud host migration operation corresponding to the cloud host migration request;
[0007] In response to a cloud host migration exception occurring in the first operation node, the first operation node and / or the second operation node is called to perform a migration rollback operation to restore the source node corresponding to the cloud host migration request to an unmigrated state. The second operation node is the operation node corresponding to the target migration operation that was completed before the cloud host migration exception occurred.
[0008] A second aspect of an embodiment of the present disclosure provides a cloud host migration device, including:
[0009] The request receiving module is used to receive the cloud host migration request sent by the user end and obtain the destination node information corresponding to the cloud host migration request;
[0010] A migration module, used to call an operation node to execute a cloud host migration operation corresponding to a cloud host migration request based on the destination node information;
[0011] The exception handling module is used to call the first operation node and / or the second operation node to perform a migration rollback operation in response to a cloud host migration exception occurring in the first operation node, so as to restore the source node corresponding to the cloud host migration request to an unmigrated state, and the second operation node is the operation node corresponding to the target migration operation that was completed before the cloud host migration exception occurred.
[0012] A third aspect of the embodiments of the present disclosure provides an electronic device, including:
[0013] processor;
[0014] A memory for storing executable instructions;
[0015] The processor is used to read executable instructions from the memory and execute the executable instructions to implement the cloud host migration method provided in the first aspect above.
[0016] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the cloud host migration method provided by the first aspect above.
[0017] A fifth aspect of an embodiment of the present disclosure provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the cloud host migration method as described in the first aspect above is implemented.
[0018] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0019] The cloud host migration method, apparatus, device, medium and program product provided by the embodiments of the present disclosure can receive a cloud host migration request sent by a user terminal, and obtain the destination node information corresponding to the cloud host migration request, and call the operation node based on the destination node information to execute the cloud host migration operation corresponding to the cloud host migration request. In response to a cloud host migration exception occurring in the first operation node, the first operation node and / or the second operation node are called to perform a migration rollback operation so that the source node corresponding to the cloud host migration request is restored to an unmigrated state, and the second operation node is the operation node corresponding to the target migration operation that was completed before the cloud host migration exception occurred. Thus, the operation nodes can be uniformly monitored and managed by uniformly calling the operation nodes to execute the cloud host migration operation corresponding to the cloud host migration request, and then the cloud host migration exception can be responded to in a timely manner, and the operation node corresponding to the target migration operation that has been completed can be called to perform the migration rollback operation, thereby improving the timeliness of exception handling and the timeliness of the source node being restored to the unmigrated state. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0022] Figure 1 is a flow chart of a cloud host migration method provided by an embodiment of the present disclosure;
[0023] Figure 2 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0024] Figure 3 It is a structural schematic diagram of a cloud host migration device provided by an embodiment of the present disclosure;
[0025] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0027] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0028] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0029] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" 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, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0030] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0031] Generally, in the existing cloud host migration solution, each operation node independently handles the tasks within its scope of responsibility. If an error or failure occurs in a component or migration operation during the migration process, there is a problem that the failure cannot be discovered and handled in time. To address this problem, the embodiments of the present disclosure provide a cloud host migration method, which is described below in conjunction with specific embodiments.
[0032] Figure 1 is a flow chart of a cloud host migration method provided by an embodiment of the present disclosure. The method can be executed by a cloud host migration device. The cloud host migration device can be implemented in software and / or hardware. The cloud host migration device can be configured in an electronic device, such as a server or a terminal, wherein the terminal specifically includes a computer or a tablet computer, etc. In addition, the method can be applied to Figure 2 The application scenario shown includes a workflow service, a scheduler, a database, a source node, a network node, and a destination node. It can be understood that the cloud host migration method provided in the embodiment of the present disclosure can also be applied in other scenarios.
[0033] like Figure 2As shown, the workflow service can be set in any node in the cloud computing cluster, wherein the cloud computing cluster can be Kubernetes (abbreviated as K8s) computing, etc. The workflow service provides a global management function in the cloud host migration process, and executes the cloud host migration operation based on the workflow service calling the scheduler, database, source node, network node and destination node, that is, the scheduler, database, source node, network node and destination node are uniformly scheduled through the workflow service, thereby realizing the migration of the cloud host and the efficient and orderly operation of the migration process. At the same time, through the unified scheduling of each operation node by the workflow service, the real-time monitoring of each migration operation in the cloud host migration process is realized. Once a migration anomaly is found in the cloud host migration process, the anomaly can be quickly located and handled. At the same time, the workflow service can send the migration status to the user end regularly or in real time at the beginning of the migration, during the migration process and after the migration is completed so that the user can understand the cloud host migration status in time.
[0034] The scheduler can be used to allocate resources to the destination node in the cloud host migration request and to recycle resources after the cloud host migration is completed.
[0035] The database can be used to store and update cloud host information, store and update migration tables, etc.
[0036] The source node is the migration destination of the cloud host to be migrated. It can be used for migration preparation, deletion of the rate limit group during the migration process, disk disconnection, data cleanup, and other operations.
[0037] Network nodes can be used to perform network migration operations during cloud host migration.
[0038] The destination node, i.e., the cloud host migration destination, can be used to perform rate limit group creation operations, disk connection operations, cloud host creation operations, cloud host startup operations, etc.
[0039] Combine the following Figure 2 The application scenario shown is Figure 1 The cloud host migration method shown in the following is introduced. For example, Figure 2 The workflow service in the same schedules the operation nodes to execute the method. Figure 1 As shown, the cloud host migration method provided in this embodiment includes the following steps.
[0040] S110: Receive a cloud host migration request sent by a user terminal, and obtain destination node information corresponding to the cloud host migration request.
[0041] In the disclosed embodiment, the electronic device can receive a cloud host migration request sent by a user terminal in real time.
[0042] Optionally, the electronic device may receive a cloud host migration request sent by a user terminal in real time based on the workflow service.
[0043] In the disclosed embodiment, the cloud host migration request may include source node information such as the IP address and host name of the source node, information about the cluster to which the source node belongs such as the name of the cluster, configuration information of the cloud host to be migrated such as the CPU and disk metadata information, etc. The disk metadata may include IP information for the disk to interact with the storage cluster.
[0044] Specifically, the electronic device can receive the cloud host migration request sent by the user terminal in real time based on the workflow service through network communication or other means, and after receiving the cloud host migration request, determine the destination node based on the configuration information of the cloud host to be migrated in the cloud host migration request, and obtain the destination node information. The destination node information may include information about the cluster to which the destination node belongs, the IP address of the destination node, the host name, metadata information of the destination node, etc.
[0045] S120. Calling an operation node to execute a cloud host migration operation corresponding to the cloud host migration request based on the destination node information.
[0046] In an embodiment of the present disclosure, after acquiring the destination node information, the electronic device calls the operation node based on the destination node information to execute the cloud host migration operation corresponding to the cloud host migration request.
[0047] In the embodiment of the present disclosure, the operation node may include a node for performing cloud host migration operations during the cloud host migration process, such as Figure 2 The scheduler, database, source node, network node and destination node shown in .
[0048] In the embodiments of the present disclosure, the cloud host migration operation may include a migration preparation operation, a network migration operation, a cloud host creation operation of a destination node, a data cleanup operation of a source node, a resource recovery operation, and the like.
[0049] Specifically, after acquiring the destination node information, the electronic device calls the operation node based on the destination node information and the workflow service to execute the cloud host migration operation corresponding to the cloud host migration request.
[0050] S130. In response to a cloud host migration exception occurring in the first operation node, the first operation node and / or the second operation node are called to perform a migration rollback operation so that the source node corresponding to the cloud host migration request is restored to an unmigrated state. The second operation node is the operation node corresponding to the target migration operation that was completed before the cloud host migration exception occurred.
[0051] In an embodiment of the present disclosure, during the process of calling an operation node to perform a cloud host migration operation, in response to a cloud host migration exception occurring at the first operation node, the electronic device calls the first operation node and / or the second operation node to perform a migration rollback operation to restore the source node corresponding to the cloud host migration request to an un-migrated state.
[0052] In the embodiments of the present disclosure, cloud host migration anomalies may include failure of a target operation node executing the cloud host migration operation, operation anomalies, etc.
[0053] Specifically, when the electronic device calls the operation node to perform the cloud host migration operation, it monitors the cloud host migration operations performed by each operation node in the cloud host migration process in real time based on the workflow service, and in response to a cloud host migration exception occurring in the first operation node, it promptly calls the first operation node and / or the second operation node to perform the migration rollback operation from bottom to top in the reverse order of executing the cloud host migration operation, so that the source node corresponding to the cloud host migration request is restored to an unmigrated state, thereby ensuring that when the cloud host migration exception occurs, the source node can be quickly restored to a stable state, so that the cloud host to be migrated can quickly enter a normal operating state.
[0054] Exemplarily, the first operation node is a network node, and the corresponding cloud host migration operation is a network migration operation, that is, an exception occurs in the network node during the execution of the network migration operation. At this time, the target migration operation includes a series of migration operations before executing the network migration operation, such as the migration preparation operation completed by the source node, the migration table update operation completed by the database, and the target node selection operation completed by the scheduler. The second operation node includes the operation nodes corresponding to the above-mentioned Mu Bai migration operation, that is, the source node, the database, and the scheduler.
[0055] In the embodiment of the present disclosure, the specific implementation of the first operation node and / or the second operation node performing the migration rollback operation is similar to the implementation of the existing operation node performing the rollback operation, which is not described in detail here.
[0056] In an embodiment of the present disclosure, a cloud host migration request sent by a user terminal can be received, and destination node information corresponding to the cloud host migration request can be obtained. Based on the destination node information, an operation node is called to execute a cloud host migration operation corresponding to the cloud host migration request. In response to a cloud host migration exception occurring in the first operation node, the first operation node and / or the second operation node is called to execute a migration rollback operation so that the source node corresponding to the cloud host migration request is restored to an unmigrated state. The second operation node is an operation node corresponding to a target migration operation that was completed before the cloud host migration exception occurred. Thus, the operation nodes can be uniformly monitored and managed by uniformly calling the operation nodes to execute the cloud host migration operation corresponding to the cloud host migration request. This allows for timely response to cloud host migration exceptions, and calls the operation node corresponding to the target migration operation that has been completed to execute a migration rollback operation, thereby improving the timeliness of exception handling and the timeliness of restoring the source node to an unmigrated state.
[0057] In an embodiment of the present disclosure, obtaining the destination node information corresponding to the cloud host migration request may specifically include: sending the cloud host migration request to the scheduler, so that the scheduler determines the destination node information corresponding to the cloud host migration request based on the cloud host migration request; and receiving the destination node information returned by the scheduler.
[0058] Specifically, after receiving the cloud host migration request, the electronic device can send the cloud host migration request to the scheduler based on the workflow service, so that after receiving the cloud host migration request, the scheduler can determine multiple clusters that meet the information of the cloud host to be migrated based on the information of the cloud host to be migrated in the cloud host migration request, such as disk size, CPU size, memory size and other configuration information, and determine the destination node from the multiple clusters based on a pre-set node selection strategy, obtain the destination node information, and return the destination node information to the workflow service, and then the workflow service receives the destination node information returned by the scheduler.
[0059] Optionally, the pre-set node selection strategy can be to select the node with the best performance as the destination node based on the configuration information of each node in multiple clusters, or to select the node with the lowest utilization as the destination node based on the current usage status of each node in multiple clusters, etc., without limitation here.
[0060] In the disclosed embodiment, the scheduler can be called through the workflow service to complete the selection of the destination node, and then the destination node information can be obtained, thereby achieving real-time monitoring of the scheduler and the rationality of the destination node selection.
[0061] Furthermore, after receiving the destination node information returned by the scheduler, the database is called to write the target data corresponding to the cloud host migration request into the database, wherein the target data includes source node information, destination node information, migration status information, and the like.
[0062] In an embodiment of the present disclosure, a cloud host migration request includes source node information, and an operation node is called based on the destination node information to execute a cloud host migration operation corresponding to the cloud host migration request. Specifically, the operation may include: calling a source node based on the source node information to execute a migration preparation operation to obtain information about the cloud host to be migrated corresponding to the cloud host migration request; in response to a migration preparation completion message returned by the source node, calling a network node to execute a network migration operation of the cloud host to be migrated based on the information about the cloud host to be migrated; in response to a network migration completion message returned by the network node, calling the source node to execute a speed limit group deletion operation to delete the speed limit group corresponding to the cloud host to be migrated; in response to a speed limit group deletion completion message returned by the source node, calling the destination node to execute a speed limit group creation operation and a disk connection operation of the cloud host to be migrated; in response to the speed limit group creation completion and disk connection completion messages returned by the destination node, calling the destination node to execute a cloud host creation operation.
[0063] In an embodiment of the present disclosure, the migration preparation operation may include a data packaging operation, that is, an operation of collecting and obtaining relevant information of the cloud host to be migrated.
[0064] In the disclosed embodiment, the information of the cloud host to be migrated may include the running status, metadata information, network configuration information, speed limit group information of the cloud host to be migrated, and relevant data information of the cloud host to be migrated. Among them, the running status of the cloud host to be migrated may include the power-on status, the shutdown status, the running status, etc. The metadata information of the cloud host to be migrated may include the disk size of the cloud host to be migrated, the IP information of the disk and the storage cluster interaction, the CPU size, whether the CPU supports box binding, the memory size and other metadata information. The network configuration information of the cloud host to be migrated may include the network IP information, routing information, etc. of the cloud host to be migrated. The speed limit group information of the cloud host to be migrated may include the IP information of the speed limit group, the speed limit bandwidth and other information.
[0065] Specifically, Figure 2 As shown, after receiving the destination node information, the electronic device generates a first notification and sends the first notification to the user end, informing the user end that the migration preparation phase has been entered, and then performs the cloud host migration operation according to the destination node corresponding to the destination node information. Calling the source node based on the workflow service means sending a migration preparation request to the source node according to the information of the source node, wherein the migration preparation request may include identification information of the cloud host to be migrated, etc., so that the source node performs the migration preparation operation after receiving the migration preparation request, and sends a migration preparation completion message to the workflow service when the migration preparation is completed.
[0066] In the embodiment of the present disclosure, the network migration operation can be understood as migrating the network information of the cloud host to be migrated on the source node to the destination node, so that the destination node creates a network card corresponding to the cloud host to be migrated according to the network information.
[0067] Specifically, Figure 2 As shown, after receiving the migration preparation completion message, the electronic device responds to the message by calling the network node based on the workflow service, that is, sending a network migration request to the network node, wherein the network migration request includes the network information of the cloud host to be migrated, so that the network node performs the network migration operation based on the network information of the cloud host to be migrated in the network migration request, and sends a network migration completion message to the workflow service when the network migration operation is completed.
[0068] Furthermore, after receiving the network migration completion message, the electronic device calls the source node based on the workflow service, that is, sends a speed limit group deletion request to the source node, wherein the speed limit group deletion request includes the identification information of the cloud host to be migrated, so that the source node performs the speed limit group deletion operation based on the speed limit group deletion request, and sends a speed limit group deletion completion message to the workflow service when the speed limit group deletion operation is completed.
[0069] In an embodiment of the present disclosure, after receiving a speed limit group deletion completion message, the electronic device calls the destination node based on the workflow service, i.e., sends a speed limit group creation request and a disk connection request to the destination node, wherein the speed limit group creation request includes the speed limit group information of the cloud host to be migrated, and the disk connection request includes the IP information for interaction between the disk and the storage cluster, wherein the disk may be a mounted disk corresponding to the cloud host to be migrated, so that the destination node performs a speed limit group creation operation and a disk connection operation based on the speed limit group creation request and the disk connection request, and after the execution is completed, sends a speed limit group creation completion and a disk connection completion message, wherein the execution order of the speed limit group creation operation and the disk connection operation is not restricted, and may be executed simultaneously, or the speed limit group creation operation may be executed after the disk connection operation is completed, or the speed limit group creation operation may be executed after the disk connection operation is completed.
[0070] like Figure 2 As shown, after the electronic device responds to the speed limit group creation completion and disk connection completion messages returned by the destination node, the workflow service creates a new cloud host information file based on the destination node information, wherein the new cloud host information file can be a file in XML format, and specifically can include relevant information of the cloud host to be migrated in the destination node.
[0071] Furthermore, the workflow service defines a new cloud host information file in the destination node after the new cloud host information file, that is, sends a cloud host creation request to the destination node, wherein the cloud host creation request includes the new cloud host information file, so that the destination node creates a cloud host based on the new cloud host information file, and sends a cloud host creation completion message to the workflow service after the cloud host creation is completed.
[0072] In the disclosed embodiment, the electronic device can implement unified scheduling of the scheduler, database, source node, network node and destination node based on the workflow service, realize global management of each operation node and real-time monitoring of each migration operation during the cloud host migration process.
[0073] In an embodiment of the present disclosure, before calling the source node to perform a migration preparation operation based on the source node information, the cloud host migration method may also include: determining the migration type corresponding to the cloud host migration request; when the migration type is a cold migration, determining the operating status of the cloud host to be migrated, and when the operating status is a power-on state or a running state, sending a shutdown instruction to the source node so that the source node executes the shutdown operation of the cloud host to be migrated.
[0074] When the migration type is hot migration, the running status of the cloud host to be migrated is determined, and when the running status is the power-on state or the running state, a migration preparation request is directly sent to the source node.
[0075] In the embodiments of the present disclosure, the operating status of the cloud host to be migrated can be managed and controlled according to the migration type, which provides convenience for subsequent execution of cloud host migration operations.
[0076] In an embodiment of the present disclosure, after calling the destination node to perform a cloud host creation operation, the cloud host migration method may also include: calling the source node to perform a data cleanup operation; in response to a data cleanup completion message returned by the source node, calling the scheduler to perform a resource recovery operation and update the database; when the database update is completed, sending a migration completion message to the user terminal.
[0077] In the embodiment of the present disclosure, the data cleaning operation may include clearing the information file of the cloud host to be migrated in the source node, that is, the file in the source node used to store information related to the cloud host to be migrated, disconnecting the disk of the cloud host to be migrated, etc.
[0078] The resource recovery operation can be understood as the release operation of the resources corresponding to the cloud host to be migrated in the source node, so as to facilitate the subsequent reuse of the resources.
[0079] Specifically, Figure 2 As shown, after responding to the successful creation message of the cloud host of the destination node, the electronic device sends a cloud host power-on request to the destination node based on the workflow service, so that the destination node performs a power-on operation on the created cloud host, and returns a cloud host power-on success message when the power-on is successful. When the cloud host power-on success message is received, it indicates that the created cloud host can operate normally on the destination node.
[0080] Furthermore, based on the workflow service, a data cleanup request is sent to the source node so that the source node performs a data cleanup operation, and in response to the data cleanup completion message, the scheduler is called based on the workflow service to perform a resource recovery operation, and when the resource recovery is completed, a resource recovery completion message is returned.
[0081] In response to the resource recycling completion message, the workflow service sends a database update request to the database, wherein the database update request includes the identification information of the newly created cloud host in the destination node, so that the database performs data update based on the database update request, that is, updates the data table used to store information of multiple cloud hosts in the cluster, such as the instance table, and marks the state of the newly created cloud host in the data table as the start state, and sends a migration completion message to the user end in response to the completion of the database update. Figure 2 The second notification shown in .
[0082] In the disclosed embodiments, each operation node can be uniformly scheduled based on the workflow service to achieve the effect of global management of each operation node. As a result, the migration operations of each operation node during the migration process can be monitored in real time, and abnormalities in the migration process can be discovered in time. When an abnormality occurs, the operation nodes corresponding to each target migration operation that has been completed before the cloud host migration abnormality occurs can be called based on the workflow service to perform a rollback operation, which facilitates the management and control of the rollback operation, reduces the complexity of exception handling during the migration process, and improves the efficiency and timeliness of exception handling.
[0083] Figure 3 It is a structural diagram of a cloud host migration device provided by an embodiment of the present disclosure.
[0084] In the disclosed embodiment, the cloud host migration device can be set in an electronic device, which is understood as a part of the functional modules in the above electronic device. Specifically, the electronic device can be a server or a terminal, wherein the terminal specifically includes a computer or a tablet computer, etc., which is not limited here.
[0085] like Figure 3 As shown, the cloud host migration device 300 may include a request receiving module 310 , a migration module 320 and an exception handling module 330 .
[0086] The request receiving module 310 may be configured to receive a cloud host migration request sent by a user terminal, and obtain destination node information corresponding to the cloud host migration request.
[0087] The migration module 320 may be configured to call an operation node to execute a cloud host migration operation corresponding to a cloud host migration request based on the destination node information.
[0088] The exception handling module 330 can be used to call the first operation node and / or the second operation node to perform a migration rollback operation in response to a cloud host migration exception occurring in the first operation node, so as to restore the source node corresponding to the cloud host migration request to an unmigrated state, where the second operation node is the operation node corresponding to the target migration operation that was completed before the cloud host migration exception occurred.
[0089] In an embodiment of the present disclosure, a cloud host migration request sent by a user terminal can be received, and destination node information corresponding to the cloud host migration request can be obtained. Based on the destination node information, an operation node is called to execute a cloud host migration operation corresponding to the cloud host migration request. In response to a cloud host migration exception occurring in the first operation node, the first operation node and / or the second operation node is called to execute a migration rollback operation so that the source node corresponding to the cloud host migration request is restored to an unmigrated state. The second operation node is an operation node corresponding to a target migration operation that was completed before the cloud host migration exception occurred. Thus, the operation nodes can be uniformly monitored and managed by uniformly calling the operation nodes to execute the cloud host migration operation corresponding to the cloud host migration request. This allows for timely response to cloud host migration exceptions, and calls the operation node corresponding to the target migration operation that has been completed to execute a migration rollback operation, thereby improving the timeliness of exception handling and the timeliness of restoring the source node to an unmigrated state.
[0090] In some embodiments of the present disclosure, the request receiving module 310 can be specifically used to send a cloud host migration request to a scheduler, so that the scheduler determines the destination node information corresponding to the cloud host migration request based on the cloud host migration request; and receives the destination node information returned by the scheduler.
[0091] In some embodiments of the present disclosure, the cloud host migration request includes source node information.
[0092] The migration module 320 can be specifically used to call the source node to perform migration preparation operations based on the source node information, and obtain the information of the cloud host to be migrated corresponding to the cloud host migration request; in response to the migration preparation completion message returned by the source node, call the network node to perform the network migration operation of the cloud host to be migrated based on the information of the cloud host to be migrated; in response to the network migration completion message returned by the network node, call the source node to perform the speed limit group deletion operation to delete the speed limit group corresponding to the cloud host to be migrated; in response to the speed limit group deletion completion message returned by the source node, call the destination node to perform the speed limit group creation operation and disk connection operation of the cloud host to be migrated; in response to the speed limit group creation completion and disk connection completion messages returned by the destination node, call the destination node to perform the cloud host creation operation.
[0093] In some embodiments of the present disclosure, the cloud host migration device 300 may further include a shutdown processing module.
[0094] The shutdown processing module can be used to determine the migration type corresponding to the cloud host migration request before calling the source node to perform the migration preparation operation based on the source node information; when the migration type is cold migration, a shutdown instruction is sent to the source node to enable the source node to perform the shutdown operation of the cloud host to be migrated.
[0095] In some embodiments of the present disclosure, the information of the cloud host to be migrated includes the running status, metadata information, network configuration information, and speed limit group information of the cloud host to be migrated.
[0096] In some embodiments of the present disclosure, the cloud host migration device 300 may further include a data processing module.
[0097] The data processing module can be used to call the source node to perform a data cleanup operation after calling the destination node to perform a cloud host creation operation; in response to the data cleanup completion message returned by the source node, call the scheduler to perform a resource recovery operation and update the database; when the database update is completed, send a migration completion message to the user end.
[0098] It should be noted that Figure 3 The cloud host migration device 300 shown can execute each step in the above method embodiment and realize each process and effect in the above method embodiment, which will not be described in detail here.
[0099] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure.
[0100] In the disclosed embodiment, Figure 4 The electronic device shown may be a server or a terminal, wherein the terminal specifically includes a computer or a tablet computer, etc., which is not limited here.
[0101] like Figure 4 As shown, the electronic device may include a processor 410 and a memory 420 storing computer program instructions.
[0102] Specifically, the processor 410 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.
[0103] The memory 420 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 420 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 420 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 420 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 420 is a non-volatile solid-state memory. In a particular embodiment, the memory 420 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.
[0104] The processor 410 reads and executes the computer program instructions stored in the memory 420 to perform the steps of the cloud host migration method provided in the embodiment of the present disclosure.
[0105] In one example, the electronic device may further include a transceiver 430 and a bus 440. Figure 4 As shown, the processor 410, the memory 420 and the transceiver 430 are connected via a bus 440 and communicate with each other.
[0106] The bus 440 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 440 may include one or more buses.
[0107] The embodiments of the present disclosure also provide a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the cloud host migration method provided by the embodiments of the present disclosure.
[0108] The above-mentioned storage medium may, for example, include a memory 420 of computer program instructions, and the above-mentioned instructions may be executed by the processor 410 of the electronic device to complete the cloud host migration method provided in the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0109] The embodiments of the present disclosure also provide a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the cloud host migration method provided by the embodiments of the present disclosure is implemented, and the various processes and effects in the above-mentioned embodiments of the present disclosure can be implemented, which will not be repeated here.
[0110] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. 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 disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A cloud host migration method, characterized in that: include: Receive a cloud host migration request sent by a user terminal, and obtain destination node information corresponding to the cloud host migration request; Invoke an operation node based on the destination node information to execute a cloud host migration operation corresponding to the cloud host migration request; In response to a cloud host migration exception occurring in the first operation node, the first operation node and / or the second operation node is called to perform a migration rollback operation to restore the source node corresponding to the cloud host migration request to an unmigrated state. The second operation node is the operation node corresponding to the target migration operation that was completed before the cloud host migration exception occurred.
2. The method according to claim 1, characterized in that The obtaining of the destination node information corresponding to the cloud host migration request includes: Sending the cloud host migration request to a scheduler, so that the scheduler determines the destination node information corresponding to the cloud host migration request based on the cloud host migration request; Receive the destination node information returned by the scheduler.
3. The method according to claim 1, characterized in that The cloud host migration request includes source node information, and the calling of the operation node based on the destination node information to perform the cloud host migration operation corresponding to the cloud host migration request includes: Based on the source node information, the source node is called to perform a migration preparation operation, and the to-be-migrated cloud host information corresponding to the cloud host migration request is obtained; In response to a migration preparation completion message returned by the source node, calling a network node based on the information of the cloud host to be migrated to perform a network migration operation of the cloud host to be migrated; In response to a network migration completion message returned by the network node, calling the source node to perform a rate limit group deletion operation to delete the rate limit group corresponding to the cloud host to be migrated; In response to the rate limit group deletion completion message returned by the source node, calling the destination node to perform the rate limit group creation operation and the disk connection operation of the cloud host to be migrated; In response to the rate limit group creation completion and disk connection completion messages returned by the destination node, the destination node is called to perform a cloud host creation operation.
4. The method according to claim 3, characterized in that Before calling the source node to perform a migration preparation operation based on the source node information, the method further includes: Determine a migration type corresponding to the cloud host migration request; When the migration type is cold migration, a shutdown instruction is sent to the source node so that the source node executes a shutdown operation of the cloud host to be migrated.
5. The method according to claim 3, characterized in that: The information of the cloud host to be migrated includes the running status, metadata information, network configuration information, and speed limit group information of the cloud host to be migrated.
6. The method according to claim 3, characterized in that After calling the destination node to perform a cloud host creation operation, the method further includes: Calling the source node to perform a data cleaning operation; In response to the data cleanup completion message returned by the source node, calling the scheduler to perform resource recovery operations and update the database; When the database update is completed, a migration completion message is sent to the user terminal.
7. A cloud host migration device, characterized in that: include: A request receiving module, used to receive a cloud host migration request sent by a user terminal, and obtain destination node information corresponding to the cloud host migration request; A migration module, configured to call an operation node based on the destination node information to execute a cloud host migration operation corresponding to the cloud host migration request; An exception handling module is used to call the first operation node and / or the second operation node to perform a migration rollback operation in response to a cloud host migration exception occurring in the first operation node, so as to restore the source node corresponding to the cloud host migration request to an unmigrated state, wherein the second operation node is the operation node corresponding to the target migration operation that was completed before the cloud host migration exception occurred.
8. An electronic device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the cloud host migration method described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the processor implements the cloud host migration method described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program or instructions, characterized in that: When the computer program or instruction is executed by the processor, the cloud host migration method according to any one of claims 1 to 6 is implemented.
