Cloud tenant network element migration check method
Through a cloud tenant network element migration inspection method, the problem of difficulty in confirming the completion of migration and configuration inspection during tenant migration in the cloud computing environment is solved, and the effect of quickly monitoring the migration status and improving configuration inspection efficiency is achieved.
Patent Information
- Application Number
- PCT/CN2024/138857
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-12
- Filing Date
- 2024-12-12
- Publication Date
- 2025-06-19
AI Technical Summary
In a cloud computing environment, it is difficult for tenants to accurately confirm the migration completion time when migrating network resources, resulting in the inability to timely understand the availability and status of network resources, and the configuration check takes a long time, especially when the configuration volume is large, the time cost is high.
A method for migration inspection of network element of the cloud tenant on-cloud is proposed, including sorting out the list of tenants to be migrated, obtaining cloud network resource data, generating configuration checkpoint lists, performing inspection tasks concurrently, summarizing inspection results and outputting exception information. This method improves the efficiency and scalability of configuration checking by defining a configuration checklist and a check task set.
Through this method, tenants can quickly monitor and confirm the migration status, improve the system availability and configuration check efficiency, reduce time costs, and have clear system structure and strong scalability, adapt to network configuration changes.
Smart Images

Figure CN2024138857_19062025_PF_FP_ABST
Abstract
Description
A method for checking tenant network element migration on the cloud
[0001] This application claims priority to the Chinese patent application filed on December 12, 2023, with application number 202311703093.X and entitled “A method for checking migration of tenant network elements on the cloud”, the entire text of which is hereby incorporated by reference. Technical Field
[0002] The present application relates to the field of cloud computing technology, and in particular to a method for checking migration of tenant network elements on a cloud. Background Art
[0003] In a cloud computing environment, tenants are entities that use cloud services. Terms such as VPC, EIP, and BGP represent fundamental network concepts in cloud computing. Cloud networks typically consist of a control plane and a forwarding plane. The control plane configures and manages network services, while the forwarding plane handles actual data transmission. To improve network availability and resiliency, tenants may need to migrate their resources to different cloud regions, which involves network configuration changes and migration processes.
[0004] Elastic Public IP (EIP) allows tenants to dynamically allocate and release public IP addresses and bind them to various cloud resources, providing more flexible network configuration. BGP, as the Border Gateway Protocol, is used to exchange routing information between autonomous systems and supports dynamic routing to ensure network stability and reachability. The control plane and forwarding plane of the cloud network are responsible for configuration distribution and actual data transmission, respectively, achieving logical separation of the network.
[0005] Because the network control plane asynchronously distributes configurations to different network elements, tenants struggle to accurately confirm migration completion during the migration process. This prevents tenants from timely understanding the availability and status of their network resources. Tenants have multiple network resource configurations on network elements, and checking each configuration individually is time-consuming. Especially when the number of configurations is large, the time consumed is proportional to the number of configurations, exceeding minutes for large configurations. Confirming each configuration individually is relatively time-consuming and hinders rapid monitoring of tenant migration status. As the network evolves, new network elements may be introduced, requiring rapid adaptation and confirmation of the correct distribution of new configurations to ensure normal network operation. Summary of the Invention
[0006] This application aims to solve at least one of the technical problems in the related art to a certain extent. To this end, one purpose of this application is to propose a method for checking tenant network element migration on the cloud, which improves the availability, scalability and efficiency of configuration checking of the system.
[0007] One aspect of the present application provides a method for checking migration of tenant network elements on a cloud, including:
[0008] Step S100: sorting out the list of tenants to be migrated.
[0009] The list of tenants to be migrated refers to a list used to store IDs of tenants to be migrated and network resource information of tenants to be migrated.
[0010] The specific method for sorting out the list of tenants to be migrated is: the operation and maintenance personnel input the list of tenants to be migrated, and the list of tenants to be migrated stores the IDs of the tenants to be migrated and the network resource information corresponding to the tenants to be migrated. The network resource information includes but is not limited to cloud network resource data.
[0011] Step S200: Obtain cloud network resource data according to the list of tenants to be migrated.
[0012] The cloud network resource data refers to the network resources owned by the tenant in the cloud environment, including but not limited to the following elements: VPC, subnet, router, ACL, EIP.
[0013] The method for obtaining cloud network resource data based on the list of tenants to be migrated is as follows: based on the input list of tenants to be migrated, the tenant to be migrated is identified, the API provided by the cloud service is used to query the network resource information stored in the cloud environment of the tenant to be migrated through the ID of the tenant to be migrated in the list of tenants to be migrated, response data is obtained, and the response data of the API is parsed to extract the cloud network resource data.
[0014] Step S300: Generate a configuration checkpoint list for each tenant to be migrated using the check items in the defined configuration checklist.
[0015] The configuration checklist includes the following check items: EIP check items and VPC check items. The EIP refers to the independent public IP resources provided by the elastic public IP, including the public IP address and public network bandwidth. The VPC refers to the virtual private cloud.
[0016] The inspection items include: EIP inspection items and VPC inspection items.
[0017] The configuration checkpoint list refers to: storing the execution results of each check item that needs to be performed during the migration process, and ensuring that the network configuration of the tenant to be migrated is correct during the migration process. The configuration checkpoint list includes: the tenant ID to be migrated, the check item, the execution result of the check task, and the exception information.
[0018] The specific method of generating a configuration check task list for each tenant to be migrated using the check items in the defined configuration check list is as follows: define a configuration check list in the system, the configuration check list includes the check items that need to be checked, traverse the list of tenants to be migrated, and for each tenant to be migrated, create a configuration checkpoint list to store the inspection task execution results of each check item.
[0019] Step S400: traverse the check items in the configuration checklist of each tenant to be migrated, generate check tasks using the check items, aggregate the check tasks and add them to the task execution queue to obtain the network element Host granularity;
[0020] The inspection task set is composed of inspection tasks, and the inspection tasks include inspection items, task execution methods, task main methods, and task keywords. The task keywords are used to uniquely identify the tasks and are related to the network element Host that executes the tasks. The inspection tasks are determined to be executed by the corresponding task execution queue based on the task keywords. The task main method refers to the core method for executing the inspection task, and the task execution method refers to the method for executing the inspection task. The system executes the inspection task according to the task execution method.
[0021] The method of traversing the check items in the configuration checklist of each tenant to be migrated, using the check items to generate check tasks, summarizing the check tasks and adding them to the task execution queue to obtain the specific method of network element Host granularity is as follows: constructing a to-be-checked list object, which includes a to-be-migrated tenant list, a configuration checklist and a task execution method; for each to-be-migrated tenant in the to-be-migrated tenant list, traversing the check items in the configuration checklist, registering each check item with the to-be-checked list object, and generating an inspection task by executing the registered check items. The inspection task includes a task execution method, a task body method, and a task keyword; summarizing the generated inspection tasks to obtain an inspection task set, obtaining the index of the task execution queue, adding the inspection task to the corresponding task execution queue, waiting for the configuration task to be executed, and obtaining the network element Host that executes the inspection task.
[0022] The method of obtaining the subscript of the task execution queue and adding the inspection task to the corresponding task execution queue adopts the Index algorithm to ensure that the inspection tasks of the same network element Host are placed in the same task execution queue. The calculation expression of the subscript Index is: Index = crc32.ChecksumIEEE(key)%len(queue_len), wherein key is a keyword used to determine the position of the inspection task in the task execution queue, crc32.ChecksumIEEE(key) indicates that the checksum of the key is calculated using the CRC32 checksum algorithm and the ChecksumIEEE function, and %len(queue_len) indicates that the obtained CRC32 checksum value is modulo the length of the task execution queue to ensure that the index value is within the length of the task execution queue to prevent out-of-bounds.
[0023] Step S500: concurrently executing inspection tasks at the network element Host granularity to obtain inspection task execution results.
[0024] The specific method for concurrently executing inspection tasks at the network element Host granularity and obtaining the inspection task execution results is: create threads with a number of threads corresponding to the length of the task execution queue, each thread executes an inspection task in the task execution queue one by one, each inspection task contains an inspection item, and the inspection item contains a task execution method, and the result of each execution is added to the inspection task execution result. The inspection task execution result includes a method for setting the corresponding subject task result and a method for obtaining the overall execution demerit.
[0025] Step S600: After all inspection tasks in the inspection task set are completed, the inspection task execution results of the tenants to be migrated are summarized, and the tenants to be migrated with abnormal inspection items are output, along with abnormal information.
[0026] The inspection task execution result of the tenant to be migrated refers to the execution result of the inspection item for each tenant to be migrated during the migration configuration inspection process of the tenant to be migrated.
[0027] The tenant to be migrated with abnormal check items refers to a tenant to be migrated whose configuration migration is abnormally detected during the migration configuration check process of the tenant to be migrated.
[0028] After all inspection tasks in the inspection task set are completed, the inspection task execution results of the tenants to be migrated are summarized, and the tenants to be migrated with abnormal inspection items are output, and the specific method of outputting abnormal information is as follows:
[0029] Determine the inspector type, which includes: line inspector, regional inspector, and new inspector;
[0030] Export the inspection items corresponding to the network element Host and check whether the service configuration corresponding to the inspection items of the network element Host is cached locally. The service configuration includes VPC and EIP.
[0031] If the service configuration is not cached, the SSH protocol is used to execute the network element configuration export command on the network element Host. The network element configuration export command is a batch command used to export all such service configurations corresponding to the network element Host; the exported service configuration is divided into a service configuration list, the service configuration list is cached in the memory, and the service configuration list is returned;
[0032] If there is cached business configuration, the business configuration list is directly obtained from the cache;
[0033] Check whether the configuration keyword exists in a configuration item in the business configuration list. If so, the configuration is normal. If not, it indicates a migration exception. Output the exception information and the tenants to be migrated corresponding to the exception check item.
[0034] The method for dividing the exported service configuration into the service configuration list is as follows: when the checker type is a row checker, the service configuration is divided using a row division method, wherein the row checker checks whether each row in the network element Host configuration contains key configuration information; when the checker type is a region checker, the service configuration is divided using a region division method, wherein the region checker checks whether each region in the network element Host configuration contains key configuration information;
[0035] The method for creating the newly added checker is as follows: writing a network element configuration export instruction for batch exporting network element Host; using the NewSshInfoLister method to pass the network element configuration export instruction as a parameter to create a new configuration Lister; using the NewLineChecker method to pass the configuration Lister as a creation parameter to create a configuration checker to obtain the newly added checker;
[0036] The configuration Lister is a component used to obtain configuration information. It executes a network element configuration export instruction on the network element Host using the SSH protocol and processes the exported configuration information into a format usable by the system.
[0037] Step S700: Return -1 if there is an abnormal check item in the check task execution result, and return 0 if there is no abnormal check item.
[0038] One aspect of the present application provides a cloud tenant network element migration inspection system, including:
[0039] The tenant list acquisition module is used to sort out the list of tenants to be migrated;
[0040] A cloud resource data acquisition module is used to obtain cloud network resource data based on the list of tenants to be migrated;
[0041] A configuration list generation module is used to generate a configuration checkpoint list for each tenant to be migrated using the check items in the defined configuration checklist;
[0042] The check task generation module is used to traverse the check items in the configuration checklist of each tenant to be migrated, generate check tasks based on the check items, aggregate the check tasks and add them to the task execution queue to obtain the network element host granularity;
[0043] The inspection result acquisition module is used to concurrently execute inspection tasks at the network element Host granularity and obtain the inspection task execution results;
[0044] The exception information output module is used to summarize the inspection task execution results of the tenants to be migrated after all inspection tasks in the inspection task set are completed, output the tenants to be migrated with abnormal inspection items, and output the exception information;
[0045] The execution result return module is used to return -1 if there are abnormal check items in the inspection task execution results, and return 0 if there are no abnormal check items.
[0046] One aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in a method for checking tenant network element migration on a cloud are implemented.
[0047] One aspect of the present application provides a readable storage medium, which stores a computer program, and the computer program is suitable for loading by a processor to execute the steps in a cloud tenant network element migration inspection method.
[0048] The cloud tenant network element migration inspection method proposed in this application has the following advantages over the existing technology:
[0049] By checking the key configurations of tenants to be migrated on the network element Host, you can ensure the migration of tenant configurations is complete or detect migration anomalies as early as possible. By configuring a checkpoint list and check task set, a configuration check task is generated for each tenant to be migrated, thereby monitoring and confirming the status of tenant migration.
[0050] A cloud tenant network element migration inspection system is organized by configuring a checklist, inspection items, inspection tasks, and inspection task execution result structure. The system has a clear structure and strong scalability, making it easy to expand and add new inspection items, making the system more flexible and adaptable to network configuration changes.
[0051] During the configuration check process, the NE configuration export command is used to obtain the configuration and cache the configuration in memory. This avoids frequent SSH calls to the NE command when checking the same type of configuration on the same NE Host each time, greatly improving the efficiency of configuration checks. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] FIG1 is an overall flow chart of a migration configuration check method for checking a tenant network element migration on a cloud provided by this application;
[0053] FIG2 is a flowchart of an inspection task generation method for inspecting a cloud tenant network element migration provided by this application;
[0054] FIG3 is a schematic structural diagram of an electronic device provided by the present application;
[0055] FIG4 is a schematic diagram of the structure of a readable storage medium provided by this application. DETAILED DESCRIPTION
[0056] For a better understanding of the present application, various aspects of the present application will be described in more detail with reference to the accompanying drawings. It should be understood that these detailed descriptions are merely descriptions of exemplary embodiments of the present application and are not intended to limit the scope of the present application in any way. Throughout the specification, the same reference numerals refer to the same elements. The expression "and / or" includes any and all combinations of one or more of the associated listed items.
[0057] In the accompanying drawings, the size, dimensions, and shapes of the elements have been slightly adjusted for ease of illustration. The accompanying drawings are for illustration only and are not drawn strictly to scale. As used herein, the terms "substantially," "approximately," and similar terms are used to indicate approximations, not degrees, and are intended to illustrate inherent deviations in measurements or calculations that would be recognized by a person of ordinary skill in the art. In addition, in this application, the order in which the steps are described does not necessarily represent the order in which these steps would occur in actual operation, unless otherwise specified or inferred from the context.
[0058] It should also be understood that expressions such as "comprises," "including," "having," "includes," and / or "comprising" are open rather than closed expressions in this specification, indicating the presence of the stated features, elements, and / or components, but do not exclude the presence of one or more other features, elements, components, and / or combinations thereof. In addition, when expressions such as "at least one of..." appear after a list of listed features, they modify the entire list of features rather than just the individual elements in the list. In addition, when describing embodiments of the present application, "may" is used to mean "one or more embodiments of the present application." And, the term "exemplary" is intended to refer to an example or illustration.
[0059] Unless otherwise defined, all words used herein (including engineering terms and scientific and technological terms) have the same meaning as commonly understood by those skilled in the art to which this application belongs. It should also be understood that, unless otherwise specified in this application, words defined in commonly used dictionaries should be interpreted as having the same meaning as they do in the context of the relevant technology, and should not be interpreted in an idealized or overly formal sense.
[0060] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0061] Example 1
[0062] As shown in Figure 1, this application provides a general flow chart of a migration configuration check method for checking a tenant network element migration on a cloud, including:
[0063] Step S100: sorting out the list of tenants to be migrated.
[0064] The list of tenants to be migrated refers to a list used to store IDs of tenants to be migrated and network resource information of tenants to be migrated.
[0065] The specific method for sorting out the list of tenants to be migrated is: the operation and maintenance personnel input the list of tenants to be migrated, and the list of tenants to be migrated stores the IDs of the tenants to be migrated and the network resource information corresponding to the tenants to be migrated. The network resource information includes but is not limited to cloud network resource data.
[0066] Step S200: Obtain cloud network resource data according to the list of tenants to be migrated.
[0067] The cloud network resource data refers to the network resources owned by the tenant in the cloud environment, including but not limited to the following elements: VPC, subnet, router, ACL, EIP.
[0068] The method for obtaining cloud network resource data based on the list of tenants to be migrated is as follows: based on the input list of tenants to be migrated, the tenant to be migrated is identified, the API provided by the cloud service is used to query the network resource information stored in the cloud environment of the tenant to be migrated through the ID of the tenant to be migrated in the list of tenants to be migrated, response data is obtained, and the response data of the API is parsed to extract the cloud network resource data.
[0069] Step S300: Generate a configuration checkpoint list for each tenant to be migrated using the check items in the defined configuration checklist.
[0070] The configuration checklist is defined during the system design phase and is prepared by a system architect or network engineer based on business needs and migration task requirements. It includes network configuration elements that need to be checked and corresponding inspection methods.
[0071] The configuration checklist includes the following check items: EIP check items and VPC check items. The EIP refers to the independent public IP resources provided by the elastic public IP, including the public IP address and public network bandwidth. The VPC refers to the virtual private cloud.
[0072] The inspection items include: EIP inspection items and VPC inspection items.
[0073] The configuration checkpoint list refers to: storing the execution results of each check item that needs to be performed during the migration process, and ensuring that the network configuration of the tenant to be migrated is correct during the migration process. The configuration checkpoint list includes: the tenant ID to be migrated, the check item, the execution result of the check task, and the exception information.
[0074] The specific method of generating a configuration check task list for each tenant to be migrated using the check items in the defined configuration check list is as follows: define a configuration check list in the system, the configuration check list includes the check items that need to be checked, traverse the list of tenants to be migrated, and for each tenant to be migrated, create a configuration checkpoint list to store the inspection task execution results of each check item.
[0075] As shown in Figure 2, this is a flowchart of the inspection task generation of a cloud tenant network element migration inspection method provided by this application.
[0076] Step S400: traverse the check items in the configuration checklist of each tenant to be migrated, generate check tasks using the check items, aggregate the check tasks and add them to the task execution queue to obtain the network element Host granularity.
[0077] The inspection task set is composed of inspection tasks, and the inspection tasks include inspection items, task execution methods, task main methods, and task keywords. The task keywords are used to uniquely identify the tasks and are related to the network element Host that executes the tasks. The inspection tasks are determined to be executed by the corresponding task execution queue based on the task keywords. The task main method refers to the core method for executing the inspection task, and the task execution method refers to the method for executing the inspection task. The system executes the inspection task according to the task execution method.
[0078] The method of traversing the check items in the configuration checklist of each tenant to be migrated, using the check items to generate check tasks, summarizing the check tasks and adding them to the task execution queue to obtain the specific method of network element Host granularity is as follows: constructing a to-be-checked list object, which includes a to-be-migrated tenant list, a configuration checklist and a task execution method; for each to-be-migrated tenant in the to-be-migrated tenant list, traversing the check items in the configuration checklist, registering each check item with the to-be-checked list object, and generating an inspection task by executing the registered check items. The inspection task includes a task execution method, a task body method, and a task keyword; summarizing the generated inspection tasks to obtain an inspection task set, obtaining the index of the task execution queue, adding the inspection task to the corresponding task execution queue, waiting for the configuration task to be executed, and obtaining the network element Host that executes the inspection task.
[0079] The method of obtaining the subscript of the task execution queue and adding the inspection task to the corresponding task execution queue adopts the Index algorithm to ensure that the inspection tasks of the same network element Host are placed in the same task execution queue. The calculation expression of the subscript Index is: Index = crc32.ChecksumIEEE(key)%len(queue_len), wherein key is a keyword used to determine the position of the inspection task in the task execution queue, crc32.ChecksumIEEE(key) indicates that the checksum of the key is calculated using the CRC32 checksum algorithm and the ChecksumIEEE function, and %len(queue_len) indicates that the obtained CRC32 checksum value is modulo the length of the task execution queue to ensure that the index value is within the length of the task execution queue to prevent out-of-bounds.
[0080] The VPC inspection item generates inspection tasks such as VPC, Subnet, routing, and NAT configuration on each VPC network element Host.
[0081] EIP check items generate tasks to check BGP configuration and traffic diversion configuration on each access NE, and check rate limit configuration and traffic diversion configuration on each rate limit NE Host.
[0082] Step S500: concurrently executing inspection tasks at the network element Host granularity to obtain inspection task execution results.
[0083] The host granularity refers to the operation performed in units of the host of a network element in the network architecture. This operation improves the concurrent performance of the system and the hosts do not interfere with each other.
[0084] The purpose of executing inspection tasks concurrently is that when executing n inspection tasks in the same time period, the system will process the inspection tasks on each host or device at the same time, thereby improving system efficiency, especially being able to quickly complete inspection tasks in large-scale networks.
[0085] The inspection task execution result refers to: the result obtained by executing each inspection task according to the task execution method, and the inspection task execution result includes normal inspection items and abnormal inspection items.
[0086] The normal check items refer to all check items of the tenant configuration migration to be migrated being normal.
[0087] The abnormal check item refers to the presence of abnormal check items in the check task executed by the migration configuration of the tenant to be migrated.
[0088] The specific method for concurrently executing inspection tasks at the network element Host granularity and obtaining the inspection task execution results is: create threads with a number of threads corresponding to the length of the task execution queue, each thread executes an inspection task in the task execution queue one by one, each inspection task contains an inspection item, and the inspection item contains a task execution method, and the result of each execution is added to the inspection task execution result. The inspection task execution result includes a method for setting the corresponding subject task result and a method for obtaining the overall execution demerit.
[0089] The same network element host is in the same task execution queue, so inspection tasks on the same network element host will not be executed concurrently, avoiding putting pressure on the network element host and affecting normal service forwarding.
[0090] Different network element hosts can be in different task execution queues, and the inspection tasks of different network element hosts can be executed on different threads, improving system concurrency and configuration inspection efficiency.
[0091] Step S600: After all inspection tasks in the inspection task set are completed, the inspection task execution results of the tenants to be migrated are summarized, and the tenants to be migrated with abnormal inspection items are output, along with abnormal information.
[0092] The inspection task execution result of the tenant to be migrated refers to the execution result of the inspection item for each tenant to be migrated during the migration configuration inspection process of the tenant to be migrated.
[0093] The tenant to be migrated with abnormal check items refers to a tenant to be migrated whose configuration migration is abnormally detected during the migration configuration check process of the tenant to be migrated.
[0094] The abnormal information refers to the information about abnormal inspection items in the inspection task.
[0095] After all inspection tasks in the inspection task set are completed, the inspection task execution results of the tenants to be migrated are summarized, and the tenants to be migrated with abnormal inspection items are output, and the specific method of outputting abnormal information is as follows:
[0096] Determine the inspector type, which includes: row inspector, regional inspector, and newly added inspector.
[0097] Export the inspection items corresponding to the network element Host and check whether the service configuration corresponding to the inspection items of the network element Host is cached locally. The service configuration includes VPC and EIP.
[0098] If the service configuration is not cached, the SSH protocol is used to execute the network element configuration export instruction on the network element Host. The network element configuration export instruction is a batch instruction used to export all such service configurations corresponding to the network element Host; the exported service configuration is divided into a service configuration list, the service configuration list is cached in the memory, and the service configuration list is returned.
[0099] If there is cached business configuration, the business configuration list is obtained directly from the cache.
[0100] Check whether the configuration keyword exists in a configuration item in the business configuration list. If so, the configuration is normal. If not, it indicates a migration exception. Output the exception information and the tenants to be migrated corresponding to the exception check item.
[0101] The method for dividing the exported business configuration into a business configuration list is: when the inspector type is a row inspector, the business configuration is divided using a row division method, and the row inspector checks whether each row in the network element Host configuration contains key configuration information; when the inspector type is a region inspector, the business configuration is divided using a region division method, and the region inspector checks whether each region in the network element Host configuration contains key configuration information.
[0102] The inspector is a component that performs inspection tasks and is used to perform specific inspection tasks, including: row inspectors, area inspectors, and new inspectors.
[0103] The purpose of directly obtaining the service configuration list from the cache if there is a cached service configuration is to avoid repeatedly obtaining the same service configuration of the same network element Host, thereby improving execution efficiency.
[0104] The method for creating the newly added checker is: write a network element configuration export instruction for batch exporting the network element Host; use the NewSshInfoLister method to pass the network element configuration export instruction as a parameter to create a new configuration Lister; use the NewLineChecker method to use the configuration Lister as a creation parameter to create a configuration checker to obtain the newly added checker.
[0105] The configuration Lister is a component used to obtain configuration information. It executes a network element configuration export instruction on the network element Host using the SSH protocol and processes the exported configuration information into a format usable by the system.
[0106] The NewSshInfoLister method and the NewLineChecker method are commonly used technical means in this field and will not be described in detail here.
[0107] Step S700: Return -1 if there is an abnormal check item in the check task execution result, and return 0 if there is no abnormal check item.
[0108] The statement "when there is an abnormal check item in the inspection task execution result, -1 is returned, and when there is no abnormal check item, 0 is returned" means: when there is an abnormal check item in the inspection task execution result, -1 is returned to indicate that the abnormal check item has failed; when the inspection task execution result is normal, it indicates that the migration configuration is normal, and 0 is returned to continue subsequent operations.
[0109] Example 2
[0110] An embodiment provided in this application includes the following steps:
[0111] Obtain a list of tenants to be migrated whose network resources need to be migrated, and have the operation and maintenance personnel enter relevant information about the tenants to be migrated.
[0112] Migrate tenants' network resources from the Transit Gateway (TGW) NE to the Virtual Private Cloud Gateway (VPCGW) NE to ensure that tenants' network traffic can pass through the new VPCGW NE.
[0113] Use specific configuration verification tools to verify the configuration and ensure that the network resource configuration after migration is correct. This includes checking the network configuration, security settings, routing tables, etc. to ensure the consistency and correctness of the configuration.
[0114] Operations and maintenance personnel observe network devices or use logs and monitoring tools to check whether traffic passes through the new VPCGW network element as expected and ensure that no anomalies or errors occur.
[0115] The embodiments described above are only preferred specific implementation methods of the present application. Common changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included in the protection scope of the present invention.
[0116] Example 3
[0117] This application provides a cloud tenant network element migration inspection system, including:
[0118] The tenant list acquisition module is used to sort out the list of tenants to be migrated.
[0119] The cloud resource data acquisition module is used to obtain cloud network resource data based on the list of tenants to be migrated.
[0120] The configuration list generation module is used to generate a configuration checkpoint list for each tenant to be migrated using the check items in the defined configuration checklist.
[0121] The inspection task generation module is used to traverse the inspection items in the configuration inspection list of each tenant to be migrated, generate inspection tasks using the inspection items, summarize the inspection tasks and add them to the task execution queue to obtain the network element Host granularity.
[0122] The inspection result acquisition module is used to concurrently execute inspection tasks at the network element Host granularity and obtain the inspection task execution results.
[0123] The exception information output module is used to summarize the inspection task execution results of the tenants to be migrated after all the inspection tasks in the inspection task set are completed, output the tenants to be migrated with abnormal inspection items, and output the exception information.
[0124] The execution result return module is used to return -1 if there are abnormal check items in the inspection task execution results, and return 0 if there are no abnormal check items.
[0125] Example 4
[0126] Figure 3 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. As shown in Figure 3, according to another aspect of the present application, an electronic device is also provided. The electronic device may include one or more processors and one or more memories. The memory stores computer-readable code, which, when executed by one or more processors, can execute a cloud tenant network element migration check method as described above.
[0127] The method or system according to the embodiment of the present application can also be implemented with the aid of the architecture of the electronic device shown in FIG3 . As shown in FIG3 , the electronic device may include a bus, one or more CPUs, a read-only memory (ROM), a random access memory (RAM), a communication port connected to a network, an input / output component, a hard disk, etc. A storage device in the electronic device, such as a ROM or a hard disk, can store a method for checking the migration of a tenant network element on a cloud provided in the present application. A cloud tenant network element migration inspection method may, for example, include: sorting a list of tenants to be migrated; obtaining cloud network resource data based on the list of tenants to be migrated; generating a configuration checkpoint list for each tenant to be migrated using the check items in a defined configuration checklist; traversing the check items in the configuration checklist of each tenant to be migrated, generating inspection tasks using the check items, aggregating the inspection tasks and adding them to a task execution queue to obtain a network element host granularity; concurrently executing the inspection tasks at the network element host granularity to obtain inspection task execution results; after all inspection tasks in the inspection task set have been executed, aggregating the inspection task execution results of the tenants to be migrated, outputting the tenants to be migrated with abnormal inspection items, and outputting abnormal information; returning -1 if the inspection task execution result contains an abnormal inspection item, and returning 0 if the inspection task execution result does not contain an abnormal inspection item. Furthermore, the electronic device may also include a user interface. Of course, the architecture shown in FIG3 is only exemplary. When implementing different devices, one or more components in the electronic device shown in FIG3 may be omitted according to actual needs.
[0128] Example 5
[0129] Figure 4 is a schematic diagram of the structure of a readable storage medium provided by an embodiment of the present application. As shown in Figure 4, it is a readable storage medium according to an embodiment of the present application. Computer-readable instructions are stored on the computer-readable storage medium. When the computer-readable instructions are executed by the processor, a cloud tenant network element migration inspection method according to an embodiment of the present application described with reference to the above figures can be executed. The storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory (cache). Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.
[0130] In addition, according to the implementation manner of the present application, the process described with reference to the flowchart above can be implemented as a computer software program. For example, the present application provides a non-transitory machine-readable storage medium, the non-transitory machine-readable storage medium stores machine-readable instructions, and the machine-readable instructions can be executed by a processor to execute instructions corresponding to the method steps provided in the present application, for example: sorting the list of tenants to be migrated; obtaining cloud network resource data according to the list of tenants to be migrated; using the check items in the defined configuration checklist to generate a configuration checkpoint list for each tenant to be migrated; traversing the check items in the configuration checklist of each tenant to be migrated, using the check items to generate inspection tasks, summarizing the inspection tasks and adding them to the task execution queue to obtain the network element Host granularity; concurrently executing the inspection tasks at the network element Host granularity to obtain the inspection task execution results; when all the inspection tasks in the inspection task set are executed, summarizing the inspection task execution results of the tenants to be migrated, outputting the tenants to be migrated with abnormal inspection items, and outputting abnormal information; returning -1 when there is an abnormal inspection item in the inspection task execution result, and returning 0 when there is no abnormal inspection item. When the computer program is executed by a central processing unit (CPU), the above functions defined in the method of the present application are performed.
[0131] The methods, apparatuses, and devices of the present application may be implemented in many ways. For example, the methods, apparatuses, and devices of the present application may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present application are not limited to the order specifically described above unless otherwise specified. In addition, in some embodiments, the present application may also be implemented as programs recorded in a recording medium, which include machine-readable instructions for implementing the methods according to the present application. Therefore, the present application also covers recording media that store programs for executing the methods according to the present application.
[0132] In addition, the parts of the above technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive redundancy.
[0133] The above-described specific embodiments further illustrate the objectives, technical solutions, and beneficial effects of the present invention. It should be understood that the above description is merely a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A method for checking the migration of tenant network elements on a cloud, characterized in that: include: Sort out the list of tenants to be migrated; Obtain cloud network resource data based on the list of tenants to be migrated; Generate a list of configuration checkpoints for each tenant to be migrated using the check items in the defined configuration checklist; Traverse the check items in the configuration checklist of each tenant to be migrated, use the check items to generate check tasks, summarize the check tasks and add them to the task execution queue to obtain the network element Host granularity; Concurrently execute inspection tasks at the granularity of network element Host and obtain the inspection task execution results; When all inspection tasks in the inspection task set are executed, the inspection task execution results of the tenants to be migrated are summarized, and the tenants to be migrated with abnormal inspection items are output, and the abnormal information is output; If there are any abnormal check items in the task execution result, -1 is returned; if there are no abnormal check items, 0 is returned.
2. A method for checking the migration of a tenant network element on a cloud as claimed in claim 1, characterized in that: The specific method of generating a configuration check task list for each tenant to be migrated using the check items in the defined configuration check list is as follows: define a configuration check list in the system, the configuration check list includes the check items that need to be checked, traverse the list of tenants to be migrated, and for each tenant to be migrated, create a configuration checkpoint list to store the inspection task execution results of each check item.
3. A method for checking the migration of a tenant network element on a cloud as claimed in claim 2, characterized in that: The specific method of traversing the check items in the configuration checklist of each tenant to be migrated, using the check items to generate check tasks, aggregating the check tasks and adding them to the task execution queue to obtain the network element Host granularity is as follows: constructing a to-be-checked list object, which includes a to-be-migrated tenant list, a configuration checklist, and a task execution method; for each tenant to be migrated in the to-be-migrated tenant list, traversing the check items in the configuration checklist, registering each check item with the to-be-checked list object, and the to-be-checked list object generates an inspection task by executing the registered inspection items, and the inspection task includes a task execution method, a task main method, and a task keyword; Summarize the generated inspection tasks, obtain the inspection task set, obtain the index of the task execution queue, add the inspection task to the corresponding task execution queue, wait for the configuration task to be executed, and obtain the network element Host that executes the inspection task.
4. A method for checking the migration of a tenant network element on a cloud as claimed in claim 3, characterized in that: The specific method for concurrently executing inspection tasks at the network element Host granularity to obtain the inspection task execution results is: create threads with a number of threads corresponding to the length of the task execution queue, each thread executes an inspection task in the task execution queue one by one, each inspection task includes an inspection item, and the inspection item includes a task execution method, and the result of each execution is added to the inspection task execution result. The inspection task execution result includes a method for setting the corresponding subject task result and a method for obtaining the overall execution demerit.
5. A method for checking migration of tenant network elements on a cloud as claimed in claim 4, characterized in that: After all the inspection tasks in the inspection task set are executed, the inspection task execution results of the tenants to be migrated are summarized, the tenants to be migrated with abnormal inspection items are output, and the specific method of outputting abnormal information is as follows: determine the inspector type, and the inspector type includes: row inspector, regional inspector, and newly added inspector; export the inspection items corresponding to the network element Host, and check whether the service configuration corresponding to the inspection items of the network element Host is cached locally, and the service configuration includes VPC and EIP; if the service configuration is not cached, use the SSH protocol to execute the network element configuration export instruction on the network element Host, and the network element configuration export instruction is a batch instruction for exporting all such service configurations corresponding to the network element Host; divide the exported service configuration into a service configuration list, cache the service configuration list in the memory, and return the service configuration list; if there is a cached service configuration, directly obtain the service configuration list from the cache; check whether the configuration keyword is in a configuration item in the service configuration list, if it exists, the configuration is normal, if it does not exist, it means that the migration is abnormal, output the abnormal information, and output the tenant to be migrated corresponding to the abnormal inspection item.
6. A method for checking the migration of tenant network elements on a cloud as claimed in claim 5, characterized in that: The method for splitting the exported business configuration into a business configuration list is: when the checker type is a row checker, the business configuration is split using a row splitting method, and the row checker checks whether each row in the network element Host configuration contains key configuration information; when the checker type is a region checker, the business configuration is split using a region splitting method, and the region checker checks whether each region in the network element Host configuration contains key configuration information.
7. A method for checking the migration of tenant network elements on a cloud as claimed in claim 6, characterized in that: The method for creating the newly added checker is: write a network element configuration export instruction for batch exporting the network element Host; use the NewSshInfoLister method to pass the network element configuration export instruction as a parameter to create a new configuration Lister; use the NewLineChecker method to use the configuration Lister as a creation parameter to create a configuration checker to obtain the newly added checker.
8. A cloud tenant network element migration inspection method system, characterized in that: include: The tenant list acquisition module is used to sort out the list of tenants to be migrated; A cloud resource data acquisition module is used to acquire cloud network resource data according to the list of tenants to be migrated; A configuration list generation module, used to generate a configuration checkpoint list for each tenant to be migrated using the check items in the defined configuration checklist; The inspection task generation module is used to traverse the inspection items in the configuration inspection list of each tenant to be migrated, use the inspection items to generate inspection tasks, summarize the inspection tasks and add them to the task execution queue to obtain the network element Host granularity; the inspection result acquisition module is used to concurrently execute the inspection tasks at the network element Host granularity to obtain the inspection task execution results; The exception information output module is used to summarize the inspection task execution results of the tenants to be migrated after all the inspection tasks in the inspection task set are executed, output the tenants to be migrated with abnormal inspection items, and output the exception information; The execution result return module is used to return -1 when there are abnormal inspection items in the inspection task execution results, and return 0 when there are no abnormal inspection items.
9. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the cloud tenant network element migration inspection method as described in any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps in a cloud tenant network element migration checking method as described in any one of claims 1-7.
Citation Information
Patent Citations
System and method for partition migration in a multitenant application server environment
CN106471472A
Cloud migration
CN116235146A
On-cloud tenant network element migration checking method
CN117857352A
Moving virtual machines using migration profiles
US10476809B1
Live migration of virtual computing instances between data centers
US20180060117A1