CN111258718B - High-availability service testing method and system based on virtualization platform - Google Patents
High-availability service testing method and system based on virtualization platform Download PDFInfo
- Publication number
- CN111258718B CN111258718B CN202010056624.0A CN202010056624A CN111258718B CN 111258718 B CN111258718 B CN 111258718B CN 202010056624 A CN202010056624 A CN 202010056624A CN 111258718 B CN111258718 B CN 111258718B
- Authority
- CN
- China
- Prior art keywords
- test
- network
- node
- testing
- service
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 245
- 238000000926 separation method Methods 0.000 claims abstract description 10
- 238000011084 recovery Methods 0.000 claims description 7
- 238000002955 isolation Methods 0.000 claims description 4
- 238000000034 method Methods 0.000 description 13
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 241000412611 Consul Species 0.000 description 1
- 101150015836 ENO1 gene Proteins 0.000 description 1
- 101100172356 Schizosaccharomyces pombe (strain 972 / ATCC 24843) eno101 gene Proteins 0.000 description 1
- 101100172357 Schizosaccharomyces pombe (strain 972 / ATCC 24843) eno102 gene Proteins 0.000 description 1
- 101150104041 eno2 gene Proteins 0.000 description 1
- 238000013515 script Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45591—Monitoring or debugging support
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45595—Network integration; Enabling network access in virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a high-availability service testing method and system based on a virtualization platform. Wherein deploying the test environment comprises: building a virtualization platform, wherein the virtualization platform comprises two or more than two test hosts, the test hosts are interconnected, and highly available services to be tested are deployed in the test hosts; on each test host, creating a management network, a storage network and a tenant network; adding a corresponding number of virtual network cards to each test host to realize the separation of a management network, a storage network and a tenant network which are established on the test host; any two virtual network cards between the test hosts are interconnected through a network. The invention is used for solving the problem of few machines for high-availability service testing.
Description
Technical Field
The invention relates to the field of servers, in particular to a high-availability service testing method and system based on a virtualization platform.
Background
In the server field, server systems often need to support testing of highly available services (HA) that can be developed without departing from the scope of the present invention. However, in the actual process of testing the high available service, the number of machines actually used for testing the high available service is often limited due to various reasons such as cost, and the testing environment of the high available service is difficult to satisfy.
Therefore, the invention provides a high-availability service testing method and system based on a virtualization platform, which are used for solving the problems.
Disclosure of Invention
In view of the above disadvantages of the prior art, the present invention provides a method and a system for testing highly available services based on a virtualization platform, which are used to solve the problem that there are few machines actually used for testing highly available services.
In one aspect, the invention provides a high-availability service testing method based on a virtualization platform, which comprises the following steps:
p1: deploying a test environment:
building a virtualization platform, wherein the virtualization platform comprises two or more than two test hosts, the test hosts are interconnected, and highly available services to be tested are deployed in the test hosts;
on each test host, creating a management network, a storage network and a tenant network;
adding a corresponding number of virtual network cards to each test host to realize the separation of a management network, a storage network and a tenant network which are established on the test host; any two virtual network cards between the test hosts are interconnected through a network;
p2: and testing the high available service to be tested based on the deployed test environment.
Further, the testing of the high available service to be tested includes:
testing the floating vip high-availability service of the control node;
computing nodes' high available service tests.
Further, the floating vip high available service test of the control node comprises the following steps:
selecting at least two test hosts and deploying the test hosts as control nodes;
finding a control node where the floating ip is located through an ip a command, and recording the control node as a first control node;
executing a shutdown now command to close the first control node;
and searching the control node where the floating ip is located through the ip a command at other control nodes, and if the control node where the floating ip is located is searched, the test is passed.
Further, the high available service test of the computing node comprises the following steps:
selecting at least two test hosts and deploying the selected test hosts as computing nodes;
configuring a BMC corresponding to each computing node to enable each computing node to be restarted and closed;
creating a high-availability cluster with an automatic recovery mode, and adding each computing node to the high-availability cluster;
opening an HA switch of each computing node in the high-availability cluster;
creating a corresponding number of virtual machines on any one computing node, and then forbidding computing services of the computing node; wherein the created virtual machines comprise a virtual machine in a running state and a virtual machine in a closed state;
and checking the evacuation condition of the created virtual machine on other computing nodes, and if the virtual machine is evacuated to other computing nodes, the test is passed.
Further, for each test host's tenant network:
when the virtual machine service network uses a vxlan network model, allocating an independent physical network card for the tenant network;
when the virtual machine service network uses a vlan network model, a vlan is independently allocated to the tenant network, an ip is allocated to the tenant network in a sub-interface mode, and the vlan is interconnected with the virtual machine service vlans of other test hosts.
In another aspect, the present invention provides a virtualization platform-based high availability service testing system, including:
the environment deployment unit is used for deploying a test environment;
the high-availability service testing unit is used for testing the high-availability service to be tested based on the deployed testing environment;
wherein, the environment deployment unit comprises:
the virtualization platform building module is used for building a virtualization platform, the virtualization platform comprises two or more than two test hosts, the test hosts are interconnected, and highly available services to be tested are deployed in the test hosts;
the test host network creating module is used for creating a management network, a storage network and a tenant network on each test host;
the network isolation module is used for adding a corresponding number of virtual network cards to each test host to realize the network separation of the management network, the storage network and the tenant network which are established on the test host; any two virtual network cards between the test hosts are interconnected through a network.
Further, the high availability service test unit includes:
the first high-availability service testing module is used for testing the floating vip high-availability service of the control node;
and the second high-availability service testing module is used for carrying out high-availability service testing on the computing node.
Further, the first high availability service test module includes:
the control node deployment unit is used for selecting at least two test hosts and deploying the test hosts as control nodes;
the first floating ip node searching unit is used for searching the control node where the floating ip is located through an ip a command and recording the control node as a first control node;
the control node closing unit is used for executing a shutdown not command to close the first control node;
the second floating ip node searching unit is used for searching the control node where the floating ip is located on other control nodes through an ip a command;
and the test passing judgment unit is used for judging that the current test passes and outputting the current test result when the control node where the floating ip is located is found by the second floating ip node searching unit.
Further, the second high availability service test module includes:
the computing node deployment unit is used for selecting at least two test hosts and deploying the selected test hosts as computing nodes;
the configuration unit is used for configuring the BMC corresponding to each computing node so that each computing node can be restarted and closed;
the cluster unit is used for creating a high-availability cluster with an automatic recovery mode and adding each computing node to the high-availability cluster;
the HA starting unit is used for starting an HA switch of each computing node in the high-availability cluster;
the virtual machine creating unit is used for creating a corresponding number of virtual machines on any one computing node; and for disabling computing services of the compute node after the virtual machine is created; wherein the created virtual machines comprise a virtual machine in a running state and a virtual machine in a closed state;
and the test result viewing unit is used for viewing the evacuation condition of the created virtual machine on other computing nodes and outputting a test passing when the viewing result is that the created virtual machine is evacuated to other computing nodes.
Further, for each test host's tenant network:
when the virtual machine service network uses a vxlan network model, allocating an independent physical network card for the tenant network;
when the virtual machine service network uses a vlan network model, a vlan is independently allocated to the tenant network, an ip is allocated to the tenant network in a sub-interface mode, and the vlan is interconnected with the virtual machine service vlans of other test hosts.
The invention has the beneficial effects that,
according to the high-availability service testing method and system based on the virtualization platform, the virtualization platform is set up, the high-availability service to be tested is respectively deployed on each testing host of the virtualization platform, the management network, the storage network and the tenant network are respectively established on each testing host, and mutual isolation among the management network, the storage network and the tenant network on the testing hosts is realized by adding the virtual network card, so that each testing host can be deployed as a control node and a computing node, the number of the testing hosts required by the high-availability service testing of the server is reduced to a certain extent, and smooth running of the high-availability service testing is facilitated.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
FIG. 2 is a schematic block diagram of a system of one embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
As shown in fig. 1, the method 100 includes:
and step 120, testing the high-availability service to be tested based on the deployed test environment.
The implementation method of step 110 specifically includes:
1103, adding a corresponding number of virtual network cards to each test host to realize the separation of the management network, the storage network and the tenant network which are established on the test host; any two virtual network cards between the test hosts are interconnected through a network.
Optionally, the step 120 of testing the high available service to be tested specifically includes:
testing the floating vip high-availability service of the control node;
computing nodes' high available service tests.
The method for testing the floating vip high-availability service of the control node comprises the following steps:
s1, selecting at least two test hosts and deploying the test hosts as control nodes;
s2, finding the control node where the floating ip is located through the ip a command, and recording the control node as a first control node;
s3, executing a shutdown now command to close the first control node;
and s4, searching the control node where the floating ip is located through the ip a command at other control nodes, and if the control node where the floating ip is located is searched, passing the test.
Optionally, the testing of the high available service of the computing node includes the steps of:
q1, selecting at least two test hosts and deploying the selected test hosts as computing nodes;
q2, configuring the BMC corresponding to each computing node to enable each computing node to restart and close;
q3, establishing a high-availability cluster with an automatic recovery mode, and adding each computing node to the high-availability cluster;
q4, opening an HA switch of each computing node in the high-availability cluster;
q5, creating a corresponding number of virtual machines on any one computing node, and then forbidding computing services of the computing node; wherein the created virtual machines comprise a virtual machine in a running state and a virtual machine in a closed state;
and q6, checking the evacuation condition of the created virtual machine on other computing nodes, and if the created virtual machine is evacuated to other computing nodes, the test is passed.
Optionally, to ensure smooth progress of the test work, for the tenant network of each test host:
when the virtual machine service network uses a vxlan network model, allocating an independent physical network card for the tenant network;
when the virtual machine service network uses a vlan network model, a vlan is independently allocated to the tenant network, an ip is allocated to the tenant network in a sub-interface mode, and the vlan is interconnected with the virtual machine service vlans of other test hosts.
In order to facilitate understanding of the present invention, the principle of the virtualization platform-based high available service testing method of the present invention is combined with the process of testing the high available service of the server in the embodiment to further describe the virtualization platform-based high available service testing method of the present invention.
The high-availability service testing method based on the virtualization platform comprises the following steps:
step K1: and deploying the test environment. The implementation method of the step K1 comprises the following steps:
and step K11, building an ICOS (InCloudOpenStack, which is a virtualization system based on openstack) virtualization platform, wherein the virtualization platform comprises four test hosts, the test hosts are mutually communicated, and highly available services to be tested are deployed in the test hosts. In specific implementation, a person skilled in the art can also set up other common virtualization platforms according to actual situations.
Step K12 is then performed.
And step K12, creating a management network, a storage network and a tenant network on each test host.
The high available service test needs to comprehensively judge the HA execution conditions at three network levels, namely, the management network, the storage network, and the tenant network.
And K13, realizing the three-network separation of the created management network, the created storage network and the created tenant network on each test host.
First, each test host is entered. Then, virtual network cards are respectively set for a management network, a storage network and a tenant network configured in the test host, so that separation of the tenant network, the management network and the storage network is realized. Specifically, the management network, the storage network and the tenant network on the test host correspond to three independent virtual network cards respectively.
The three independent virtual network cards corresponding to the management network, the storage network and the tenant network in each test host are sequentially as follows:
managing the network card: named "api _ interface";
a storage network card: named storage _ interface;
the tenant network card: named "smart _ interface", is the network card used by the virtual machine service network.
Optionally, for a tent _ interface (tenant network card):
when the Virtual machine service network of the test host uses a vxlan (Virtual Extensible LAN) network model, a physical network card is independently allocated to the Virtual machine service network of the test host, which is beneficial to improving the high availability judgment of high available service to a certain extent;
when a Virtual machine service Network of a test host uses a vlan (Virtual Local Area Network) Network model, independently allocating a vlan to a tenant Network, and allocating an ip to the tenant Network in a sub-interface manner; at this time, the uplink switch port of the tenant _ interface network card is in trunk mode, and allows the tenant network vlan and the virtual machine service vlans of other test hosts to pass through.
The content of the network card subinterface configuration file can refer to the following contents:
TYPE=Eehernet
BOOTPROTO=static
NAME=eno2.201
DEVICE=eno2.201
ONBOOT=yes
IPADDR=182.201.13
NETMASK=233.233.233.0
VLAN=yes
taking a test host as the node 153 as an example, a virtual network card is set for the management network, the storage network and the tenant network of the node 153, so as to realize separation of the tenant network, the management network and the storage network in the node 153, and configuration can be realized by referring to the following scripts:
Node153 network_interface=eno1 neutron_exterface
=eno2 storage_interface=eno2.201tenant_interface=eno2.202
similarly, the separate configuration of the management network, the storage network and the tenant network in other test hosts can be realized.
And after the configuration is finished, opening a globals.yml file in the test host, and annotating the storage _ interface and the tenant _ interface, namely adding "#" in the front of the configuration line of the storage _ interface and the tenant _ interface for annotation.
Then, the configuration information enters a deployment node (namely, each test host for performing separate configuration of the management network, the storage network and the tenant network), and the following commands are executed to enable the relevant configuration to take effect:
kola-ansible post-deploy-i/root/multimode-t masakari,consul
at this point, any two virtual network cards between the test hosts are all interconnected through the network.
And K2, testing the high-availability service to be tested based on the deployed test environment.
After the configuration takes effect, the built virtualization platform can be used for testing the related high-availability service.
The test of the high available service to be tested in the step K2 includes a floating vip high available service test of the control node and a high available service test of the computation node.
In this embodiment, the floating vip high available service test of the control node includes the following steps:
firstly, three test hosts are selected from four test hosts and deployed as control nodes, which is beneficial to ensuring the stable operation of the environment to a certain extent. Floating ip will randomly select the control node.
And then, searching the control node where the floating ip is located through the ip a command, and marking the control node as a first control node. The first control node is the control node where the floating ip is currently located.
And then, executing a shutdown now command to close the first control node.
Then, on the other two control nodes (three control nodes are deployed in this embodiment), the control node where the floating ip is located is searched through the ip a command, and if the control node where the floating ip is located is found, the test is passed, that is, the high available service (HA) in the control node functions normally.
In addition, the high available service test of the computing node described in this embodiment includes the following steps:
firstly, two of the four test hosts are selected and deployed as computing nodes.
Each compute node is deployed under a multinode file.
And then, configuring the BMC corresponding to each computing node to ensure that the computing nodes can be started and closed through the background.
Then, a high-availability cluster with an automatic recovery mode is created, and each computing node is added to the high-availability cluster.
And then, opening the HA switch of each computing node in the high-availability cluster.
Then, a corresponding number of virtual machines are created on any one of the computing nodes, and then an ifdown command is executed to disable the computing service of the computing node. The created virtual machines comprise a virtual machine in a running state and a virtual machine in a closed state. In specific implementation, the two computing nodes in this embodiment are denoted as 145 node and 146 node, and a virtual machine in a running state and a virtual machine in a shutdown state are established on the 145 node. And then executing an ifdown command to disable the storage network card of the 145 node, namely closing the computing service of the 145 node, wherein the HA switch of the 145 node is automatically closed.
And then, checking the evacuation condition of the virtual machine created on the corresponding computing node on other computing nodes, and if the virtual machine is evacuated to other computing nodes, passing the test. For example, in this embodiment, the 146 node may be automatically logged in and an evacuation condition of the virtual machine created on the 145 node may be checked, and if the virtual machine is evacuated to the 146 node, the test is passed, that is, there is a high available service (HA) in the computing node that functions normally.
In summary, in the method 100 described in this embodiment, the test host in the built virtualization platform can be configured as a control node for testing and can also be configured as a computing node for testing, so that different hosts are not used for deploying the control node and the computing node, which is helpful for reducing the number of hosts for testing high available services (HA) of the server to a certain extent, and is further helpful for smooth testing to a certain extent.
Example 2:
as shown in fig. 2, the system 200 in this embodiment includes:
an environment deployment unit 201, configured to deploy a test environment;
the high-availability service testing unit 202 is used for testing the high-availability service to be tested based on the deployed testing environment;
wherein, the environment deployment unit 201 includes:
a virtualization platform building module 2011, configured to build a virtualization platform, where the virtualization platform includes two or more test hosts, the test hosts are interconnected, and a high availability service to be tested is deployed in each test host;
a test host network creation module 2012, configured to create a management network, a storage network, and a tenant network on each of the test hosts;
the network isolation module 2013 is used for adding a corresponding number of virtual network cards to each test host to realize the network separation of the management network, the storage network and the tenant network which are established on each test host; any two virtual network cards between the test hosts are interconnected through a network.
The high available service test unit 202 includes:
a first high availability service test module 2021, configured to perform a floating vip high availability service test on the control node;
a second high available services test module 2022 for conducting high available services tests of the compute node.
Wherein the first high available service test module 2021 includes:
the control node deployment unit 20211 is configured to select at least two test hosts and deploy the test hosts as control nodes;
the first floating ip node searching unit 20212 is configured to search, through an ip a command, a control node where a floating ip is located, and record the control node as a first control node;
a control node closing unit 20213, configured to execute a shutdown not command to close the first control node;
a second floating ip node searching unit 20214, configured to search, on another control node, a control node where the floating ip node is located through an ip a command;
the test passing determination unit 20215 is configured to determine that the current test passes and output a current test result when the second floating ip node search unit finds the control node where the floating ip is located.
In this embodiment, the second high available service test module 2022 includes:
the computing node deployment unit 20221 is configured to select at least two test hosts (in a specific implementation, a person skilled in the art may set a specific number of the selected test hosts according to an actual situation), and deploy the selected test hosts as computing nodes;
a configuration unit 20222, configured to configure BMCs corresponding to the computing nodes, so that the computing nodes can be restarted and shut down;
a cluster unit 20223, configured to create a high availability cluster in which a recovery manner is automatic, and add each computing node to the high availability cluster;
an HA turning-on unit 20224, configured to turn on an HA switch of each compute node in the high availability cluster;
a virtual machine creating unit 20225, configured to create a corresponding number of virtual machines on any one computing node (in a specific implementation, a person skilled in the art may set the specific number according to an actual situation); and for disabling computing services of the compute node after the virtual machine is created; wherein the created virtual machines comprise a virtual machine in a running state and a virtual machine in a closed state;
the test result viewing unit 20226 is configured to view the evacuation condition of the created virtual machine on the other computing node, and output a test pass when the viewing result is that the created virtual machine is evacuated to the other computing node.
In this embodiment, for the tenant network of each test host:
when the virtual machine service network uses a vxlan network model, allocating an independent physical network card for a tenant network;
when the virtual machine service network uses a vlan network model, a vlan is independently allocated to the tenant network, an ip is allocated to the tenant network in a sub-interface mode, and the vlan is interconnected with the virtual machine service vlans of other test hosts.
The system 200 provided in this embodiment corresponds to the method 100 in embodiment 1, and the technical effects that can be achieved by the system can be referred to the description in embodiment 1 above, which is not described herein again.
The same and similar parts among the various embodiments in this specification may be referred to each other. In particular, as for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and reference may be made to the description in the method embodiment for relevant points.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (8)
1. A high-availability service testing method based on a virtualization platform is characterized by comprising the following steps:
p1: deploying a test environment:
building a virtualization platform, wherein the virtualization platform comprises two or more than two test hosts, the test hosts are interconnected, and highly available services to be tested are deployed in the test hosts;
on each test host, creating a management network, a storage network and a tenant network;
adding a corresponding number of virtual network cards to each test host to realize the separation of a management network, a storage network and a tenant network which are established on the test host; any two virtual network cards between the test hosts are interconnected through a network;
p2: testing the high-availability service to be tested based on a deployed test environment;
the testing of the high-availability service to be tested comprises the following steps: testing the floating vip high-availability service of the control node;
the floating vip high-availability service test of the control node comprises the following steps:
selecting at least two test hosts and deploying the test hosts as control nodes;
finding a control node where the floating ip is located through an ip a command, and recording the control node as a first control node;
executing a shutdown now command to close the first control node;
and searching the control node where the floating ip is located through the ip a command at other control nodes, and if the control node where the floating ip is located is searched, the test is passed.
2. The virtualization platform-based high availability service testing method according to claim 1, further comprising the step of testing the high availability service to be tested, wherein the testing step comprises:
computing nodes' high available service tests.
3. The virtualization platform-based high availability service testing method according to claim 2, wherein the high availability service testing of the computing node comprises the steps of:
selecting at least two test hosts and deploying the selected test hosts as computing nodes;
configuring a BMC corresponding to each computing node to enable each computing node to be restarted and closed;
creating a high-availability cluster with an automatic recovery mode, and adding each computing node to the high-availability cluster;
opening HA switches of all computing nodes in the high-availability cluster;
creating a corresponding number of virtual machines on any one computing node, and then forbidding computing services of the computing node; wherein the created virtual machines comprise a virtual machine in a running state and a virtual machine in a closed state;
and checking the evacuation condition of the created virtual machine on other computing nodes, and if the virtual machine is evacuated to other computing nodes, the test is passed.
4. The virtualization platform-based high availability service testing method according to claim 1, wherein for each test host's tenant network:
when the virtual machine service network uses a vxlan network model, allocating an independent physical network card for the tenant network;
when the virtual machine service network uses a vlan network model, a vlan is independently allocated to the tenant network, an ip is allocated to the tenant network in a sub-interface mode, and the vlan is interconnected with the virtual machine service vlans of other test hosts.
5. A virtualization platform-based high availability service testing system, comprising:
the environment deployment unit is used for deploying a test environment;
the high-availability service testing unit is used for testing the high-availability service to be tested based on the deployed testing environment;
wherein, the environment deployment unit comprises:
the virtualization platform building module is used for building a virtualization platform, the virtualization platform comprises two or more than two test hosts, the test hosts are interconnected, and highly available services to be tested are deployed in the test hosts;
the test host network creating module is used for creating a management network, a storage network and a tenant network on each test host;
the network isolation module is used for adding a corresponding number of virtual network cards to each test host to realize the network separation of the management network, the storage network and the tenant network which are established on the test host; any two virtual network cards between the test hosts are interconnected through a network;
the high-availability service test unit comprises:
the first high-availability service testing module is used for testing the floating vip high-availability service of the control node;
the first high availability services testing module comprising:
the control node deployment unit is used for selecting at least two test hosts and deploying the test hosts as control nodes;
the first floating ip node searching unit is used for searching the control node where the floating ip is located through an ip a command and recording the control node as a first control node;
the control node closing unit is used for executing a shutdown not command to close the first control node;
the second floating ip node searching unit is used for searching the control node where the floating ip is located on other control nodes through an ip a command;
and the test passing judgment unit is used for judging that the current test passes and outputting the current test result when the control node where the floating ip is located is found by the second floating ip node searching unit.
6. The virtualization platform-based high availability service test system of claim 5, wherein the high availability service test unit comprises:
and the second high-availability service testing module is used for carrying out high-availability service testing on the computing node.
7. The virtualization platform-based high availability service testing system of claim 6, wherein the second high availability service testing module comprises:
the computing node deployment unit is used for selecting at least two test hosts and deploying the selected test hosts as computing nodes;
the configuration unit is used for configuring the BMC corresponding to each computing node so that each computing node can be restarted and closed;
the cluster unit is used for creating a high-availability cluster with an automatic recovery mode and adding each computing node to the high-availability cluster;
the HA starting unit is used for starting an HA switch of each computing node in the high-availability cluster;
the virtual machine creating unit is used for creating a corresponding number of virtual machines on any one computing node; and for disabling the computing services of the computing node after the virtual machine is created; wherein the created virtual machines comprise a virtual machine in a running state and a virtual machine in a closed state;
and the test result viewing unit is used for viewing the evacuation condition of the created virtual machine on other computing nodes and outputting a test passing when the viewing result is that the created virtual machine is evacuated to other computing nodes.
8. The virtualization platform-based high availability service test system according to claim 5, 6 or 7, wherein for each test host's tenant network:
when the virtual machine service network uses a vxlan network model, allocating an independent physical network card for the tenant network;
when the virtual machine service network uses a vlan network model, a vlan is independently allocated to the tenant network, an ip is allocated to the tenant network in a sub-interface mode, and the vlan is interconnected with the virtual machine service vlans of other test hosts.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010056624.0A CN111258718B (en) | 2020-01-18 | 2020-01-18 | High-availability service testing method and system based on virtualization platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010056624.0A CN111258718B (en) | 2020-01-18 | 2020-01-18 | High-availability service testing method and system based on virtualization platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111258718A CN111258718A (en) | 2020-06-09 |
CN111258718B true CN111258718B (en) | 2022-11-11 |
Family
ID=70947211
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010056624.0A Active CN111258718B (en) | 2020-01-18 | 2020-01-18 | High-availability service testing method and system based on virtualization platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111258718B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111813495B (en) * | 2020-06-12 | 2024-09-13 | 北京金山云网络技术有限公司 | Node testing method and device, storage medium and electronic device |
CN112217690B (en) * | 2020-09-18 | 2022-06-14 | 苏州浪潮智能科技有限公司 | Concurrent testing method and system for local area network availability between computing nodes |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109302466A (en) * | 2018-09-18 | 2019-02-01 | 华为技术有限公司 | Data processing method, relevant device and computer storage medium |
-
2020
- 2020-01-18 CN CN202010056624.0A patent/CN111258718B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109302466A (en) * | 2018-09-18 | 2019-02-01 | 华为技术有限公司 | Data processing method, relevant device and computer storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111258718A (en) | 2020-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10949246B2 (en) | Automated network configuration of virtual machines in a virtual lab environment | |
US9690683B2 (en) | Detection and handling of virtual network appliance failures | |
US8892863B2 (en) | System and method for automated network configuration | |
CN110213121B (en) | Test platform, test method and test device for virtual communication product | |
CN111258718B (en) | High-availability service testing method and system based on virtualization platform | |
CN109510742A (en) | A kind of server network interface card remote test method, device, terminal and storage medium | |
US11934861B2 (en) | Flow rule installation latency testing in software defined networks | |
CN106130763A (en) | Server cluster and be applicable to the database resource group method for handover control of this cluster | |
CN108712308B (en) | Method and device for detecting network equipment in virtual network | |
CN104468791A (en) | Private cloud IaaS platform construction method | |
US20230231806A1 (en) | Ghost routing | |
CN112698979A (en) | Method and device for processing zookeeper double nodes, storage medium and processor | |
US20240241766A1 (en) | Techniques for managing edge device provisioning | |
US20190075036A1 (en) | Protecting virtual computing instances from network failures | |
CN112653576B (en) | Network card identification processing method, system, terminal and storage medium based on Kylin system | |
CN109815070A (en) | A kind of HOST-BOX server stability test method, apparatus, terminal and storage medium | |
Antonenko et al. | C2: General purpose cloud platform with NFV life-cycle management | |
CN112003794B (en) | Floating IP current limiting method, system, terminal and storage medium | |
US20240028370A1 (en) | Diagnosing remote sites of a distributed container orchestration system | |
CN109039823A (en) | A kind of network system firewall detection method, device, equipment and storage medium | |
CN111488306A (en) | Attack and defense architecture system and construction method thereof | |
CN114915545B (en) | Application scheduling deployment management method based on DHCP network cluster | |
JP2019036252A (en) | Test automatizing device, test method, and program | |
US11811804B1 (en) | System and method for detecting process anomalies in a distributed computation system utilizing containers | |
US11915059B2 (en) | Virtual edge devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |