Bare metal server onboarding system, method, and apparatus

By reusing the gateway device address of the business network to create DHCP ports and services, the problem of insufficient IP addresses for bare metal servers in the business network was solved, and a successful online launch was achieved.

CN117278527BActive Publication Date: 2025-10-21RUIJIE NETWORKS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210674393.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-14
Publication Date
2025-10-21
Estimated Expiration
2042-06-14

AI Technical Summary

Technical Problem

When cloud hosts continue to come online in the business network, bare metal servers cannot be successfully brought online, resulting in insufficient IP addresses and online failure.

Method used

By reusing the gateway address of the business network's gateway device, you can create and run DHCP services, avoid using independent IP addresses, and ensure the successful creation and operation of DHCP ports and services.

Benefits of technology

Even if there are no available IP addresses in the business network, an IP address can still be successfully assigned to the bare metal server, ensuring that it is online on the business network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117278527B_ABST
    Figure CN117278527B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a bare metal server online system, method and device, in which the system comprises: a cloud platform management device, configured to perform network configuration of a physical switch accessed by a bare metal server in a business network when detecting that the bare metal server is switched from a provision network to the business network; acquire a gateway address of a gateway device corresponding to the business network; create a first DHCP port of the business network by multiplexing the gateway address; a DHCP server, configured to create a first DHCP service and run the first DHCP service through the gateway address; and respond to a first DHCP request through the first DHCP service to allocate an IP address in the business network to the bare metal server. The first DHCP port is created and the first DHCP service is run by multiplexing the gateway address of the gateway device of the business network, so that the bare metal server is successfully online.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology, and in particular to a bare metal server online system, method, and device. Background Art

[0002] In the related art, users can create bare metal servers through cloud platform management devices and operate bare metal servers to go online. Generally speaking, bare metal servers ultimately need to be put online in the business network specified by the user.

[0003] However, before the preceding process, that is, when creating a bare metal server, the host system has not yet been deployed on it. Therefore, you must first connect the bare metal server to the pre-provisioned network and retrieve the user-specified system image file from the provision network to run the host system using the system image file. After the host system is deployed, the bare metal server is switched from the provision network to the business network. This phase of switching the bare metal server from the provision network to the business network is called the provisioning phase, and the entire provisioning phase takes a considerable amount of time.

[0004] If cloud hosts continue to come online in the business network during the provisioning phase, the online cloud hosts will occupy the available Internet Protocol (IP) addresses of the business network. As a result, after the bare metal server is switched from the provisioning network to the business network, there will be no available IP addresses in the business network for the bare metal server to go online in the business network, which will ultimately cause the bare metal server to fail to go online in the business network. Summary of the Invention

[0005] Embodiments of the present invention provide a bare metal server online system, method, and device to ensure that the bare metal server can be successfully online even when there are continuously cloud hosts online in the business network.

[0006] In a first aspect, an embodiment of the present invention provides a bare metal server online system, the system comprising a cloud platform management device, a Dynamic Host Configuration Protocol (DHCP) server, and a bare metal server, wherein:

[0007] The cloud platform management device is configured to, upon detecting that the bare metal server switches from the provisioned network to the service network, perform network configuration of the service network on the physical switch to which the bare metal server is connected; obtain the gateway address of the gateway device corresponding to the service network; and create a first DHCP port of the service network by reusing the gateway address;

[0008] The DHCP server is configured to create a first DHCP service in response to a creation operation of the first DHCP port, and run the first DHCP service through the gateway address;

[0009] The bare metal server is configured to send a first DHCP request corresponding to the business network to the DHCP server through a physical switch configured corresponding to the business network;

[0010] The DHCP server is configured to respond to the first DHCP request through the first DHCP service to allocate an Internet Protocol (IP) address in the service network to the bare metal server.

[0011] Optionally, the DHCP server is configured to:

[0012] In response to the creation operation of the first DHCP port, creating a first namespace corresponding to the service network;

[0013] The first DHCP service is run in the first namespace using the gateway address.

[0014] Optionally, the bare metal server is further used to:

[0015] When accessing the provision network, obtaining the system image file specified by the user;

[0016] Start the system locally to run the host system corresponding to the system image file.

[0017] Optionally, the cloud platform management device is further used to connect the bare metal server to the provision network;

[0018] The bare metal server is used to download the system image file through the provision network.

[0019] Optionally, the cloud platform management device is configured to perform network configuration of the provision network on the physical switch in response to the online request of the bare metal server; and create a second DHCP port of the provision network;

[0020] The DHCP server is configured to create a second DHCP service in response to the creation operation of the second DHCP port;

[0021] The bare metal server is configured to send a second DHCP request corresponding to the provision network to the DHCP server through a physical switch configured corresponding to the provision network;

[0022] The DHCP server is configured to respond to the second DHCP request through the second DHCP service to allocate an IP address in the provision network to the bare metal server.

[0023] Optionally, the DHCP server is configured to:

[0024] In response to the creation operation of the second DHCP port, creating a second namespace corresponding to the provision network;

[0025] The second DHCP service is run in the second namespace.

[0026] Optionally, the bare metal server is configured to access a Trivial File Transfer Protocol (TFTP) server using the allocated IP address in the provision network, so as to download the system image file from the TFTP server.

[0027] In a second aspect, an embodiment of the present invention provides a bare metal server online method, which is applied to a cloud platform management device, and the method includes:

[0028] When a bare metal server is detected to be switched from the provisioned network to the service network, the physical switch connected to the bare metal server is configured for the service network so that the Dynamic Host Configuration Protocol (DHCP) request sent by the bare metal server reaches the DHCP server through the configured physical switch.

[0029] Obtaining the gateway address of the gateway device corresponding to the service network;

[0030] By reusing the gateway address, a DHCP port of the service network is created, so that the DHCP server creates a DHCP service corresponding to the DHCP port, wherein the DHCP service is used to respond to the DHCP request sent by the bare metal server.

[0031] In a third aspect, an embodiment of the present invention provides a bare metal server online device, which is applied to a cloud platform management device, and the device includes:

[0032] A configuration module is configured to, upon detecting that a bare metal server switches from a provisioned network to a service network, perform network configuration of the service network on a physical switch to which the bare metal server is connected, so that a first Dynamic Host Configuration Protocol (DHCP) request sent by the bare metal server reaches the DHCP server through the configured physical switch;

[0033] An acquisition module, configured to acquire a gateway address of a gateway device corresponding to the service network;

[0034] A creation module is used to create a first DHCP port of the business network by reusing the gateway address, so that the DHCP server creates a first DHCP service corresponding to the first DHCP port, wherein the first DHCP service is used to respond to the first DHCP request sent by the bare metal server.

[0035] Optionally, the device further includes an access module, wherein the access module is configured to:

[0036] The bare metal server is connected to the provision network so that the bare metal server downloads the system image file through the provision network.

[0037] Optionally, the creation module is further configured to:

[0038] In response to the online request of the bare metal server, performing network configuration of the provision network on the physical switch;

[0039] A second DHCP port is created for the provision network, so that the DHCP server correspondingly creates a second DHCP service corresponding to the second DHCP port, wherein the second DHCP service is used to respond to a second DHCP request sent by the bare metal server.

[0040] In a fourth aspect, an embodiment of the present invention provides a bare metal server online method, which is applied to a Dynamic Host Configuration Protocol DHCP server, and the method includes:

[0041] In response to the cloud platform management device creating a DHCP port corresponding to the business network, obtaining a gateway address of a gateway device of the business network;

[0042] Creating a DHCP service and running the DHCP service through the gateway address;

[0043] When a DHCP request corresponding to the business network is received from the bare metal server, the DHCP service responds to the DHCP request to allocate an Internet Protocol (IP) address in the business network to the bare metal server.

[0044] Optionally, the creating a DHCP service and running the DHCP service through the gateway address includes:

[0045] Create a namespace and DHCP service corresponding to the business network;

[0046] The DHCP service is run in the namespace through the gateway address.

[0047] In a fifth aspect, an embodiment of the present invention provides a bare metal server online device, which is applied to a Dynamic Host Configuration Protocol DHCP server, and the device includes:

[0048] An acquisition module, configured to acquire a gateway address of a gateway device of the business network in response to a creation operation of a DHCP port corresponding to the business network by the cloud platform management device;

[0049] A creation module, configured to create a DHCP service and run the DHCP service through the gateway address;

[0050] The response module is configured to, upon receiving a DHCP request corresponding to the business network sent by the bare metal server, respond to the DHCP request through the DHCP service to allocate an Internet Protocol IP address in the business network to the bare metal server.

[0051] Optionally, the creation module is used to:

[0052] Create a namespace and DHCP service corresponding to the business network;

[0053] The DHCP service is run in the namespace through the gateway address.

[0054] By adopting the present invention, regardless of whether there are any available IP addresses in the business network, a separate IP address is not used to create the first DHCP port and run the first DHCP service. Instead, the first DHCP port is created and the first DHCP service is run by reusing the gateway address of the gateway device of the business network. Since the gateway address of the gateway device of the business network generally exists, creating the first DHCP port and running the first DHCP service by reusing the gateway address can ensure that the first DHCP port can be successfully created and the first DHCP service can be successfully run. When the first DHCP port and the first DHCP service can be successfully created or run, the DHCP server can normally respond to the first DHCP request received from the bare metal server, thereby ensuring that the IP address of the business network can be normally allocated to the bare metal server. In this way, the bare metal server can successfully go online on the business network without failure due to the lack of available IP addresses in the business network. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0056] Figure 1 A schematic diagram of the structure of a bare metal server online system provided by an embodiment of the present invention;

[0057] Figure 2 A signaling interaction diagram for a bare metal server going online on a business network, provided by an embodiment of the present invention;

[0058] Figure 3 A signaling interaction diagram for the provision phase provided by an embodiment of the present invention;

[0059] Figure 4 A schematic diagram of a bare metal server online method provided in an embodiment of the present invention;

[0060] Figure 5 A schematic diagram of a process for bringing a bare metal server online provided by an embodiment of the present invention;

[0061] Figure 6 A schematic diagram of the structure of a bare metal server online device provided by an embodiment of the present invention;

[0062] Figure 7 A schematic structural diagram of a bare metal server online device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0063] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of 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. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0064] The terms used in the embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The singular forms "a," "an," "the," and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, and unless the context clearly indicates otherwise, "a plurality" generally includes at least two.

[0065] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.

[0066] In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.

[0067] Figure 1 A schematic diagram of the structure of a bare metal server online system provided by an embodiment of the present invention is shown as follows: Figure 1 As shown, the system may include a cloud platform management device 11 , a Dynamic Host Configuration Protocol (DHCP) server 12 and a bare metal server 13 .

[0068] Among them, the cloud platform management device 11 can be a device built with Openstack (a cloud computing management platform). Through Openstack in the cloud platform management device 11, resource management can be achieved, and resources can be provided to upper-layer applications or users in the form of services. Openstack can be composed of multiple components, and different components are used to implement different functions and provide different services. The components included in Openstack can be, for example, Neutron, Ironic and other components. Among them, Neutron can be used to provide network services, and Ironic can be used to manage bare metal servers 13 and provide services such as deployment and power management.

[0069] A variety of functions can be implemented based on Openstack, including creating virtual machines, managing virtual machine launches, creating bare metal servers 13, and managing bare metal server 13 launches.

[0070] A virtual machine is an operating system that simulates complete hardware system functions through software and runs in a completely isolated environment. Any work that can be done on a physical server can also be done on a virtual machine. When creating a virtual machine on a server, part of the server's hard drive and memory capacity is used as the virtual machine's hard drive and memory capacity. Each virtual machine has its own independent complementary metal oxide semiconductor (CMOS), hard drive, and operating system, allowing it to be operated just like a physical server.

[0071] However, virtual machines execute tasks by invoking underlying physical resources through the virtualization platform or virtual machine controller. Consequently, virtual machines suffer from performance penalties, and especially for tasks requiring high performance (such as high-performance computing), performance limitations can lead to significant latency during the execution of these tasks.

[0072] This is why bare metal servers (BMSs) have emerged. These servers are physical servers with real physical resources. They are flexible and elastic, offering high-performance computing capabilities comparable to traditional physical servers while also offering secure physical isolation.

[0073] It is understood that if a bare metal server 13 is to be used to perform user-specified tasks, it is necessary to create the bare metal server 13 before actually using it, and then connect the bare metal server 13 to the service network established by the user. Connecting the bare metal server 13 to the service network may include configuring an IP address for the service network for the bare metal server 13. The DHCP server 12 in the system provided in this embodiment of the present invention is used to assign an IP address for the service network to the bare metal server 13 when the bare metal server 13 comes online.

[0074] In addition, the DHCP server 12 in the embodiment of the present invention may be a centralized DHCP server 12. Unlike a distributed DHCP server 12, the centralized DHCP server 12 is a server dedicated to allocating IP addresses to the bare metal servers 13. Specifically, the centralized DHCP server 12 provides an IP address allocation service to the bare metal servers 13 through a centralized DHCP service.

[0075] The functions of each device in the system provided by the embodiment of the present invention may include:

[0076] The cloud platform management device 11 is configured to perform network configuration for the physical switch connected to the bare metal server 13 upon detecting that the bare metal server 13 has switched from the provisioning network to the service network. The device obtains the gateway address of the gateway device corresponding to the service network and creates the first DHCP port for the service network by reusing the gateway address.

[0077] The DHCP server 12 is configured to create a first DHCP service in response to the creation operation of the first DHCP port, and run the first DHCP service through the gateway address.

[0078] The bare metal server 13 is configured to send a first DHCP request corresponding to the service network to the DHCP server 12 through a physical switch configured corresponding to the service network.

[0079] The DHCP server 12 is configured to respond to the first DHCP request through a first DHCP service to allocate an IP address in the service network to the bare metal server 13 .

[0080] like Figure 2 FIG. 1 is a diagram showing signaling interactions between devices in a system according to an embodiment of the present invention. Figure 2 This interaction may include:

[0081] 201. When detecting that the bare metal server 13 switches from the provision network to the service network, the cloud platform management device 11 performs network configuration of the service network on the physical switch connected to the bare metal server 13.

[0082] 202. The cloud platform management device 11 obtains the gateway address of the gateway device corresponding to the service network.

[0083] 203. The cloud platform management device 11 creates a first DHCP port of the service network by reusing the gateway address.

[0084] 204. In response to the creation operation of the first DHCP port, the DHCP server 12 creates a first DHCP service and runs the first DHCP service through the gateway address.

[0085] 205. The bare metal server 13 sends a first DHCP request corresponding to the service network to the DHCP server 12 through the physical switch configured corresponding to the service network.

[0086] 206 . The DHCP server 12 responds to the first DHCP request through the first DHCP service to allocate an IP address in the service network to the bare metal server 13 .

[0087] It should be noted that the bare metal server 13 does not have a host system installed before going online. However, the operation of the bare metal server 13 depends on the host system. Therefore, before connecting the bare metal server 13 to the business network, the host system must be deployed on the bare metal server 13. This host system deployment process can be implemented during the provisioning phase. To deploy the host system on the bare metal server 13, before connecting the bare metal server 13 to the business network, it is necessary to first connect the bare metal server 13 to the provisioning network and download the system image file corresponding to the host system through the provisioning network.

[0088] The provision network is a shared network. Before different users bring the bare metal servers 13 online to their respective deployed business networks, they can first connect each bare metal server 13 to the shared provision network.

[0089] Optionally, the process of connecting the bare metal server 13 to the provision network can be implemented as follows: the cloud platform management device 11 is configured to perform network configuration for the provision network on the physical switch in response to the bare metal server 13's online request; and a second DHCP port for the provision network is created. The DHCP server 12 is configured to create a second DHCP service in response to the creation of the second DHCP port. The bare metal server 13 is configured to send a second DHCP request corresponding to the provision network to the DHCP server 12 via the physical switch configured for the provision network. The DHCP server 12 responds to the second DHCP request via the second DHCP service to assign an IP address in the provision network to the bare metal server 13.

[0090] like Figure 3 The following is a signaling interaction diagram for connecting the bare metal server 13 to the provision network. Figure 3 This interaction may include:

[0091] 301. In response to the online request of the bare metal server 13, the cloud platform management device 11 performs network configuration of the provision network on the physical switch.

[0092] 302. The cloud platform management device 11 creates a second DHCP port of the provision network.

[0093] 303. In response to the creation operation of the second DHCP port, the DHCP server 12 creates a second DHCP service.

[0094] 304. The bare metal server 13 sends a second DHCP request corresponding to the provision network to the DHCP server 12 through the physical switch configured corresponding to the provision network.

[0095] 305 . The DHCP server 12 responds to the second DHCP request through a second DHCP service to allocate an IP address in the provision network to the bare metal server 13 .

[0096] In actual applications, users can create a bare metal server 13 through OpenStack and operate the bare metal server 13 online. When the bare metal server 13 online operation is detected, a bare metal server 13 online request can be generated accordingly. In response to the bare metal server 13 online request, the Neutron component in OpenStack can use the neutronserver service and the networkingodl tool to send the network configuration information of the provision network to the physical switch, so that the physical switch can complete the network configuration of the provision network based on the network configuration information.

[0097] The physical switch refers to the physical switch connected to the bare metal server 13. It is understood that in an actual network, multiple physical switches are interconnected. If you want to connect the bare metal server 13 to the network, you need to connect the bare metal server 13 to a physical switch, so that the network can be connected for the bare metal server 13.

[0098] The network configuration information sent to the physical switch may include configuration information for the physical switch access ports and overlay network configuration information. Overlay network configuration information may include interface-specific virtual local area networks (VLANs), aggregation configuration information, and virtual extensible local area network (VXLAN) configuration information.

[0099] Optionally, the cloud platform management device 11 can configure the physical switch by sending network configuration information to the controller, which then performs network configuration on the physical switch based on the received network configuration information. Furthermore, it should be noted that if the cloud platform management device 11 and the controller are considered as a whole, then the cloud platform management device 11 can also be considered to be performing network configuration on the physical switch.

[0100] By configuring the physical switch, after a DHCP request is sent from the bare metal server 13, the DHCP request can be broadcast to the DHCP server 12. Otherwise, the DHCP request cannot reach the DHCP server 12, and the DHCP server 12 cannot respond to the request, and thus cannot assign an IP address to the bare metal server 13.

[0101] A second DHCP port for the provision network can also be created in OpenStack. When the second DHCP port is created in OpenStack, the DHCP server 12 optionally creates a second DHCP server and a second namespace corresponding to the provision network, and then runs a second DHCP server in the second namespace. The DHCP server is used to respond to DHCP requests.

[0102] It's important to note that a namespace can be thought of as an isolated container and independent resource. It provides the operating environment for the DHCP server. In practice, different networks can be mapped to different namespaces. Traffic requesting different network IP addresses is processed in the corresponding namespace, isolating different networks from each other.

[0103] When the DHCP server 12 receives the second DHCP request from the bare metal server 13 , it can respond through the second DHCP server running in the second Namespace, thereby allocating an IP address in the provision network to the bare metal server 13 .

[0104] The following describes how to create a second DHCP port and run the second DHCP service.

[0105] In practice, the provision network's network address is required when creating a secondary DHCP port and running a secondary DHCP service. In the first option, you can obtain the provision network's IP address and create a secondary DHCP port or run a secondary DHCP service based on it. In the second option, you can obtain the gateway address of the provision network's gateway device and reuse it to create a secondary DHCP port or run a secondary DHCP service.

[0106] It is worth noting that if the second optional method is adopted, available IP addresses in the provision network can be saved for the provision network, that is, network resources of the provision network can be saved.

[0107] In some optional embodiments, the user can specify a system image file to be deployed to the bare metal server 13. The system image file can be stored on a Trivial File Transfer Protocol (TFTP) server. After the bare metal server 13 is connected to the provision network, the bare metal server 13 can optionally access the TFTP server using the assigned IP address of the provision network to download the system image file from the TFTP server.

[0108] Optionally, the bare metal server 13 can be used to: obtain a system image file specified by a user; and start the server in a local startup manner to run a host system corresponding to the system image file.

[0109] Specifically, after the bare metal server 13 downloads the user-specified system image file, it notifies the Ironic component in OpenStack. Ironic, through the baseboard management controller (BMC), configures the bare metal server 13 to boot locally. This allows the bare metal server 13 to boot locally, thereby running the host system corresponding to the system image file.

[0110] It is understood that after the bare metal server 13 completes the local startup operation, the provisioning phase is complete, and the bare metal server 13 can then be controlled to switch from the provision network to the service network. Optionally, the cloud platform management device 11 can also be configured to disconnect the bare metal server 13 from the provision network after detecting that the bare metal server 13 has completed the local startup. This can free up network resources in the provision network.

[0111] In some optional embodiments, the process of disconnecting the bare metal server 13 from the provision network can be specifically implemented as follows: Ironic notifies Neutron to delete the network configuration corresponding to the second DHCP port and the provision network in the physical switch. Accordingly, the DHCP server 12 deletes the second namespace.

[0112] As can be seen from the provisioning phase's operational flow, before actually connecting to the service network, a series of device interactions are required during the provisioning phase to connect the bare metal server 13 to the provisioning network and download the user-specified system image file through the provisioning network to complete the deployment of the system image file. Therefore, the execution of the provisioning phase takes a considerable amount of time.

[0113] Based on this, during the time between the creation of the bare metal server 13 and the switching of the bare metal server 13 from the provision network to the business network, if there are continuously cloud hosts online in the business network, then the online cloud hosts will occupy the available IP addresses of the business network. Among them, cloud hosts refer to virtual machines and other bare metal servers 13. If these cloud hosts completely exhaust the available IP addresses of the business network, then the subsequent online operation of the bare metal server 13 in the business network will be affected. Because the network address is required for certain links in the online operation of the bare metal server 13 in the business network. The technical solution provided by the embodiment of the present invention can ensure that after the bare metal server 13 is created, even if there are continuously cloud hosts online on the business network during the provision stage, the bare metal server 13 can be successfully online on the business network. The following will describe in detail the process of the bare metal server 13 switching from the provision network to the business network.

[0114] When it is detected that the bare metal server 13 has switched from the provisioning network to the business network, the cloud platform management device 11 performs network configuration of the business network on the physical switch connected to the bare metal server 13. Specifically, after detecting that the bare metal server 13 has completed the local startup operation, the Ironic component in Openstack can notify the Neutron component to configure the physical switch. Based on the neutronserver service, the Neutron component can use the networkingodl tool to send the network configuration information of the business network to the physical switch, so that the physical switch can complete the network configuration of the business network based on the network configuration information.

[0115] Next, you need to create the first DHCP port for the service network in OpenStack. Since creating the first DHCP port requires the service network's network address, if no available IP addresses exist in the service network, creating the first DHCP port using the IP address will fail. In this embodiment of the present invention, regardless of whether the service network still has available IP addresses, the first DHCP port is not created using a separate IP address. Instead, the first DHCP port is created by reusing the gateway address of the service network's gateway device.

[0116] Since the gateway address of the gateway device of the business network generally exists, creating the first DHCP port by reusing the gateway address can ensure that the first DHCP port can be successfully created. In addition, it should be noted that since the gateway address needs to be reused, the gateway address of the gateway device can also be obtained before creating the first DHCP port, and the gateway address can be reused after the gateway address is known. Specifically, the gateway address of the gateway device can be initially configured in the cloud platform management device 11, and the cloud platform management device 11 sends the gateway address to the controller, and then the controller configures the gateway address of the gateway device. Based on this, the gateway address of the gateway device is stored in the cloud platform management device 11, so the cloud platform management device 11 can directly obtain the gateway address of the gateway device locally.

[0117] When the first DHCP port is created in OpenStack, the DHCP server 12 may optionally create a first DHCP server and a first namespace corresponding to the service network, and then run the first DHCP server in the first namespace. The first DHCP server may be implemented based on DNSmasq (a compact and convenient tool for configuring DNS and DHCP, suitable for small networks, which provides DNS functionality and optional DHCP functionality).

[0118] It should be noted that the concepts of DHCP server and namespace are explained in the previous section describing the provision network. Their meanings and functions here are similar, so you can refer to the previous description and will not elaborate on them here.

[0119] It is worth noting that since the first DHCP service in the first namespace requires the network address of the service network, if no available IP address exists in the service network, the first DHCP service cannot be run normally using the IP address. In this embodiment of the present invention, the first DHCP service can be run by reusing the gateway address of the gateway device in the service network, thereby ensuring the normal operation of the first DHCP service.

[0120] The above method ensures the successful creation of the first DHCP port and the operation of the first DHCP service. Only when the first DHCP port and the first namespace are successfully created or operated can DHCP server 12 properly respond to the first DHCP request received from bare metal server 13, thereby ensuring that the IP address of the business network can be properly allocated to bare metal server 13, so that bare metal server 13 can successfully go online on the business network.

[0121] It's also worth noting that even if there are no available IP addresses in the business network, as long as the first DHCP port is successfully created and the first DHCP service is running, the business network's IP address can be properly assigned to the bare metal server 13. This is because when the bare metal server 13 is initially created, an IP address is already occupied in the business network. In other words, the business network reserves an IP address for the bare metal server 13 at the time of its creation, so the bare metal server 13 can obtain an IP address in the business network. In contrast, if there are no available IP addresses in the business network at the time of bare metal server 13 creation, the creation of the bare metal server 13 will fail, and the subsequent process of bringing the bare metal server 13 online will be unnecessary.

[0122] After creating the first Namespace and running the first DHCP server in the first Namespace, when the DHCP server 12 receives the first DHCP request from the bare metal server 13, the first DHCP server can respond to the first DHCP request with the gateway address, thereby allocating an IP address in the business network to the bare metal server 13.

[0123] In certain optional embodiments, because the first namespace in DHCP server 12 reuses the gateway address, traffic destined for the gateway address also reaches DHCP server 12, raising the question of how DHCP server 12 handles this traffic. This embodiment of the present invention provides a solution to this problem. Optionally, DHCP server 12 is configured to: receive a pending request; if the pending request is a first DHCP request corresponding to a service network, respond to the first DHCP request via the first DHCP service running in the first namespace; and if the pending request is not a first DHCP request corresponding to a service network, not process or discard the pending request.

[0124] In actual application, DHCP server 12 only processes services for itself, such as the first DHCP request corresponding to the service network. For other services that are not its own, it may not process or discard pending requests.

[0125] Specifically, the above process can be implemented through a flow table (OpenFlow). Optionally, the DHCP server 12 is used to: determine the operational behaviors corresponding to different pending requests based on the flow table. The flow table also specifies the operational behaviors corresponding to different pending requests; when the pending request is the first DHCP request corresponding to the service network, the operational behavior includes responding to the first DHCP request through the first DHCP service running in the first namespace; when the pending request is not the first DHCP request corresponding to the service network, the operational behavior includes not processing or discarding the pending request.

[0126] Before actually processing the pending request, it is necessary to identify whether the pending request corresponds to the first DHCP request of the service network. Based on this, the DHCP server 12 can also be used to: determine whether the pending request is the first DHCP request corresponding to the service network based on the matching domain in the flow table.

[0127] The matching domain can be used to distinguish different traffic flows.

[0128] In the flow table, different operational behaviors are set for different pending requests. For example, if a pending request is identified as the first DHCP request for a service network, the first DHCP service running in the first namespace can respond to the first DHCP request based on the corresponding operational behavior recorded in the flow table. If a pending request is identified as not the first DHCP request for a service network, it indicates that DHCP server 12 does not need to process it. Therefore, the pending request can be ignored or discarded based on the corresponding operational behavior recorded in the flow table.

[0129] In addition, in some optional embodiments, the cloud platform management device 11 can also be used to delete the network configuration of the service network in the physical switch in response to the event of deleting the first DHCP port. The DHCP server 12 can also be used to delete the first namespace.

[0130] The event of deleting the first DHCP port may include deleting the first DHCP port in Openstack, deleting the service network by a user, and the like.

[0131] When the event of deleting the first DHCP port is detected, the network configuration of the service network and the first Namespace in the physical switch can be deleted accordingly, thereby releasing certain network resources.

[0132] By adopting the present invention, regardless of whether there are any available IP addresses in the business network, a separate IP address is not used to create the first DHCP port and run the first DHCP service. Instead, the first DHCP port is created and the first DHCP service is run by reusing the gateway address of the gateway device of the business network. Since the gateway address of the gateway device of the business network generally exists, creating the first DHCP port and running the first DHCP service by reusing the gateway address can ensure that the first DHCP port can be successfully created and the first DHCP service can be successfully run. When the first DHCP port and the first DHCP service can be successfully created or run, the DHCP server can normally respond to the first DHCP request received from the bare metal server, thereby ensuring that the IP address of the business network can be normally allocated to the bare metal server. In this way, the bare metal server can successfully go online on the business network without failure due to the lack of available IP addresses in the business network.

[0133] Figure 4 This is a bare metal server online method provided by an embodiment of the present invention, which can be applied to cloud platform management equipment. Figure 4 As shown, the method includes:

[0134] 401. When it is detected that the bare metal server switches from the provision network to the service network, the physical switch connected to the bare metal server is configured for the service network so that the DHCP request sent by the bare metal server reaches the DHCP server through the configured physical switch.

[0135] 402. Obtain the gateway address of the gateway device corresponding to the business network.

[0136] 403. Create a DHCP port for the service network by reusing the gateway address, so that the DHCP server creates a DHCP service corresponding to the DHCP port. The DHCP service is used to respond to the DHCP request sent by the bare metal server.

[0137] Figure 4 The specific implementation methods of each step in the illustrated embodiment have been described in detail in the aforementioned system embodiment. The bare metal server online method provided in this embodiment can be implemented with reference to the description of the aforementioned embodiment, and will not be elaborated on here.

[0138] Figure 5 This is a bare metal server online method provided by an embodiment of the present invention, which can be applied to a DHCP server. Figure 5 As shown, the method includes:

[0139] 501. In response to the cloud platform management device creating an operation on the DHCP port corresponding to the service network, obtain a gateway address of a gateway device of the service network.

[0140] 502. Create a DHCP service and run the DHCP service through the gateway address.

[0141] 503. When a DHCP request corresponding to the business network is received from the bare metal server, the DHCP service responds to the DHCP request to allocate an IP address in the business network to the bare metal server.

[0142] Optionally, the process of creating a DHCP service and running the DHCP service through the gateway address may be implemented as follows: creating a namespace and a DHCP service corresponding to the service network; and running the DHCP service through the gateway address in the namespace.

[0143] Figure 5 The specific implementation methods of each step in the illustrated embodiment have been described in detail in the aforementioned system embodiment. The bare metal server online method provided in this embodiment can be implemented with reference to the description of the aforementioned embodiment, and will not be elaborated on here.

[0144] The following describes in detail one or more embodiments of the bare metal server online device of the present invention. Those skilled in the art will appreciate that these bare metal server online devices can be configured using commercially available hardware components and the steps taught in this solution.

[0145] Figure 6 A schematic diagram of a bare metal server online device provided by an embodiment of the present invention is shown in FIG. Figure 6 As shown, the device includes:

[0146] A configuration module 61 is configured to, upon detecting that a bare metal server switches from a provisioned network to a service network, perform network configuration of the service network on a physical switch connected to the bare metal server, so that a first Dynamic Host Configuration Protocol (DHCP) request sent by the bare metal server reaches the DHCP server through the configured physical switch;

[0147] An acquisition module 62 is configured to acquire a gateway address of a gateway device corresponding to the service network;

[0148] The creation module 63 is configured to create a first DHCP port of the service network by reusing the gateway address, so that the DHCP server creates a first DHCP service corresponding to the first DHCP port, wherein the first DHCP service is used to respond to the first DHCP request sent by the bare metal server.

[0149] Optionally, the device further includes an access module, wherein the access module is configured to:

[0150] The bare metal server is connected to the provision network so that the bare metal server downloads the system image file through the provision network.

[0151] Optionally, the creation module 63 is further configured to:

[0152] In response to the online request of the bare metal server, performing network configuration of the provision network on the physical switch;

[0153] A second DHCP port is created for the provision network, so that the DHCP server correspondingly creates a second DHCP service corresponding to the second DHCP port, wherein the second DHCP service is used to respond to a second DHCP request sent by the bare metal server.

[0154] Figure 6 The device shown can perform the aforementioned Figure 4 The bare metal server online method provided in the illustrated embodiment, the detailed execution process and technical effects are described in the aforementioned embodiment and will not be repeated here.

[0155] Figure 7 A schematic diagram of a bare metal server online device provided by an embodiment of the present invention is shown in FIG. Figure 7 As shown, the device includes:

[0156] An acquisition module 71 is configured to acquire a gateway address of a gateway device of a business network in response to a creation operation of a DHCP port corresponding to the business network by a cloud platform management device;

[0157] A creation module 72, configured to create a DHCP service and run the DHCP service through the gateway address;

[0158] The response module 73 is configured to, upon receiving a DHCP request corresponding to the service network sent by the bare metal server, respond to the DHCP request through the DHCP service to allocate an Internet Protocol IP address in the service network to the bare metal server.

[0159] Optionally, the creation module 72 is configured to:

[0160] Create a namespace and DHCP service corresponding to the business network;

[0161] The DHCP service is run in the namespace through the gateway address.

[0162] Figure 7 The device shown can perform the aforementioned Figure 5 The bare metal server online method provided in the illustrated embodiment, the detailed execution process and technical effects are described in the aforementioned embodiment and will not be repeated here.

[0163] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by a combination of hardware and software. Based on this understanding, the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a computer product. The present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0164] The bare metal server online method provided in an embodiment of the present invention can be executed by a certain program / software, which can be provided by the network side. The electronic device mentioned in the aforementioned embodiment can download the program / software to a local non-volatile storage medium, and when it needs to execute the aforementioned bare metal server online method, the program / software is read into the memory through the CPU, and then the CPU executes the program / software to implement the bare metal server online method provided in the aforementioned embodiment.

[0165] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A bare metal server online system, characterized in that: The system includes a cloud platform management device, a Dynamic Host Configuration Protocol (DHCP) server, and a bare metal server, wherein: The cloud platform management device is configured to, upon detecting that the bare metal server switches from the provisioned network to the service network, perform network configuration of the service network on the physical switch to which the bare metal server is connected; obtain the gateway address of the gateway device corresponding to the service network; and create a first DHCP port of the service network by reusing the gateway address; The DHCP server is configured to create a first DHCP service in response to a creation operation of the first DHCP port, and run the first DHCP service through the gateway address; The bare metal server is configured to send a first DHCP request corresponding to the business network to the DHCP server through a physical switch configured corresponding to the business network; The DHCP server is configured to respond to the first DHCP request through the first DHCP service to allocate an Internet Protocol (IP) address in the service network to the bare metal server.

2. The system according to claim 1, wherein: The DHCP server is used to: In response to the creation operation of the first DHCP port, creating a first namespace corresponding to the service network; The first DHCP service is run in the first namespace using the gateway address.

3. The system according to claim 1, wherein: The bare metal server is also used for: When accessing the provision network, obtaining the system image file specified by the user; Start the system locally to run the host system corresponding to the system image file.

4. The system according to claim 3, characterized in that The cloud platform management device is further used to connect the bare metal server to the provision network; The bare metal server is used to download the system image file through the provision network.

5. The system according to claim 4, characterized in that The cloud platform management device is configured to perform network configuration of the provision network on the physical switch in response to the bare metal server's online request; and create a second DHCP port for the provision network; The DHCP server is configured to create a second DHCP service in response to the creation operation of the second DHCP port; The bare metal server is configured to send a second DHCP request corresponding to the provision network to the DHCP server through a physical switch configured corresponding to the provision network; The DHCP server is configured to respond to the second DHCP request through the second DHCP service to allocate an IP address in the provision network to the bare metal server.

6. The system according to claim 5, characterized in that The DHCP server is used to: In response to the creation operation of the second DHCP port, creating a second namespace corresponding to the provision network; The second DHCP service is run in the second namespace.

7. The system according to claim 5, characterized in that The bare metal server is used to access a Trivial File Transfer Protocol (TFTP) server through the allocated IP address in the provision network, so as to download the system image file from the TFTP server.

8. A bare metal server online method, characterized in that: Applied to cloud platform management equipment, the method includes: When a bare metal server is detected to be switched from the provisioned network to the service network, the physical switch connected to the bare metal server is configured for the service network so that the Dynamic Host Configuration Protocol (DHCP) request sent by the bare metal server reaches the DHCP server through the configured physical switch. Obtaining the gateway address of the gateway device corresponding to the service network; By reusing the gateway address, a DHCP port of the service network is created, so that the DHCP server creates a DHCP service corresponding to the DHCP port, wherein the DHCP service is used to respond to the DHCP request sent by the bare metal server.

9. A bare metal server online device, characterized in that: Applied to cloud platform management equipment, the device includes: A configuration module is configured to, upon detecting that a bare metal server switches from a provisioned network to a service network, perform network configuration of the service network on a physical switch to which the bare metal server is connected, so that a first Dynamic Host Configuration Protocol (DHCP) request sent by the bare metal server reaches the DHCP server through the configured physical switch; An acquisition module, configured to acquire a gateway address of a gateway device corresponding to the service network; A creation module is used to create a first DHCP port of the business network by reusing the gateway address, so that the DHCP server creates a first DHCP service corresponding to the first DHCP port, wherein the first DHCP service is used to respond to the first DHCP request sent by the bare metal server.

10. The device according to claim 9, characterized in that The device further includes an access module, wherein the access module is configured to: The bare metal server is connected to the provision network so that the bare metal server downloads the system image file through the provision network.

11. The device according to claim 10, characterized in that The creation module is also used to: In response to the online request of the bare metal server, performing network configuration of the provision network on the physical switch; A second DHCP port is created for the provision network, so that the DHCP server correspondingly creates a second DHCP service corresponding to the second DHCP port, wherein the second DHCP service is used to respond to a second DHCP request sent by the bare metal server.

12. A bare metal server online method, characterized in that: Applied to a Dynamic Host Configuration Protocol (DHCP) server, the method includes: In response to the cloud platform management device creating a DHCP port corresponding to the business network, obtaining a gateway address of a gateway device of the business network; Creating a DHCP service and running the DHCP service through the gateway address; When a DHCP request corresponding to the business network is received from the bare metal server, the DHCP service responds to the DHCP request to allocate an Internet Protocol (IP) address in the business network to the bare metal server.

13. The method according to claim 12, characterized in that The step of creating a DHCP service and running the DHCP service through the gateway address includes: Create a namespace and DHCP service corresponding to the business network; The DHCP service is run in the namespace through the gateway address.

14. A bare metal server online device, characterized in that: Applied to a Dynamic Host Configuration Protocol (DHCP) server, the device comprises: An acquisition module, configured to acquire a gateway address of a gateway device of the business network in response to a creation operation of a DHCP port corresponding to the business network by the cloud platform management device; A creation module, configured to create a DHCP service and run the DHCP service through the gateway address; The response module is configured to, upon receiving a DHCP request corresponding to the business network sent by the bare metal server, respond to the DHCP request through the DHCP service to allocate an Internet Protocol IP address in the business network to the bare metal server.

15. The device according to claim 14, characterized in that The creation module is used to: Create a namespace and DHCP service corresponding to the business network; The DHCP service is run in the namespace through the gateway address.

Citation Information

Patent Citations

  • Bare metal server network configuration method and system and related equipment

    CN111901177A

  • Simulated Network Boot Environment for Bootstrap Redirection

    US20130254521A1