Bare metal node control method, system, electronic device and readable storage medium
By creating soft bridges and regular bridges in the soft gateway node to connect and deploy services, the functional limitations and cost issues of bare metal nodes and cloud platform network communication are resolved, achieving the same network functions as virtual machines and enhancing the competitiveness of cloud products.
Patent Information
- Application Number
- CN202211447021.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-11-18
AI Technical Summary
Existing bare metal and cloud platform network communication solutions suffer from limited functionality or high cost. In particular, purely software-based solutions offer limited functionality, while hardware-based solutions using switches or smart NICs require the purchase of specific hardware, increasing usage costs.
By establishing a soft gateway node, using physical network interface cards (NICs) and overlay NICs to create soft bridges and regular bridges, connecting and deploying services, communication between bare metal nodes and the overlay network is achieved, and status information is monitored to handle anomalies, providing network functions such as security groups, QoS, and distributed floating IPs.
This enables bare metal nodes to have the same network functions as virtual machines without increasing hardware costs, including communicating with overlay networks, setting security groups, QoS, and distributed floating IPs, thus enhancing the competitiveness of cloud products.
Smart Images

Figure CN115720181B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of bare metal, and in particular to a control method, system, electronic device and readable storage medium for a bare metal node. Background Art
[0002] Bare metal, or bare metal server, refers to a physical server. Under normal circumstances, in order to meet different user needs, the cloud platform may virtualize a physical server into multiple virtual machines, but some needs may want to use a physical server directly. The physical server directly used in the cloud platform is a bare metal server.
[0003] Currently, there are three communication solutions between bare metal and cloud platform networks: pure software implementation, hardware switch implementation, and smart network card implementation.
[0004] Among them, in the pure software implementation method, bare metal uses VLAN network and VLAN network virtual machine communication. This method has low hardware requirements, but it can provide fewer functions and it is difficult to implement most functions of virtual machines, such as setting security groups, qos, and distributed floating IP. It is also impossible to directly allocate overlay networks for bare metal and overlay virtual machines to communicate.
[0005] Both the hardware switch-based approach and the smart network card-based approach can encapsulate the overlay network, so that the bare metal has the same functions as the virtual machine, achieving functions that pure software cannot achieve. However, both methods require the purchase of specific hardware switches or smart network cards, which are more expensive.
[0006] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve. Summary of the invention
[0007] In view of this, the purpose of the present invention is to provide a control method, system, electronic device and readable storage medium for bare metal nodes with low cost and capable of supporting more functions. The specific scheme is as follows:
[0008] A control method for a bare metal node is applied to a soft gateway node, wherein the soft gateway node includes a physical network card and an overlay network card, wherein the physical network card is connected to the bare metal node, and the overlay network card is connected to any node in the overlay network, and the control method includes:
[0009] Create a soft bridge corresponding to the physical network card, and create a common bridge corresponding to the overlay network card;
[0010] Connecting the common bridge to the soft bridge, and connecting the common bridge to the deployment service in the soft gateway node;
[0011] Acquire the initial information of the bare metal node through the physical network card, and send the initial information to the deployment service through the soft bridge and the common bridge in sequence;
[0012] The bare metal node is deployed according to the initial information through the deployment service, so that the deployed bare metal node communicates with the overlay network.
[0013] Preferably, the process of communicating between the deployed bare metal node and the overlay network includes:
[0014] Acquire first communication information of the deployed bare metal node through the physical network card, and send the first communication information to the overlay network card through the soft bridge and the common bridge in sequence, so that the overlay network card sends the first communication information to the corresponding node in the overlay network;
[0015] The overlay network card obtains second communication information of the bare metal node after deployment, which is sent by any node in the overlay network, and sends the second communication information to the physical network card through the ordinary bridge and the soft bridge in sequence, so that the physical network card sends the second communication information to the bare metal node after deployment.
[0016] Preferably, the process of the deployment service deploying the bare metal node according to the initial information includes:
[0017] The deployment service performs the following operations:
[0018] Acquire DHCP information according to the initial information to determine the communication deployment information of the bare metal node;
[0019] The bare metal node is deployed according to the communication deployment information.
[0020] Preferably, the deployment service is specifically an ironic service.
[0021] Preferably, the process of connecting the common bridge and the soft bridge comprises:
[0022] Setting patch interfaces on the common bridge and the soft bridge respectively, and linking the two patch interfaces into a patch interface pair;
[0023] Each of the bare metal nodes corresponds to one of the patch interface pairs.
[0024] Preferably, the control method further includes:
[0025] Monitor the status information of the physical network card, the overlay network card, the soft bridge, and the common bridge;
[0026] Determine whether there is an abnormality in all the status information;
[0027] If so, take appropriate safeguards based on the abnormal situation.
[0028] Preferably, when the abnormal situation is that the network agent of the soft gateway node is abnormal, the process of taking corresponding safeguard measures according to the abnormal situation includes:
[0029] The current deployment of all the bare metal nodes of the soft gateway node is unbound, so that the bare metal node is bound to any other soft gateway node with new deployment information different from the current deployment.
[0030] Correspondingly, the present application also discloses a control system of a bare metal node, which is applied to a soft gateway node. The soft gateway node includes a physical network card and an overlay network card. The physical network card is connected to the bare metal node, and the overlay network card is connected to any node in the overlay network. The control system includes:
[0031] A creation module, used to create a soft bridge corresponding to the physical network card, create a common bridge corresponding to the overlay network card, and connect the common bridge to the soft bridge, and connect the common bridge to the service deployed in the soft gateway node;
[0032] A deployment module is used to obtain the initial information of the bare metal node through the physical network card, and send the initial information to the deployment service through the soft bridge and the ordinary bridge in sequence, and is also used to deploy the bare metal node according to the initial information through the deployment service, so that the bare metal node after deployment can communicate with the overlay network.
[0033] Accordingly, the present application also discloses an electronic device, comprising:
[0034] Memory for storing computer programs;
[0035] A processor is used to implement the steps of the control method of the bare metal soft gateway node as described in any one of the above items when executing the computer program.
[0036] Correspondingly, the present application also discloses a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the control method of the bare metal soft gateway node as described in any of the above items are implemented.
[0037] This application establishes a connection relationship between the internal information of the soft gateway node, so that the soft gateway node has the function of providing deployment services for the bare metal node. At the same time, the soft gateway node shows the same characteristics as the virtual machine to the outside world, so that the bare metal node can realize the same network functions as the virtual machine through the soft gateway node, including communicating with the overlay network, setting security groups, qos, distributed floating IP, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0039] Figure 1 This is a flowchart of a method for controlling a bare metal node according to an embodiment of the present invention;
[0040] Figure 2 This is a connection structure diagram of a bare metal node and a soft gateway node in an embodiment of the present invention;
[0041] Figure 3 This is another connection structure diagram of a bare metal node and a soft gateway node in an embodiment of the present invention;
[0042] Figure 4 This is a structural distribution diagram of a control system of a bare metal node in an embodiment of the present invention;
[0043] Figure 5 The figure is a structural distribution diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] Currently, there are three communication solutions between bare metal and cloud platform networks: pure software implementation, hardware switch implementation, and smart network card implementation. Among them, the pure software implementation method has low hardware requirements, but it can provide fewer functions and it is difficult to implement most functions of virtual machines. Both the hardware switch-based method and the smart network card-based method can encapsulate the overlay network, so that bare metal has the same functions as virtual machines, achieving functions that pure software cannot achieve, but both methods require the purchase of specific hardware switches or smart network cards, which are more expensive.
[0046] This application establishes a connection relationship between the internal information of the soft gateway node, so that the soft gateway node has the function of providing deployment services for the bare metal node. At the same time, the soft gateway node shows the same characteristics as the virtual machine to the outside world, so that the bare metal node can realize the same network functions as the virtual machine through the soft gateway node, including communicating with the overlay network, setting security groups, qos, distributed floating IP, etc.
[0047] The embodiment of the present invention discloses a control method for a bare metal node, which is applied to a soft gateway node. The soft gateway node includes a physical network card and an overlay network card. The physical network card is connected to the bare metal node, and the overlay network card is connected to any node in the overlay network. Figure 1 As shown, the control method includes:
[0048] S1: Create a soft bridge corresponding to the physical network card and a normal bridge corresponding to the overlay network card;
[0049] S2: Connect the common bridge and the soft bridge, and connect the common bridge and the service deployed in the soft gateway node;
[0050] Specifically, the process of connecting a common bridge and a soft bridge includes:
[0051] Set up patch interfaces on the common bridge and the soft bridge respectively, and link the two patch interfaces into a patch interface pair;
[0052] Each bare metal node corresponds to a patch interface pair.
[0053] like Figure 2 As shown in the figure, the physical network card is connected to the bare metal node through the switch, and the soft bridge corresponding to the physical network card and the overlay network card are connected through a patch interface pair. The interface pair includes patch interfaces v-bm and repr-bm. The ordinary bridge is also connected to the deployment service to ensure the subsequent traffic path.
[0054] S3: Obtain the initial information of the bare metal node through the physical network card, and send the initial information to the deployment service through the soft bridge and the ordinary bridge in sequence;
[0055] S4: Deploy the bare metal node according to the initial information through the deployment service, so that the deployed bare metal node can communicate with the overlay network.
[0056] Specifically, the process of deploying the bare metal node according to the initial information by the deployment service includes:
[0057] The deployment service does the following:
[0058] Obtain DHCP information based on the initial information to determine the communication deployment information of the bare metal node;
[0059] Deploy bare metal nodes based on the communication deployment information.
[0060] Furthermore, the deployment service is specifically an ironic service.
[0061] It can be understood that before the deployment service deploys the bare metal node, the representative port for the bare metal node on the soft gateway node is the open representative port, which is applied to the current patch interface pair and is used to bind the bare metal node inspect port for deployment. At this time, the MAC location of the bare metal node needs to send a DHCP broadcast to obtain an IP address allocation. The initial information of the bare metal node is the preset VLAN number. The initial information of all bare metal nodes on the soft gateway node can be set to the same. As long as the soft gateway node detects a new bare metal node on the switch through the physical network card, its initial information is determined to be the preset VLAN number. At this time, the open representative port under the patch interface pair does not use port security settings and releases all traffic. The preset VLAN number can be 4051. After the initial information is sent to the deployment service through the soft bridge and the ordinary bridge, the deployment service learns that there is a new bare metal node to be deployed. It obtains the DHCP information to determine the communication deployment information of the bare metal node. The communication deployment information is a communication VLAN number that is different from the preset VLAN number and is also different from the communication VLAN numbers of other configured bare metal nodes connected to the local soft gateway node. The bare metal node is deployed through the communication deployment information. After deployment, the bare metal node will use the communication deployment information for normal communication.
[0062] It can be understood that in the above deployment process, the open representative port of the bare metal node on the soft gateway node and the port of the deployment service belong to the same network segment, thereby ensuring that the bare metal node can communicate normally with the deployment service through the physical network card and the soft bridge and ordinary bridge.
[0063] It can be understood that in this embodiment, the open representative port of the bare metal node is a local port relative to the soft gateway node, that is, the traffic sent out of this port is not allowed to leave the soft gateway node. Since the open representative port and the deployment service correspond to the same soft gateway node, the deployment service will initialize and deploy the bare metal nodes detected on the local soft gateway node one by one. The communication deployment information of multiple bare metal nodes will not be the same, and the communication path will not be sent out to cause the deployment of a bare metal node on another soft gateway node.
[0064] Further, specifically, the process of communication between the deployed bare metal node and the overlay network includes:
[0065] Acquire first communication information of the deployed bare metal node through the physical network card, and send the first communication information to the overlay network card through the soft bridge and the ordinary bridge in sequence, so that the overlay network card sends the first communication information to the corresponding node in the overlay network;
[0066] The overlay network card is used to obtain the second communication information of the bare metal node after deployment, which is sent by any node in the overlay network, and the second communication information is sent to the physical network card through the ordinary bridge and the soft bridge in sequence, so that the physical network card sends the second communication information to the bare metal node after deployment.
[0067] It is understandable that after deployment, bare metal nodes will communicate with each other using the communication VLAN number. Each bare metal node has its own normal representative port, which is applied to its own patch interface pair when passing through the ordinary bridge and soft bridge. The communication VLAN number is used to define the ownership. Each bare metal node has a certain MAC and IP. For example, the communication VLAN number of the bare metal node bm1 is vlan=100, and the corresponding patch interface pair includes v-bm1 and repr-bm1. The communication VLAN number of the bare metal node bm2 is vlan=101, and the corresponding patch interface pair includes v-bm2 and repr-bm2. The communication VLAN number of each bare metal node after deployment is different, which ensures that the bare metal nodes will not communicate directly through the switch. The patch interface pairs are also different and are distinguished by the communication VLAN number. Any communication between the bare metal node and other objects must pass through the physical network card, soft gateway, corresponding patch interface pair, ordinary bridge, and then forwarded to the corresponding node position by the ordinary bridge.
[0068] like Figure 3As shown, taking the communication between the bare metal node bm1 and the overlay network as an example, the bare metal node bm1 sends the first communication information to the overlay network, then the physical network card in the soft gateway node receives the first communication information, determines the patch interface pair v-bm1 and repr-bm1 according to the VLAN number, and sends the first communication information to the overlay network card through the soft bridge, the patch interface pair v-bm1 and repr-bm1, and the ordinary bridge. The ordinary bridge sends the first communication information to the overlay network card, and the overlay network card forwards the first communication information to the node at the corresponding position in the overlay network, which includes other soft gateway nodes, bare metal nodes, virtual machines, etc.; correspondingly, when any node in the overlay network sends the second communication information corresponding to the bare metal node bm1, the overlay network card will receive the second communication information, and after the second communication information passes through the ordinary bridge, the patch interface pair repr-bm1 and v-bm1, and the soft bridge, the soft bridge sends the second communication information to the physical network card, and the physical network card sends the second communication information down to the bare metal node bm1.
[0069] The communication between the bare metal node bm2 and the overlay network is similar.
[0070] Furthermore, even if the bare metal nodes belong to the same soft gateway node, due to the different communication VLAN numbers, the communication traffic also needs to forward the information through the soft gateway node, and cannot communicate directly through the underlying connected switch. Specifically, the communication between the bare metal nodes bm1 and bm2, taking the bare metal node bm1 sending the third communication information to bm2 as an example, the physical network card in the soft gateway node receives the third communication information and forwards it to the ordinary bridge through the soft bridge, patch interface pair v-bm1 and repr-bm1, and the ordinary bridge sends the third communication information to the physical network card through the patch pair repr-bm1 and v-bm1, and the soft bridge. The physical network card sends the third communication information to the bare metal node bm2 according to the communication VLAN number of the target object.
[0071] It can be seen that the patch port on the ordinary bridge is equivalent to an ordinary port in the overlay network, and can communicate normally with other ports. It can be understood that in the above description, the bare metal node realizes the control of network configuration security group, qos, and floating IP through the open representative port and the normal representative port. This embodiment provides a pure software to provide a two-layer network agent for the soft gateway node, which can provide network configuration management (security group, qos, etc.) and overlay tunnel encapsulation for the bare metal node, so that the bare metal node has the same network function as the virtual machine, which increases the competitiveness of the cloud product.
[0072] Furthermore, in this embodiment, the abnormal fault in the communication process can also be detected and located by the soft gateway node. Specifically, the control method also includes:
[0073] Monitor the status information of physical network cards, overlay network cards, soft bridges, and ordinary bridges;
[0074] Determine whether there are any abnormalities in all status information;
[0075] If so, take appropriate safeguards based on the abnormal situation.
[0076] Among them, before taking corresponding safeguard measures according to abnormal circumstances, it also includes:
[0077] The abnormal situation is determined according to the abnormal status information; the abnormal situation includes: physical network card abnormality, and / or network proxy abnormality of the soft gateway node, and / or connection abnormality of other nodes in the overlay network.
[0078] Furthermore, when the abnormal situation is a network proxy abnormality of the soft gateway node, the process of taking corresponding safeguard measures according to the abnormal situation includes:
[0079] Unbind the current deployment of all bare metal nodes of the soft gateway node, so that the bare metal node can bind any other soft gateway node with new deployment information different from the current deployment.
[0080] Furthermore, since the occurrence of the abnormal situation is not limited to the current soft gateway node, the abnormal situation can be reported to the manager node, and the manager node further comprehensively analyzes the network failure and determines the protection measures.
[0081] It is understandable that for the detection of physical network card anomalies, the link status of the physical network card is usually judged to promptly discover the problem of the physical network card or switch. Specifically, the soft gateway bridge can promptly discover whether the physical network card is abnormal by monitoring the changes in the bridge interface. After the abnormality is discovered, if 5 abnormalities are discovered through continuous interval monitoring, the manager node neutron-server is reported to transfer all bound bare metals of the soft gateway node. The presence or absence of a physical network card is generally caused by manual operation of the operation and maintenance personnel. Therefore, it is necessary to give the user a cache time to change the network card, and prevent the user from removing the physical network card but not adding it.
[0082] Furthermore, the information forwarding on this soft gateway node depends on the network agent, which includes modules such as soft bridge and ordinary bridge. The status of the network agent of this node is monitored to ensure that the bare metal soft gateway is truly effective. When an abnormality is found in the network agent, it is judged as a medium-level fault and reported to the manager node neutron-server. The manager node neutron-server determines whether it is a failure of other services that are uniformly dependent, or a single node failure. If a single node fails, all bare metal nodes bound to the soft gateway node need to be transferred.
[0083] Furthermore, the abnormal connection with other nodes in the overlay network is mainly caused by abnormal communication detection with other soft gateway nodes. This abnormality is a data plane detection, and the purpose is to ensure that the actual data plane is normal. When a communication detection abnormality is found, it is judged as a low-level fault, and the manager node neutron-server comprehensively analyzes the communication status of other soft gateway nodes. Because it is impossible to accurately determine the link through which the data actually used by the bare metal soft gateway passes, migration is only performed when the communication status of other soft gateway nodes is completely better than that of the current soft gateway node.
[0084] It is understandable that the manager node is used to judge abnormal situations. If any soft gateway node reports a fault to the manager node, the manager node will change the soft gateway node bound to the bare metal, which can avoid judgment competition among the soft gateway nodes.
[0085] It is understandable that the rebinding and switching deployment method is adopted, that is, when the bare metal node replaces the bound soft gateway node, it is changed to a communication VLAN number different from the original one to avoid using the previously used VLAN number. This can ensure that even if a misjudgment occurs, that is, multiple soft gateway nodes are bound to one bare metal node, no loop will occur and the bare metal node can work normally.
[0086] Further, in this embodiment, the specific situations for preventing loops include: the business network is abnormal, the management network is abnormal, and the bare metal soft gateway configuration will remain. The business network is abnormal, but it will not affect other business networks; the business network is abnormal, and the management network is normal. At this time, the soft gateway node can be removed through the manager node to eliminate the abnormality; the business network is normal, and the management network is abnormal. At this time, the original configuration of the soft gateway node will remain, but because the VLAN number of the bare metal node has changed, the soft gateway node will no longer forward the information of the bare metal node. Specifically, if the VLAN used by the remaining bare metal node (marked as bmA) is bound to another bare metal (marked as bmB), the bare metal bmB traffic enters the soft gateway node. If bmA is configured with port security, the bmB traffic will also be discarded, and it will not affect the business network; if bmA is not configured with port security, the bmB traffic may enter.
[0087] This application establishes a connection relationship between the internal information of the soft gateway node, so that the soft gateway node has the function of providing deployment services for the bare metal node. At the same time, the soft gateway node shows the same characteristics as the virtual machine to the outside world, so that the bare metal node can realize the same network functions as the virtual machine through the soft gateway node, including communicating with the overlay network, setting security groups, qos, distributed floating IP, etc.
[0088] Correspondingly, the present application also discloses a control system for a bare metal node, which is applied to a soft gateway node. The soft gateway node includes a physical network card and an overlay network card. The physical network card is connected to the bare metal node, and the overlay network card is connected to any node in the overlay network. Figure 4 As shown, the control system includes:
[0089] Creation module 1, used to create a soft bridge corresponding to the physical network card, create a common bridge corresponding to the overlay network card, and connect the common bridge to the soft bridge, and connect the common bridge to the deployment service in the soft gateway node;
[0090] Deployment module 2 is used to obtain the initial information of the bare metal node through the physical network card, and send the initial information to the deployment service through the soft bridge and the ordinary bridge in sequence, and is also used to deploy the bare metal node according to the initial information through the deployment service, so that the bare metal node after deployment can communicate with the overlay network.
[0091] This application establishes a connection relationship between the internal information of the soft gateway node, so that the soft gateway node has the function of providing deployment services for the bare metal node. At the same time, the soft gateway node shows the same characteristics as the virtual machine to the outside world, so that the bare metal node can realize the same network functions as the virtual machine through the soft gateway node, including communicating with the overlay network, setting security groups, qos, distributed floating IP, etc.
[0092] In some specific embodiments, the process of communicating between the deployed bare metal node and the overlay network includes:
[0093] Acquire first communication information of the deployed bare metal node through the physical network card, and send the first communication information to the overlay network card through the soft bridge and the common bridge in sequence, so that the overlay network card sends the first communication information to the corresponding node in the overlay network;
[0094] The overlay network card obtains second communication information of the bare metal node after deployment, which is sent by any node in the overlay network, and sends the second communication information to the physical network card through the ordinary bridge and the soft bridge in sequence, so that the physical network card sends the second communication information to the bare metal node after deployment.
[0095] In some specific embodiments, the process of the deployment service deploying the bare metal node according to the initial information includes:
[0096] The deployment service performs the following operations:
[0097] Acquire DHCP information according to the initial information to determine the communication deployment information of the bare metal node;
[0098] The bare metal node is deployed according to the communication deployment information.
[0099] In some specific embodiments, the deployment service is specifically an ironic service.
[0100] In some specific embodiments, the process of connecting the common bridge and the soft bridge includes:
[0101] Setting patch interfaces on the common bridge and the soft bridge respectively, and linking the two patch interfaces into a patch interface pair;
[0102] Each of the bare metal nodes corresponds to one of the patch interface pairs.
[0103] In some specific embodiments, the control system further includes:
[0104] The monitoring module is used to monitor the status information of the physical network card, the overlay network card, the soft bridge, and the ordinary bridge, and is also used to determine whether there is an abnormality in all the status information. If so, take corresponding safeguard measures according to the abnormal situation.
[0105] In some specific embodiments, when the abnormal situation is that the network agent of the soft gateway node is abnormal, the process of taking corresponding safeguard measures according to the abnormal situation includes:
[0106] The current deployment of all the bare metal nodes of the soft gateway node is unbound, so that the bare metal node is bound to any other soft gateway node with new deployment information different from the current deployment.
[0107] The present application also discloses an electronic device, see Figure 5As shown, it includes a processor 11 and a memory 12; wherein, when the processor 11 executes the computer program stored in the memory 12, the following steps are implemented:
[0108] Create a soft bridge corresponding to the physical network card, and create a common bridge corresponding to the overlay network card;
[0109] Connecting the common bridge to the soft bridge, and connecting the common bridge to the deployment service in the soft gateway node;
[0110] Acquire the initial information of the bare metal node through the physical network card, and send the initial information to the deployment service through the soft bridge and the common bridge in sequence;
[0111] The bare metal node is deployed according to the initial information through the deployment service, so that the deployed bare metal node communicates with the overlay network.
[0112] The embodiment of the present application establishes a connection relationship between the internal information of the soft gateway node, so that the soft gateway node has the function of providing deployment services for the bare metal node. At the same time, the soft gateway node externally exhibits the same characteristics as the virtual machine, so that the bare metal node can achieve the same network functions as the virtual machine through the soft gateway node, including communicating with the overlay network, setting security groups, qos, distributed floating IP, etc.
[0113] In some specific embodiments, when the processor 11 executes the computer subroutine stored in the memory 12, the following steps may be implemented:
[0114] Acquire first communication information of the deployed bare metal node through the physical network card, and send the first communication information to the overlay network card through the soft bridge and the common bridge in sequence, so that the overlay network card sends the first communication information to the corresponding node in the overlay network;
[0115] The overlay network card obtains second communication information of the bare metal node after deployment, which is sent by any node in the overlay network, and sends the second communication information to the physical network card through the ordinary bridge and the soft bridge in sequence, so that the physical network card sends the second communication information to the bare metal node after deployment.
[0116] In some specific embodiments, the process of the deployment service deploying the bare metal node according to the initial information includes:
[0117] The deployment service performs the following operations:
[0118] Acquire DHCP information according to the initial information to determine the communication deployment information of the bare metal node;
[0119] The bare metal node is deployed according to the communication deployment information.
[0120] In some specific embodiments, the deployment service is specifically an ironic service.
[0121] In some specific embodiments, when the processor 11 executes the computer subroutine stored in the memory 12, the following steps may be implemented:
[0122] Setting patch interfaces on the common bridge and the soft bridge respectively, and linking the two patch interfaces into a patch interface pair;
[0123] Each of the bare metal nodes corresponds to one of the patch interface pairs.
[0124] In some specific embodiments, when the processor 11 executes the computer subroutine stored in the memory 12, the following steps may be implemented:
[0125] Monitor the status information of the physical network card, the overlay network card, the soft bridge, and the common bridge;
[0126] Determine whether there is an abnormality in all the status information;
[0127] If so, take appropriate safeguards based on the abnormal situation.
[0128] In some specific embodiments, when the processor 11 executes the computer subroutine stored in the memory 12, the following steps may be implemented:
[0129] The current deployment of all the bare metal nodes of the soft gateway node is unbound, so that the bare metal node is bound to any other soft gateway node with new deployment information different from the current deployment.
[0130] Furthermore, the electronic device in this embodiment may further include:
[0131] The input interface 13 is used to obtain a computer program imported from the outside and save the obtained computer program to the memory 12. It can also be used to obtain various instructions and parameters transmitted by an external terminal device and transmit them to the processor 11 so that the processor 11 can use the above various instructions and parameters to carry out corresponding processing. In this embodiment, the input interface 13 can specifically include but is not limited to a USB interface, a serial interface, a voice input interface, a fingerprint input interface, a hard disk reading interface, etc.
[0132] The output interface 14 is used to output various data generated by the processor 11 to a terminal device connected thereto, so that other terminal devices connected to the output interface 14 can obtain various data generated by the processor 11. In this embodiment, the output interface 14 may specifically include but is not limited to a USB interface, a serial interface, and the like.
[0133] The communication unit 15 is used to establish a remote communication connection between the electronic device and the external server so that the electronic device can mount the image file to the external server. In this embodiment, the communication unit 15 may specifically include but is not limited to a remote communication unit based on wireless communication technology or wired communication technology.
[0134] The keyboard 16 is used to obtain various parameter data or instructions input by the user by tapping the keycaps in real time.
[0135] The display 17 is used to display relevant information of the control process of the bare metal node in real time, so that the user can understand the current control status of the bare metal node in time.
[0136] The mouse 18 can be used to assist the user in inputting data and simplify the user's operation.
[0137] Furthermore, the embodiments of the present application also disclose a readable storage medium, wherein the readable storage medium includes a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable hard disk, a CD-ROM, or any other form of storage medium known in the technical field. The readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0138] Create a soft bridge corresponding to the physical network card, and create a common bridge corresponding to the overlay network card;
[0139] Connecting the common bridge to the soft bridge, and connecting the common bridge to the deployment service in the soft gateway node;
[0140] Acquire the initial information of the bare metal node through the physical network card, and send the initial information to the deployment service through the soft bridge and the common bridge in sequence;
[0141] The bare metal node is deployed according to the initial information through the deployment service, so that the deployed bare metal node communicates with the overlay network.
[0142] The embodiment of the present application establishes a connection relationship between the internal information of the soft gateway node, so that the soft gateway node has the function of providing deployment services for the bare metal node. At the same time, the soft gateway node externally exhibits the same characteristics as the virtual machine, so that the bare metal node can achieve the same network functions as the virtual machine through the soft gateway node, including communicating with the overlay network, setting security groups, qos, distributed floating IP, etc.
[0143] In some specific embodiments, when the computer subprogram stored in the readable storage medium is executed by the processor, the following steps may be implemented:
[0144] Acquire first communication information of the deployed bare metal node through the physical network card, and send the first communication information to the overlay network card through the soft bridge and the common bridge in sequence, so that the overlay network card sends the first communication information to the corresponding node in the overlay network;
[0145] The overlay network card obtains second communication information of the bare metal node after deployment, which is sent by any node in the overlay network, and sends the second communication information to the physical network card through the ordinary bridge and the soft bridge in sequence, so that the physical network card sends the second communication information to the bare metal node after deployment.
[0146] In some specific embodiments, the process of the deployment service deploying the bare metal node according to the initial information includes:
[0147] The deployment service performs the following operations:
[0148] Acquire DHCP information according to the initial information to determine the communication deployment information of the bare metal node;
[0149] The bare metal node is deployed according to the communication deployment information.
[0150] In some specific embodiments, the deployment service is specifically an ironic service.
[0151] In some specific embodiments, when the computer subprogram stored in the readable storage medium is executed by the processor, the following steps may be implemented:
[0152] Setting patch interfaces on the common bridge and the soft bridge respectively, and linking the two patch interfaces into a patch interface pair;
[0153] Each of the bare metal nodes corresponds to one of the patch interface pairs.
[0154] In some specific embodiments, when the computer subprogram stored in the readable storage medium is executed by the processor, the following steps may be implemented:
[0155] Monitor the status information of the physical network card, the overlay network card, the soft bridge, and the common bridge;
[0156] Determine whether there is an abnormality in all the status information;
[0157] If so, take appropriate safeguards based on the abnormal situation.
[0158] In some specific embodiments, when the computer subprogram stored in the readable storage medium is executed by the processor, the following steps may be implemented:
[0159] The current deployment of all the bare metal nodes of the soft gateway node is unbound, so that the bare metal node is bound to any other soft gateway node with new deployment information different from the current deployment.
[0160] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0161] The above is a detailed introduction to a bare metal node control method, system, electronic device and readable storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A control method for a bare metal node, characterized in that: Applied to a soft gateway node, the soft gateway node includes a physical network card and an overlay network card, the physical network card is connected to a bare metal node, and the overlay network card is connected to any node in the overlay network, the control method includes: Create a soft bridge corresponding to the physical network card, and create a common bridge corresponding to the overlay network card; Connecting the common bridge to the soft bridge, and connecting the common bridge to the deployment service in the soft gateway node; Acquire the initial information of the bare metal node through the physical network card, and send the initial information to the deployment service through the soft bridge and the common bridge in sequence; Deploy the bare metal node according to the initial information through the deployment service, so that the deployed bare metal node communicates with the overlay network; The process of connecting the common bridge and the soft bridge includes: Setting patch interfaces on the common bridge and the soft bridge respectively, and linking the two patch interfaces into a patch interface pair; Each of the bare metal nodes corresponds to one of the patch interface pairs; The process of communicating between the deployed bare metal node and the overlay network includes: Acquire first communication information of the deployed bare metal node through the physical network card, and send the first communication information to the overlay network card through the soft bridge and the common bridge in sequence, so that the overlay network card sends the first communication information to the corresponding node in the overlay network; The overlay network card obtains second communication information of the bare metal node after deployment, which is sent by any node in the overlay network, and sends the second communication information to the physical network card through the ordinary bridge and the soft bridge in sequence, so that the physical network card sends the second communication information to the bare metal node after deployment.
2. The control method according to claim 1, characterized in that: The process of the deployment service deploying the bare metal node according to the initial information includes: The deployment service performs the following operations: Acquire DHCP information according to the initial information to determine the communication deployment information of the bare metal node; The bare metal node is deployed according to the communication deployment information.
3. The control method according to claim 2, characterized in that: The deployment service is specifically the ironic service.
4. The control method according to any one of claims 1 to 3, characterized in that: Also includes: Monitor the status information of the physical network card, the overlay network card, the soft bridge, and the common bridge; Determine whether there is an abnormality in all the status information; If so, take appropriate safeguards based on the abnormal situation.
5. The control method according to claim 4, characterized in that: When the abnormal situation is that the network agent of the soft gateway node is abnormal, the process of taking corresponding safeguard measures according to the abnormal situation includes: The current deployment of all the bare metal nodes of the soft gateway node is unbound, so that the bare metal node is bound to any other soft gateway node with new deployment information different from the current deployment.
6. A control system for a bare metal node, characterized in that: Applied to a soft gateway node, the soft gateway node includes a physical network card and an overlay network card, the physical network card is connected to a bare metal node, the overlay network card is connected to any node in the overlay network, and the control system includes: A creation module, used to create a soft bridge corresponding to the physical network card, create a common bridge corresponding to the overlay network card, and connect the common bridge to the soft bridge, and connect the common bridge to the service deployed in the soft gateway node; A deployment module, used to obtain initial information of the bare metal node through the physical network card, and send the initial information to the deployment service through the soft bridge and the ordinary bridge in sequence, and also used to deploy the bare metal node according to the initial information through the deployment service, so that the bare metal node after deployment communicates with the overlay network; The process of connecting the common bridge and the soft bridge includes: Setting patch interfaces on the common bridge and the soft bridge respectively, and linking the two patch interfaces into a patch interface pair; Each of the bare metal nodes corresponds to one of the patch interface pairs; The process of communicating between the deployed bare metal node and the overlay network includes: Acquire first communication information of the deployed bare metal node through the physical network card, and send the first communication information to the overlay network card through the soft bridge and the common bridge in sequence, so that the overlay network card sends the first communication information to the corresponding node in the overlay network; The overlay network card obtains second communication information of the bare metal node after deployment, which is sent by any node in the overlay network, and sends the second communication information to the physical network card through the ordinary bridge and the soft bridge in sequence, so that the physical network card sends the second communication information to the bare metal node after deployment.
7. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the control method of a bare metal soft gateway node as described in any one of claims 1 to 5 when executing the computer program.
8. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the control method of the bare metal soft gateway node according to any one of claims 1 to 5 are implemented.
