WO2023010821A1 - 数据中心中主机发现与添加方法、装置、设备及介质 - Google Patents

数据中心中主机发现与添加方法、装置、设备及介质 Download PDF

Info

Publication number
WO2023010821A1
WO2023010821A1 PCT/CN2022/074595 CN2022074595W WO2023010821A1 WO 2023010821 A1 WO2023010821 A1 WO 2023010821A1 CN 2022074595 W CN2022074595 W CN 2022074595W WO 2023010821 A1 WO2023010821 A1 WO 2023010821A1
Authority
WO
WIPO (PCT)
Prior art keywords
added
message
computing node
discovery
node
Prior art date
Application number
PCT/CN2022/074595
Other languages
English (en)
French (fr)
Inventor
张兆增
Original Assignee
苏州浪潮智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Priority to US18/277,376 priority Critical patent/US11888812B1/en
Publication of WO2023010821A1 publication Critical patent/WO2023010821A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5069Address allocation for group communication, multicast communication or broadcast communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/659Internet protocol version 6 [IPv6] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/695Types of network addresses using masks or ranges of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5038Address allocation for local use, e.g. in LAN or USB networks, or in a controller area network [CAN]

Definitions

  • the present application relates to the field of computer technology, in particular to a method, device, equipment, and medium for discovering and adding hosts in a data center.
  • the network planning method in the system installation process is to assign an IP address (Internet Protocol Address, Internet Protocol Address) to the virtual machine by means of DHCP (Dynamic Host Configuration Protocol, Dynamic Host Configuration Protocol) protocol address).
  • IP addresses obtained in this way are random, so the IP addresses obtained by the host nodes on the cabinet do not appear consecutively in the order of the cabinets, which will cause difficulties in later operation and maintenance.
  • the purpose of this application is to provide a method, device, equipment, and medium for discovering and adding hosts in a data center, which can save the deployment time of the data center and facilitate later operation and maintenance.
  • the specific plan is as follows:
  • the present application discloses a method for discovering and adding hosts in a data center, which is applied to the management nodes of the data center, including:
  • the BMC IPs in each of the discovery response messages are sorted, and the corresponding BMC IPs are sorted according to the order of the BMC IPs
  • the computing node to be added is assigned an IP address, so that the IP addresses allocated to the computing node to be added corresponding to the adjacent BMC IP are continuous, wherein the IP address is an IPv4 address;
  • the computing node to be added when the computing node to be added receives the message, it judges whether to Responding to the received message, wherein the message includes: the discovery message and the adding message, and the state machine state includes a start state, a discovery state, a configuration state, an addition state and a completion state.
  • the method further includes:
  • the discovery response message is a message sent by a computing node according to the role information
  • the discovery response message is a message sent by a computing node, then judging whether the system type of the computing node to be added is consistent with the system type of the management node;
  • system type of the computing node to be added is consistent with the system type of the management node, then determine whether the system version of the computing node to be added is consistent with the system version of the management node;
  • the method further includes:
  • IP addresses to the corresponding computing nodes to be added so that the IP addresses assigned to the computing nodes to be added corresponding to the adjacent BMC IP are continuous , including:
  • IPv6 unicast mode Encapsulating the IP address, the mask corresponding to the IP address, the gateway, and the VLAN into a configuration message, and sending the configuration message to the corresponding computing node to be added through IPv6 unicast mode;
  • the process of sending a discovery message to the scanned computing node to be added by using IPv6 multicast it also includes:
  • the computing node to be added and the management node do not belong to the same network, use the multicast relay of the router between the computing node to be added and the management node to send the discovery message to the Add compute nodes.
  • the present application discloses a method for discovering and adding hosts in a data center, which is applied to computing nodes to be added in the data center, including:
  • the BMC IPs in each of the discovery response messages are sorted, and the corresponding computing nodes to be added are sorted according to the order of the BMC IPs.
  • the node assigns IP address, so that the IP address assigned to the computing node to be added corresponding to the adjacent BMC IP is continuous, wherein the IP address is an IPv4 address;
  • the state machine state includes a start state, a discovery state, Configuration status, Add status, and Completion status.
  • the present application discloses a device for discovering and adding hosts in a data center, which is applied to a management node of a data center, including:
  • the scanning module is used to scan the computing node to be added, wherein, the virtualization system or hyper-converged system on the management node and the computing node to be added is installed at the factory;
  • a discovery module configured to send a discovery message to the scanned computing node to be added in an IPv6 multicast manner, and receive the discovery message sent by the computing node to be added in an IPv6 unicast manner after passing the verification of the discovery message discovery response message;
  • a configuration module configured to sort the BMC IPs in each of the discovery response messages when the verification of the discovery response message is passed, and the computing node to be added is not configured with an IP address, and according to the BMC IP The order of assigning IP addresses to the corresponding computing nodes to be added, so that the IP addresses assigned to the computing nodes to be added corresponding to the adjacent BMC IP are continuous, wherein the IP addresses are IPv4 addresses ;
  • An adding module configured to send an adding message to the computing node to be added after the configuration of the IP address of the computing node to be added is completed, and receive when the computing node to be added passes the verification of the adding message In the returned adding response message, add the computing node to be added to the data center managed by the management node.
  • the computing node to be added when the computing node to be added receives the message, it judges whether to Responding to the received message, wherein the message includes the discovery message and the adding message, and the state machine state includes a start state, a discovery state, a configuration state, an addition state and a completion state.
  • an electronic device comprising:
  • the memory is used to store computer programs
  • the processor is configured to execute the computer program to implement the aforementioned disclosed method for discovering and adding a host in a data center.
  • the present application discloses a computer-readable storage medium for storing a computer program, wherein, when the computer program is executed by a processor, the aforementioned method for discovering and adding a host in a data center is implemented.
  • this application is applied to the management node of the data center to scan the computing nodes to be added, wherein the management node and the virtualization system or hyper-converged system on the computing nodes to be added are installed at the factory. Then utilize the IPv6 multicast mode to send the discovery message to the scanned computing node to be added, and receive the discovery response message that the computing node to be added utilizes the IPv6 unicast mode to send after the verification of the discovery message is passed arts.
  • the BMC IPs in each of the discovery response messages are sorted, and the corresponding BMC IPs are sorted according to the order of the BMC IPs
  • the computing node to be added is allocated an IP address, so that the IP addresses allocated to the computing node to be added corresponding to the adjacent BMC IP are continuous, wherein the IP address is an IPv4 address.
  • an adding message is sent to the computing node to be added, and an adding response returned by the computing node to be added when the verification of the adding message is passed is received message, adding the computing node to be added to the data center managed by the management node.
  • the virtualization system or hyper-converged system on the management node and computing node in this application is installed at the factory, so it is not necessary to start the management node and computing after arriving at the user site and obtaining the user network plan.
  • Node virtualization or hyper-converged system deployment can greatly save the time of system deployment on the node, that is, it can save the deployment time of the data center.
  • the management node When the management node allocates IP addresses for the computing nodes to be added, it first assigns each computing node BMC IP sorting, and then according to the order of the BMC IP, allocate IP addresses for the corresponding computing nodes to be added, so that the IP addresses assigned to the computing nodes to be added corresponding to the adjacent BMC IP are continuous, Since the BMC IP indicates the order of the computing nodes in the cabinet, the IP addresses assigned to each connected computing node can also be continuous, which is conducive to later operation and maintenance.
  • FIG. 1 is a flowchart of a method for discovering and adding a host in a data center disclosed in the present application
  • FIG. 2 is a flow chart of a host discovery disclosed in the present application.
  • FIG. 3 is a flow chart of computing node configuration disclosed in the present application.
  • FIG. 4 is a flow chart of adding a host disclosed in the present application.
  • FIG. 5 is a schematic diagram of an application environment for a host discovery and addition method in a data center disclosed in the present application
  • FIG. 6 is an interaction diagram between a management node disclosed in the present application and a computing node to be added;
  • FIG. 7 is a flow chart of a method for discovering and adding a host in a data center disclosed in the present application.
  • FIG. 8 is a schematic structural diagram of a device for discovering and adding hosts in a data center disclosed in the present application.
  • FIG. 9 is a schematic structural diagram of a device for discovering and adding hosts in a data center disclosed in the present application.
  • FIG. 10 is a schematic structural diagram of an electronic device disclosed in the present application.
  • the current installation process has the following deficiencies: the network planning method in the system installation process is to assign an IP address (Internet Protocol Address, Internet Protocol address) to the virtual machine through DHCP (Dynamic Host Configuration Protocol, Dynamic Host Configuration Protocol) )of.
  • IP addresses obtained in this way are random, so the IP addresses obtained by the host nodes on the cabinet do not appear consecutively in the order of the cabinets, which will cause difficulties in later operation and maintenance.
  • this application proposes a method for discovering and adding hosts in a data center, which can save the deployment time of the data center and is beneficial to later operation and maintenance.
  • the embodiment of the present application discloses a method for discovering and adding a host in a data center, which is applied to a management node of a data center, and the method includes:
  • Step S11 Scanning the computing nodes to be added, wherein the management node and the virtualization system or hyper-converged system on the computing nodes to be added are installed at the factory.
  • the management node needs to scan the computing nodes to be added in order to find out which computing nodes to be added can be added, wherein the virtualization system or hyper-converged
  • the system is installed when the equipment leaves the factory, so it is not necessary to start the virtualization or hyper-converged system of management nodes and computing nodes after arriving at the user's site and obtaining the user's network plan, so it can greatly save the time for system deployment on the nodes. That is, the deployment time of the data center can be saved.
  • a host discovery service may be installed on the management node and the computing node to be added.
  • the host discovery service on the computing node to be added is turned on, so that when the host discovery service on the management node scans the computing nodes to be added in the data center, the management node can scan the to-be-added calculate node.
  • Step S12 Using IPv6 multicast to send a discovery message to the scanned computing node to be added, and receiving the discovery message sent by the computing node to be added in IPv6 unicast mode after the verification of the discovery message is passed Response message.
  • the management node After the management node scans the computing node to be added, it also needs to use IPv6 multicast to send a discovery message to the computing node to be scanned, and receive the discovery message from the computing node to be added. A discovery response packet sent in IPv6 unicast mode after the packet verification is passed. Since the computing node to be added may not be configured with an IP address, wherein the IP address is an IPv4 address, the management node uses IPv6 multicast to send a discovery message to the computing node to be added, and the computing node to be added Sending a discovery response message to the management node in an IPv6 unicast manner.
  • the management node During the process of communicating with the computing node to be added, the management node will use messages for communication, wherein the format of the messages is as follows:
  • the system field indicates the system type of the virtualization system or hyper-converged system of the node sending the message
  • Type indicates the type of the message
  • role indicates the role of the node sending the message, that is, the node sending the message is a management node It is still a computing node
  • version indicates the system version of the node
  • management_ipv4 indicates the IP address of the node sending the message, where the IP address is an IPv4 address
  • netmask indicates the mask of the node sending the message
  • gateway indicates the node sending the message gateway
  • management_VLAN represents the VLAN (Virtual Local Area Network, virtual local area network) of the node sending the message
  • bmc_ip represents the BMC (Baseboard Management Controller, Baseboard Management Controller) IP of the node sending the message
  • ex_info represents an expandable field.
  • the management node first uses IPv6 multicast to send a discovery message to the scanned computing node to be added, wherein the format of the discovery message is as above, except that the Type field carries the message type, namely DISCOVERY; role carries the role that sent this message, that is, the management node con; verison carries the version number of the system installed on the node that sent this message; management_ipv4, netmask, gateway, and management_VLAN represent the IPv4 address, mask, and gateway of the node that sent this message , VLAN; bmc_ip refers to the node's out-of-band management IP, which is empty in this message.
  • ex_info is a reserved font, which is used to reserve fields that need to be carried in the future to facilitate the expansion of this function.
  • the computing node to be added After the computing node to be added receives the discovery message, it also needs to verify the discovery message, and after passing the verification of the discovery message, send a discovery response message to the management node arts. Specifically, the computing node to be added will send a discovery response message in IPv6 unicast mode after the discovery message is verified.
  • the discovery response message includes: the System field carries the system name of the computing node to be added that sends this message; the Type field carries the message type, that is, ACK_DISCOVERY; role carries the role that sent this message, that is, the computing node com; verison carries the sender The version number of the system installed on the node of this message; management_ipv4, netmask, gateway, and management_VLAN indicate the IPv4 address, mask, gateway, and VLAN of the node sending this message.
  • the fields may be It is empty; bmc_ip refers to the out-of-band management IP of the computing node, and ex_info is a reserved font, which is used to reserve fields that need to be carried in the future to facilitate the expansion of this function.
  • FIG. 2 it is a flow chart of host discovery.
  • the management node starts to send DISCOVERY messages, which are sent within the network in the form of IPv6 multicast messages.
  • the computing node to be added is configured with an IPv6 local address by default, and all computing nodes to be added in the network can receive the DISCOVERY message.
  • the computing node to be added After the computing node to be added receives the DISCOVERY message, it starts to analyze the information in the DISCOVERY message.
  • This information includes the system type, role, and system version of the management node. Some fields, such as management_ipv4 and management_VLAN, are empty in the DISCOVERY message, because at this stage, the computing nodes to be added do not need these information.
  • the computing node to be added will verify the system type, role, and system version of the management node. The content of the verification includes whether the system is consistent with the computing node to be added, whether it is issued by the management node, and whether the version of the management node is the same as the version of this node. The computing nodes are consistent. If the check fails, no action is taken. If the inspection can pass.
  • the information encapsulated in the message mainly includes the system type, role, and system version VLAN of the computing node to be added.
  • the ACK_DISCOVERY message also includes the currently used IPv4 address and VLAN, and the ACK_DISCOVERY message It is no longer sent in the form of multicast but in the form of unicast IPv6 UDP (User Datagram Protocol, User Datagram Protocol) message, because at this time the computing node to be added already knows the IPv6 address of the management node.
  • the management node parses the information in the message, mainly including: the system type, role, and system version of the computing node to be added, and may also include the IPv4 address and VLAN of the computing node to be added.
  • Step S13 When the verification of the discovery response message is passed and the computing node to be added is not configured with an IP address, sort the BMC IPs in each of the discovery response messages, and sort the BMC IPs according to the order of the BMC IPs Assigning an IP address to the corresponding computing node to be added, so that the IP addresses assigned to the computing node to be added corresponding to the adjacent BMC IP are continuous, wherein the IP address is an IPv4 address.
  • the management node sorts the BMC IPs in each of the discovery response messages, and according to the BMC IP The order of assigning IP addresses to the corresponding computing nodes to be added, so that the IP addresses assigned to the computing nodes to be added corresponding to the adjacent BMC IP are continuous, wherein the IP addresses are IPv4 addresses .
  • the computing node to be added in IPv6 unicast mode after receiving the discovery response message sent by the computing node to be added in IPv6 unicast mode after the verification of the discovery message is passed, it also includes: parsing the discovery response message to obtain Extracting system information and role information of the computing node to be added from the discovery response message, wherein the system information includes system type and system version; judging whether the discovery response message is a computing node according to the role information message sent by the node; if yes, then judge whether the system type of the computing node to be added is consistent with the system type of the management node; if yes, then judge whether the system version of the computing node to be added is consistent with the system type of the management node Whether the system versions of the system versions are consistent; if yes, it is determined that the discovery response message has passed the verification.
  • IP addresses to the corresponding computing nodes to be added assign IP addresses to the corresponding computing nodes to be added, so that the IP addresses assigned to the computing nodes to be added corresponding to the adjacent BMC IP are continuous, including: Assign IP addresses to the corresponding computing nodes to be added according to the order of the BMC IP, so that the IP addresses assigned to the computing nodes to be added corresponding to the adjacent BMC IP are continuous; Address, the mask corresponding to the IP address, the gateway and the VLAN are encapsulated into a configuration message, and the configuration message is sent to the corresponding computing node to be added through IPv6 unicast mode; receiving the computing node to be added A configuration response message sent to determine that the configuration of the IP address of the computing node to be added is completed, wherein the configuration response message is that the computing node to be added uses the IP address and the mask corresponding to the IP address It is sent after the code, gateway, and VLAN are configured on the network.
  • the System field carries the system name of the management node that sent this message;
  • the Type field carries the message type, that is, OFFER_IP;
  • role carries the role that sent this message, that is, the management node con;
  • verison Carry the version number of the system installed on the node sending this message;
  • management_ipv4, netmask, gateway, and management_vlan here no longer indicate the IPv4 address, mask, gateway, and vlan of the node sending this message, but indicate that the management node needs to give the computing node
  • bmc_ip refers to the out-of-band management IP of the node, which is empty in this message, and ex_info is a reserved font, which is used to reserve fields that need to be carried in the future to facilitate this function expansion.
  • the System field carries the system name of the computing node that sent the message;
  • the Type field carries the message type, that is, ACK_OFFER_IP;
  • role carries the role that sent the message, that is, the computing node com;
  • verison Carry the version number of the system installed on the node that sent this message;
  • management_ipv4, netmask, gateway, and management_vlan indicate the IPv4 address, mask, gateway, and vlan of the node that sent this message;
  • bmc_ip refers to the out-of-band management IP of the computing node, ex_info is a reserved font, which is used to reserve fields that need to be carried in the future to facilitate the expansion of this function.
  • FIG. 3 it is a flowchart for computing node configuration.
  • the management node can obtain the relevant information of the computing node in the ACK_DISCOVERY message fed back by the computing node to be added.
  • the management node verifies the information, including the system type, role, and system version of the computing node to be added. After the verification is passed, it determines whether the computing node to be added has an IP address configured. If no IP address is configured, it starts to encapsulate the configuration report.
  • the content of the message includes the system type and system version of the management node, the IPv4 address, mask, gateway, and vlan that need to be configured for the computing node.
  • the IP addresses assigned to the computing nodes to be added are assigned in the order of the out-of-band IP (bmc_ip) of the computing nodes to be added, because in general, the out-of-band IPs of the computing nodes to be added are associated and continuous with the location on the computing cabinet of. In this way, the continuity of computing nodes can be guaranteed.
  • the OFFER_IP message is sent in the form of an IPv6 unicast UDP message, because the management node already knows the IPv6 unicast address of each computing node to be added during the discovery process of the computing node to be added.
  • the computing node to be added After the computing node to be added receives this message, it can be known from the type of the message that this is an OFFER_IP message for configuring the computing node to be added, so it is necessary to extract the IPv4 address and vlan from the message, and then start configuration. After the configuration is completed, start to assemble the configuration response message (that is, the ACK_OFFER_IP message). This message is used to communicate with the management node that the configuration of the computing node to be added has been completed.
  • the ACK_OFFER_IP message also carries information such as the system type, system version, IPv4 address, mask, gateway, and vlan of the computing node to be added. It is similar to the ACK_DISCOVERY message. empty. At this time, the IP information of the computing node to be added has been configured.
  • Step S14 After the IP address configuration of the computing node to be added is completed, send an adding message to the computing node to be added, and receive the message returned by the computing node to be added when the verification of the adding message is passed Adding a response message, adding the computing node to be added to the data center managed by the management node.
  • the management node can Send an add message to the added computing node, and receive an add response message returned by the to-be-added computing node when the verification of the added message passes, and add the to-be-added computing node to the management node managed data center.
  • the System field in the added message (that is, the JOIN message) carries the system name of the management node that sends this message;
  • Node con verison carries the version number of the system installed on the management node that sent this message; management_ipv4, netmask, gateway, and management_vlan here indicate the IPv4 address, mask, gateway, and vlan of the management node; bmc_ip refers to the out-of-band of the management node Management IP, which is empty in this added message, and ex_info is a reserved font, which is used to reserve fields that need to be carried in the future, so as to facilitate the expansion of this function.
  • the System field in the add response message (that is, the ACK_JOIN message) carries the system name of the computing node to be added that sends this message;
  • the Type field carries the message type, that is, ACK_JOIN;
  • role carries the role that sent this message, That is, the computing node com;
  • verison carries the version number of the system installed on the computing node to be added to send this message;
  • management_ipv4, netmask, gateway, and management_vlan indicate the IPv4 address, mask, gateway, and vlan of the computing node to be added to send this message;
  • bmc_ip refers to the out-of-band management IP of the computing node to be added, and ex_info is a reserved font, which is used to reserve fields that need to be carried in the future to facilitate the expansion of this function.
  • a flow chart is added for the host.
  • the management node After the management node completes the aforementioned two processes of discovery and configuration of the computing node to be added, it has confirmed that the verification information of the computing node to be added is correct and the configuration information is complete.
  • the management node sends a JOIN message to invite the computing node to be added to join the data center.
  • the computing node to be added receives the invitation, it will start verification.
  • the verification information includes the system type, role, and system version of the management node.
  • the management node After receiving the ACK_JOIN message of the computing node to be added, the management node starts to manage the computing node to be added, and controls the resources provided by the computing node to be added.
  • the management node and the computing node to be added do not belong to the same network, that is, the system communicates between the management node and the computing node to be added through a router, then In the process of using IPv6 multicast to send the discovery message to the scanned computing node to be added, it also includes: if the computing node to be added and the management node do not belong to the same network, using the The multicast relay of the router between the adding computing node and the management node sends the discovery message to the computing node to be added.
  • FIG. 5 it is a schematic diagram of the application environment of the host discovery and addition method in the data center.
  • the figure includes management nodes and computing nodes.
  • Computing nodes that directly communicate with management nodes through switches are in the same network as management nodes, and can only communicate with management nodes through routers (that is, the circular figure in Figure 5 represents routers).
  • the computing node and the management node do not belong to the same network, so the multicast relay function of the router needs to be enabled. After the multicast relay function is enabled on the router, the foregoing steps can be performed normally.
  • this application is applied to the management node of the data center to scan the computing nodes to be added, wherein the management node and the virtualization system or hyper-converged system on the computing nodes to be added are installed at the factory. Then utilize the IPv6 multicast mode to send the discovery message to the scanned computing node to be added, and receive the discovery response message that the computing node to be added utilizes the IPv6 unicast mode to send after the verification of the discovery message is passed arts.
  • the BMC IPs in each of the discovery response messages are sorted, and the corresponding BMC IPs are sorted according to the order of the BMC IPs
  • the computing node to be added is allocated an IP address, so that the IP addresses allocated to the computing node to be added corresponding to the adjacent BMC IP are continuous, wherein the IP address is an IPv4 address.
  • an adding message is sent to the computing node to be added, and an adding response returned by the computing node to be added when the verification of the adding message is passed is received message, adding the computing node to be added to the data center managed by the management node.
  • the virtualization system or hyper-converged system on the management node and computing node in this application is installed at the factory, so it is not necessary to start the management node and computing after arriving at the user site and obtaining the user network plan.
  • Node virtualization or hyper-converged system deployment can greatly save the time of system deployment on the node, that is, it can save the deployment time of the data center.
  • the management node When the management node allocates IP addresses for the computing nodes to be added, it first assigns each computing node BMC IP sorting, and then according to the order of the BMC IP, allocate IP addresses for the corresponding computing nodes to be added, so that the IP addresses assigned to the computing nodes to be added corresponding to the adjacent BMC IP are continuous, Since the BMC IP indicates the order of the computing nodes in the cabinet, the IP addresses assigned to each connected computing node can also be continuous, which is conducive to later operation and maintenance.
  • FIG. 6 is an interaction diagram between the management node and the computing node to be added.
  • three phases of interactive communication are required between the host discovery service on the management node and the host discovery service on the computing node to be added, including discovery, configuration, and addition.
  • the management node sends a discovery message (DISCOVERY message) to the scanned computing node to be added by using IPv6 multicast mode, and receives the discovered message from the computing node to be added after the verification of the discovered message is passed.
  • a discovery response packet (ACK_DISCOVERY packet) sent in IPv6 unicast mode.
  • the management node sorts the BMC IPs in each of the discovery response messages, and according to the BMC The order of IP assigns IP addresses to the corresponding computing nodes to be added, so that the IP addresses assigned to the computing nodes to be added corresponding to the adjacent BMC IP are continuous, wherein the IP addresses are IPv4 Address, send the assigned IP address to the corresponding computing node to be added through a configuration message (OFFER_IP message), and receive the configuration response message (ACK_OFFER_IP message) sent by the computing node to be added after the IP address configuration is completed.
  • OFFER_IP message configuration message
  • ACK_OFFER_IP message configuration response message
  • the management node sends an adding message (JOIN message) to the computing node to be added, and receives an adding response message (ACK_JOIN message) returned by the computing node to be added when the verification of the adding message is passed. message), adding the computing node to be added to the data center managed by the management node.
  • JOIN message an adding message
  • ACK_JOIN message an adding response message
  • the embodiment of the present application discloses a specific method for discovering and adding a host in a data center, which is applied to a computing node to be added in a data center, and the method includes:
  • Step S21 Receive the discovery message sent by the management node in IPv6 multicast mode after scanning the computing node to be added, wherein the management node and the virtualization system or hyper-converged system on the computing node to be added are It is installed at the factory.
  • the management node will use IPv6 multicast to send a discovery message to the scanned computing node to be added, and accordingly, the computing node to be added needs to receive the discovery message, wherein the management node and The virtualization system or hyper-converged system on the computing node to be added is installed at the factory, so as to save the time required to install the virtualization system or hyper-converged system according to the customer's network planning after arriving at the customer's site.
  • Step S22 Verifying the discovery message, and sending a discovery response message corresponding to the discovery message in IPv6 unicast mode when the discovery message passes the verification, so that the management node can
  • the computing node to be added is not configured with an IP address, sort the BMC IPs in each of the discovery response messages, and sort the corresponding BMC IPs according to the order of the BMC IPs.
  • the computing node to be added is assigned an IP address, so that the IP addresses allocated to the computing node to be added corresponding to the adjacent BMC IP are continuous, wherein the IP address is an IPv4 address.
  • the computing node to be added is verifying the discovery message, and when the discovery message passes the verification, sends a discovery response message corresponding to the discovery message in IPv6 unicast mode, and the management After receiving the discovery response message, the node verifies the discovery response message, and when the discovery response message passes the verification and the computing node to be added is not configured with an IP address, each The BMC IPs in the discovery response message are sorted, and according to the order of the BMC IPs, assign IP addresses to the corresponding computing nodes to be added, so that the adjacent computing nodes corresponding to the BMC IPs are allocated The obtained IP addresses are continuous, wherein the IP addresses are IPv4 addresses.
  • Step S23 Use the IP address to configure the local network.
  • the computing node to be added needs to use the IP address to configure the local network, so that it can be managed by the management node and provide external services normally.
  • Step S24 Receive the add message sent by the management node, and send an add response message to the management node after the add message is verified, so that the management node can receive the add response message After that, add the computing node to be added to the data center managed by the management node.
  • the management node determines that the configuration of the IP address of the computing node to be added is completed, it will send an adding message to the computing node to be added, and accordingly, the computing node to be added needs to receive the adding message, and Verifying the added message, and sending an added response message to the management node after the added message is verified, so that the management node will send the added response message after receiving the added response message
  • the computing node to be added is added to the data center managed by the management node.
  • the processing process is disordered, so the state machine is run on the computing node to be added, To ensure that the above process can be carried out smoothly. Therefore, when the computing node to be added receives the message, it obtains the current state of the local state machine, wherein the message includes the discovery message, the configuration message and the added message; according to the state machine
  • the corresponding relationship between the current state and the preset state machine state and the response message type determines whether to respond to the received message, wherein the state machine state includes a start state, a discovery state, a configuration state, an addition state and finished condition.
  • the preset corresponding relationship between the state of the state machine and the type of the response message is: the initial state of the computing node to be added is the start state, and only the DISCOVERY message is processed at this time.
  • the computing node to be added receives the OFFER_IP message the state transitions to the configuration state ( OFFER_IP state), at this time only JOIN packets are processed;
  • the added state (JOIN state) may be migrated from the OFFER_IP state or DISCOVERY state, corresponding to the two cases of modifying the configuration information of the computing node and not modifying the configuration information; the JOIN state needs to process any Status message, that is, even if the computing node is in the JOIN state, it needs to respond to any type of message, but the JOIN state remains unchanged, only the timer is refreshed; when it is
  • the embodiment of the present application discloses a device for discovering and adding hosts in a data center, which is applied to the management node of the data center, including:
  • the scanning module 11 is used to scan the computing nodes to be added, wherein the management node and the virtualization system or hyper-converged system on the computing nodes to be added are installed at the factory;
  • the discovery module 12 is configured to use IPv6 multicast to send a discovery message to the scanned computing node to be added, and receive the computing node to be added to use the IPv6 unicast method after verifying the discovery message.
  • the configuration module 13 is configured to sort the BMC IPs in each of the discovery response messages when the verification of the discovery response message is passed, and the computing node to be added is not configured with an IP address, and according to the BMC The order of IP assigns IP addresses to the corresponding computing nodes to be added, so that the IP addresses assigned to the computing nodes to be added corresponding to the adjacent BMC IP are continuous, wherein the IP addresses are IPv4 address;
  • the adding module 14 is configured to send an adding message to the computing node to be added after the configuration of the IP address of the computing node to be added is completed, and receive that the computing node to be added passes the verification of the adding message In the add response message returned at the time, add the computing node to be added to the data center managed by the management node.
  • this application is applied to the management node of the data center to scan the computing nodes to be added, wherein the management node and the virtualization system or hyper-converged system on the computing nodes to be added are installed at the factory. Then utilize the IPv6 multicast mode to send the discovery message to the scanned computing node to be added, and receive the discovery response message that the computing node to be added utilizes the IPv6 unicast mode to send after the verification of the discovery message is passed arts.
  • the BMC IPs in each of the discovery response messages are sorted, and the corresponding BMC IPs are sorted according to the order of the BMC IPs
  • the computing node to be added is allocated an IP address, so that the IP addresses allocated to the computing node to be added corresponding to the adjacent BMC IP are continuous, wherein the IP address is an IPv4 address.
  • an adding message is sent to the computing node to be added, and an adding response returned by the computing node to be added when the verification of the adding message is passed is received message, adding the computing node to be added to the data center managed by the management node.
  • the virtualization system or hyper-converged system on the management node and computing node in this application is installed at the factory, so it is not necessary to start the management node and computing after arriving at the user site and obtaining the user network plan.
  • Node virtualization or hyper-converged system deployment can greatly save the time of system deployment on the node, that is, it can save the deployment time of the data center.
  • the management node When the management node allocates IP addresses for the computing nodes to be added, it first assigns each computing node BMC IP sorting, and then according to the order of the BMC IP, allocate IP addresses for the corresponding computing nodes to be added, so that the IP addresses assigned to the computing nodes to be added corresponding to the adjacent BMC IP are continuous, Since the BMC IP indicates the order of the computing nodes in the cabinet, the IP addresses assigned to each connected computing node can also be continuous, which is conducive to later operation and maintenance.
  • the configuration module 13 is used to:
  • the discovery response message is a message sent by a computing node according to the role information
  • the configuration module 13 is used to:
  • the configuration module 13 is used to:
  • IPv6 unicast mode Encapsulating the IP address, the mask corresponding to the IP address, the gateway, and the VLAN into a configuration message, and sending the configuration message to the corresponding computing node to be added through IPv6 unicast mode;
  • the discovery module 12 is configured to:
  • the computing node to be added and the management node do not belong to the same network, use the multicast relay of the router between the computing node to be added and the management node to send the discovery message to the Add compute nodes.
  • the embodiment of the present application discloses a device for discovering and adding a host in a data center, which is applied to computing nodes to be added in the data center, including:
  • the discovery response module 21 is configured to receive a discovery message sent by the management node in IPv6 multicast mode after scanning the computing node to be added, wherein the management node and the virtualization system on the computing node to be added or The hyper-converged system is installed at the factory;
  • the discovery response module 21 is configured to verify the discovery message, and when the discovery message passes the verification, send a discovery response message corresponding to the discovery message in IPv6 unicast mode, so that
  • the management node sorts the BMC IPs in each of the discovery response messages, and according to the BMC IP Sequence assigns IP addresses to the corresponding computing nodes to be added, so that the IP addresses assigned to the computing nodes to be added corresponding to the adjacent BMC IP are continuous, wherein the IP addresses are IPv4 addresses;
  • the configuration response module 22 is configured to configure the local network by using the IP address
  • Adding a response module 23 configured to receive the adding message sent by the management node, and send an adding response message to the management node after the adding message is verified, so that the management node receives the added message After adding the response message, add the computing node to be added to the data center managed by the management node.
  • the device for discovering and adding hosts in the data center also includes:
  • a judging module configured to acquire the current state of the local state machine when a message is received, wherein the message includes the discovery message and the added message; according to the current state of the state machine and the predicted The corresponding relationship between the established state machine state and the response message type determines whether to respond to the received message, wherein the state machine state includes a start state, a discovery state, a configuration state, an addition state and a completion state.
  • FIG. 10 is a schematic structural diagram of an electronic device 30 provided in an embodiment of the present application.
  • the electronic device 30 can specifically implement the aforementioned method steps for discovering and adding a host in a data center.
  • the electronic device 30 in this embodiment includes: a processor 31 and a memory 32 .
  • the processor 31 may include one or more processing cores, such as a quad-core processor, an octa-core processor, and the like.
  • Processor 31 can be realized by at least one hardware in DSP (digital signal processing, digital signal processing), FPGA (field-programmable gate array, field-programmable gate array), PLA (programmable logic array, programmable logic array) .
  • Processor 31 may also include a main processor and a coprocessor, the main processor is a processor for processing data in a wake-up state, and is also called a CPU (central processing unit, central processing unit); the coprocessor is Low-power processor for processing data in standby state.
  • the processor 31 may be integrated with a GPU (graphics processing unit, image processor), and the GPU is used for rendering and drawing images that need to be displayed on the display screen.
  • the processor 31 may include an AI (artificial intelligence, artificial intelligence) processor, and the AI processor is used to process computing operations related to machine learning.
  • Memory 32 may include one or more computer-readable storage media, which may be non-transitory.
  • the memory 32 may also include high-speed random access memory, and non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices.
  • the memory 32 is at least used to store the following computer program 321, wherein, after the computer program is loaded and executed by the processor 31, the steps of the method for discovering and adding a host in the data center disclosed in any of the foregoing embodiments can be realized.
  • the electronic device 30 may further include a display screen 33 , an input/output interface 34 , a communication interface 35 , a sensor 36 , a power supply 37 and a communication bus 38 .
  • FIG. 10 does not constitute a limitation on the electronic device 30 , and may include more or less components than those shown in the illustration.
  • the embodiment of the present application also discloses a computer-readable storage medium for storing a computer program, wherein, when the computer program is executed by a processor, the host discovery in the data center disclosed in any of the foregoing embodiments is realized. with the add method.
  • each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same or similar parts of each embodiment can be referred to each other.
  • the description is relatively simple, and for the related information, please refer to the description of the method part.
  • RAM random access memory
  • ROM read-only memory
  • EEPROM electrically programmable ROM
  • EEPROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or any other Any other known storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

本申请公开了一种数据中心中主机发现与添加方法、装置、设备、介质,该方法包括:扫描待添加计算节点;利用IPv6组播方式向扫描到的待添加计算节点发送发现报文,并接收待添加计算节点在对发现报文校验通过后利用IPv6单播方式发送的发现响应报文;在发现响应报文校验通过,且待添加计算节点未配置IP地址时,对各个发现响应报文中的BMC IP进行排序,并根据BMC IP的顺序分配IP地址,以便相邻BMC IP对应的IP地址是连续的;在IP地址配置完成后,向待添加计算节点发送添加报文,并接收添加响应报文,将待添加计算节点添加到管理节点管理的数据中心中。这样能够节约数据中心的部署时间,且有利于后期运维。

Description

数据中心中主机发现与添加方法、装置、设备及介质
本申请要求在2021年8月6日提交中国专利局、申请号为202110899261.1、发明名称为“数据中心中主机发现与添加方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别涉及一种数据中心中主机发现与添加方法、装置、设备、介质。
背景技术
随着云计算技术的日益普及,越来越多的企业、组织开始把业务迁移到虚拟化或超融合系统中。但对于安装部署人员来说,这些虚拟化或超融合系统节点数量小到3台,大到几百台,都需要对每台节点安装部署工作。
但现有的安装过程中存在以下不足:在系统安装过程中的网络规划方法,是通过DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)的方式来为虚拟机分配IP地址(Internet Protocol Address,互联网协议地址)的。通过这种方式获取到的IP地址是随机性的,导致机柜上的主机节点得到的IP地址不是按照在机柜的顺序连续出现的,这会给后期运维造成困难。
发明内容
有鉴于此,本申请的目的在于提供一种数据中心中主机发现与添加方法、装置、设备、介质,能够节约数据中心的部署时间,且有利于后期运维。其具体方案如下:
第一方面,本申请公开了一种数据中心中主机发现与添加方法,应用于数据中心的管理节点,包括:
扫描待添加计算节点,其中,所述管理节点和所述待添加计算节点上的虚拟化系统或超融合系统为出厂时安装完成的;
利用IPv6组播方式向扫描到的所述待添加计算节点发送发现报文,并接收所述待添加计算节点在对所述发现报文校验通过后利用IPv6单播方式发送 的发现响应报文;
在所述发现响应报文校验通过,且所述待添加计算节点未配置IP地址时,对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址;
在所述待添加计算节点的IP地址配置完成后,向所述待添加计算节点发送添加报文,并接收所述待添加计算节点在对所述添加报文校验通过时返回的添加响应报文,将所述待添加计算节点添加到所述管理节点管理的数据中心中。
可选地,所述待添加计算节点在接收到报文时,根据所述待添加计算节点本地的状态机的当前状态及预设的状态机状态与响应报文类型之间的对应关系判断是否对接收到的报文进行响应,其中,所述报文包括:所述发现报文、所述添加报文,所述状态机状态包括开始状态、发现状态、配置状态、添加状态及完成状态。
可选地,所述接收所述待添加计算节点在对所述发现报文校验通过后利用IPv6单播方式发送的发现响应报文之后,还包括:
对所述发现响应报文进行解析,以从所述发现响应报文中提取出所述待添加计算节点的系统信息和角色信息,其中,所述系统信息包括系统类型及系统版本;
根据所述角色信息判断所述发现响应报文是否为计算节点发送的报文;
如果所述发现响应报文是计算节点发送的报文,则判断所述待添加计算节点的系统类型与所述管理节点的系统类型是否一致;
如果所述待添加计算节点的系统类型与所述管理节点的系统类型一致,则判断所述待添加计算节点的系统版本与所述管理节点的系统版本是否一致;
如果所述待添加计算节点的系统版本与所述管理节点的系统版本一致,则判定所述发现响应报文校验通过。
可选地,所述接收所述待添加计算节点在对所述发现报文校验通过后利用IPv6单播方式发送的发现响应报文之后,还包括:
在所述发现响应报文校验通过时,判断所述发现响应报文中的IPv4字段 和VLAN字段是否为空;
如果是,则判定所述发现响应报文对应的待添加计算节点未配置IP地址,否则,判定所述待添加计算节点已配置IP地址。
可选地,所述根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,包括:
根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的;
将所述IP地址、所述IP地址对应的掩码、网关以及VLAN封装成配置报文,并通过IPv6单播方式将所述配置报文发送给对应的所述待添加计算节点;
接收所述待添加计算节点发送的配置响应报文,以确定所述待添加计算节点的IP地址配置完成,其中,所述配置响应报文为所述待添加计算节点在利用所述IP地址、所述IP地址对应的掩码、网关以及VLAN进行网络配置后发送的。
可选地,所述利用IPv6组播方式向扫描到的所述待添加计算节点发送发现报文的过程中,还包括:
如果所述待添加计算节点和所述管理节点不属于同一网络,则利用所述待添加计算节点和所述管理节点之间的路由器的组播中继将所述发现报文发送到所述待添加计算节点。
第二方面,本申请公开了一种数据中心中主机发现与添加方法,应用于数据中心的待添加计算节点,包括:
接收管理节点在扫描到所述待添加计算节点后利用IPv6组播方式发送的发现报文,其中,所述管理节点和所述待添加计算节点上的虚拟化系统或超融合系统为出厂时安装完成的;
对所述发现报文进行校验,并在所述发现报文校验通过时,利用IPv6单播方式发送所述发现报文对应的发现响应报文,以便所述管理节点在所述发现响应报文校验通过,且所述待添加计算节点未配置IP地址时,对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所 述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址;
利用所述IP地址对本地网络进行配置;
接收所述管理节点发送的添加报文,并在所述添加报文校验通过后,向所述管理节点发送添加响应报文,以便所述管理节点在接收到所述添加响应报文后,将所述待添加计算节点添加到所述管理节点管理的数据中心中。
可选地,还包括:
在接收到报文时,获取本地的状态机的当前状态,其中,所述报文包括所述发现报文、所述添加报文;
根据所述状态机的当前状态及预设的状态机状态与响应报文类型之间的对应关系判断是否对接收到的报文进行响应,其中,所述状态机状态包括开始状态、发现状态、配置状态、添加状态及完成状态。
第三方面,本申请公开了一种数据中心中主机发现与添加装置,应用于数据中心的管理节点,包括:
扫描模块,用于扫描待添加计算节点,其中,所述管理节点和所述待添加计算节点上的虚拟化系统或超融合系统为出厂时安装完成的;
发现模块,用于利用IPv6组播方式向扫描到的所述待添加计算节点发送发现报文,并接收所述待添加计算节点在对所述发现报文校验通过后利用IPv6单播方式发送的发现响应报文;
配置模块,用于在所述发现响应报文校验通过,且所述待添加计算节点未配置IP地址时,对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址;
添加模块,用于在所述待添加计算节点的IP地址配置完成后,向所述待添加计算节点发送添加报文,并接收所述待添加计算节点在对所述添加报文校验通过时返回的添加响应报文,将所述待添加计算节点添加到所述管理节点管理的数据中心中。
可选地,所述待添加计算节点在接收到报文时,根据所述待添加计算节点本地的状态机的当前状态及预设的状态机状态与响应报文类型之间的对应 关系判断是否对接收到的报文进行响应,其中,所述报文包括所述发现报文、所述添加报文,所述状态机状态包括开始状态、发现状态、配置状态、添加状态及完成状态。
第四方面,本申请公开了一种电子设备,包括:
存储器和处理器;
其中,所述存储器,用于存储计算机程序;
所述处理器,用于执行所述计算机程序,以实现前述公开的数据中心中主机发现与添加方法。
第五方面,本申请公开了一种计算机可读存储介质,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现前述公开的数据中心中主机发现与添加方法。
可见,本申请应用于数据中心的管理节点,扫描待添加计算节点,其中,所述管理节点和所述待添加计算节点上的虚拟化系统或超融合系统为出厂时安装完成的。然后利用IPv6组播方式向扫描到的所述待添加计算节点发送发现报文,并接收所述待添加计算节点在对所述发现报文校验通过后利用IPv6单播方式发送的发现响应报文。在所述发现响应报文校验通过,且所述待添加计算节点未配置IP地址时,对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址。接着在所述待添加计算节点的IP地址配置完成后,向所述待添加计算节点发送添加报文,并接收所述待添加计算节点在对所述添加报文校验通过时返回的添加响应报文,将所述待添加计算节点添加到所述管理节点管理的数据中心中。由此可见,本申请中的管理节点和计算节点上的虚拟化系统或超融合系统为出厂时便安装完成的,所以不需要在到达用户现场,得到用户网络规划之后才开始进行管理节点和计算节点的虚拟化或超融合系统部署,所以可以大大节约节点上系统部署的时间,也即,可以节约数据中心的部署时间,管理节点在为待添加计算节点分配IP地址时,先将各个计算节点的BMC IP排序,然后根据BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,由于BMC IP表明了计算节点在 机柜的顺序,所以可以使得各个相连计算节点分配到的IP地址也是连续的,所以有利于后期运维。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为本申请公开的一种数据中心中主机发现与添加方法流程图;
图2为本申请公开的一种主机发现流程图;
图3为本申请公开的一种计算节点配置流程图;
图4为本申请公开的一种主机添加流程图;
图5为本申请公开的一种数据中心中的主机发现与添加方法应用环境示意图;
图6为本申请公开的一种管理节点与待添加计算节点的交互图;
图7为本申请公开的一种数据中心中主机发现与添加方法流程图;
图8为本申请公开的一种数据中心中主机发现与添加装置结构示意图;
图9为本申请公开的一种数据中心中主机发现与添加装置结构示意图;
图10为本申请公开的一种电子设备结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
目前的安装过程中存在以下不足:在系统安装过程中的网络规划方法,是通过DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)的方式来为虚拟机分配IP地址(Internet Protocol Address,互联网协议地址)的。通过这种方式获取到的IP地址是随机性的,导致机柜上的主机节点得到的IP地址不是按照在机柜的顺序连续出现的,这会给后期运维造成困难。有鉴于 此,本申请提出了一种数据中心中主机发现与添加方法,能够节约数据中心的部署时间,且有利于后期运维。
参见图1所示,本申请实施例公开了一种数据中心中主机发现与添加方法,应用于数据中心的管理节点,该方法包括:
步骤S11:扫描待添加计算节点,其中,所述管理节点和所述待添加计算节点上的虚拟化系统或超融合系统为出厂时安装完成的。
在实际实施过程中,所述管理节点需要扫描待添加计算节点,以便发现有哪些可以添加的待添加计算节点,其中,所述管理节点和所述待添加计算节点上的虚拟化系统或超融合系统为设备出厂时便安装完成的,所以不需要在到达用户现场,得到用户网络规划之后才开始进行管理节点和计算节点的虚拟化或超融合系统,所以可以大大节约节点上系统部署的时间,也即,可以节约数据中心的部署时间。
为了所述管理节点在扫描时,可以发现所述待添加计算节点,可以在所述管理节点和所述待添加计算节点上安装主机发现服务。所述待添加计算节点上的主机发现服务处于开启状态,这样当打开所述管理节点上的主机发现服务扫描数据中心中的待添加计算节点时,所述管理节点便可以扫描到所述待添加计算节点。
步骤S12:利用IPv6组播方式向扫描到的所述待添加计算节点发送发现报文,并接收所述待添加计算节点在对所述发现报文校验通过后利用IPv6单播方式发送的发现响应报文。
所述管理节点在扫描到所述待添加计算节点之后,还需要利用IPv6组播方式向扫描到的所述待添加计算节点发送发现报文,并接收所述待添加计算节点在对所述发现报文校验通过后利用IPv6单播方式发送的发现响应报文。由于所述待添加计算节点可能未配置IP地址,其中,所述IP地址为IPv4地址,所以所述管理节点利用IPv6组播方式向所述待添加计算节点发送发现报文,而待添加计算节点利用IPv6单播方式向所述管理节点发送发现响应报文。
所述管理节点在与所述待添加计算节点进行通信的过程中,会使用报文进行通信,其中,报文的格式如下:
Figure PCTCN2022074595-appb-000001
Figure PCTCN2022074595-appb-000002
其中,system字段表示发送报文的节点的虚拟化系统或超融合系统的系统类型,Type表示报文的类型,role表示发送报文的节点的角色,也即,发送报文的节点是管理节点还是计算节点,version表示节点的系统版本,management_ipv4表示发送报文的节点的IP地址,其中,所述IP地址为IPv4地址,netmask表示发送报文的节点的掩码,gateway表示发送报文的节点的网关,management_VLAN表示发送报文的节点的VLAN(Virtual Local Area Network,虚拟局域网),bmc_ip表示发送报文的节点的BMC(Baseboard Management Controller,基板管理控制器)IP,ex_info表示可扩展的字段。
也即,所述管理节点先利用IPv6组播方式向扫描到的所述待添加计算节点发送发现报文,其中,所述发现报文的格式如上,只是Type字段携带报文类型,即DISCOVERY;role携带发出此报文的角色,即管理节点con;verison携带发出此报文的节点所装系统的版本号;management_ipv4、netmask、gateway、management_VLAN表示发出此报文节点的IPv4地址,掩码、网关、VLAN;bmc_ip是指该节点的带外管理IP,在本报文中为空。ex_info为预留字体,用来预留下将来需要携带的字段,方便此功能的拓展。
所述待添加计算节点在接收到所述发现报文之后,还需要对所述发现报文进行校验,并在对所述发现报文校验通过后,向所述管理节点发送发现响应报文。具体的,所述待添加计算节点在所述发现报文校验通过后会利用IPv6单播方式发送的发现响应报文。其中,发现响应报文包括:System字段携带发出此报文的待添加计算节点系统名称;Type字段携带报文类型,即 ACK_DISCOVERY;role携带发出此报文的角色,即计算节点com;verison携带发出此报文的节点所装系统的版本号;management_ipv4、netmask、gateway、management_VLAN表示发出此报文节点的IPv4地址、掩码、网关、VLAN,因为这几个参数有可能还未配置,所以字段可能为空;bmc_ip是指该计算节点的带外管理IP,ex_info为预留字体,用来预留下将来需要携带的字段,方便此功能的拓展。
也即,待添加计算节点发现开始前,需要用户设置一个网段,用于为没有配置IP地址的待添加计算节点配置IP地址。网段大小可以视待添加计算节点多少而定。参见图2所示,为主机发现流程图。当用户通过管理节点扫描待添加计算节点时。管理节点就开始发送DISCOVERY报文,这个报文是以IPv6组播报文的形式在本网络内发送的。而待添加计算节点上默认是配置有IPv6的本地地址,在网络内所有的待添加计算节点都可以收到这个DISCOVERY报文。
当待添加计算节点收到DISCOVERY报文之后,就开始解析DISCOVERY报文内的信息。这些信息包括管理节点的系统类型、角色、系统版本等。其中有些字段,如management_ipv4,management_VLAN在DISCOVERY报文中是空的,因为在这个阶段,待添加计算节点不需要这些信息。待添加计算节点对管理节点的系统类型、角色、系统版本进行校验,校验的内容包括系统是不是和本待添加计算节点一致,是否是由管理节点发出的、管理节点的版本是否和本计算节点一致。如果校验不通过,则不进行任何动作。如果检验能通过。则开始封装ACK_DISCOVERY报文进行报文回应,并在收到的DISCOVERY报文中取出源地址作为ACK_DISCOVERY报文的目的地址,最后将此报文发送出去。报文中封装的信息主要有待添加计算节点的系统类型、角色、系统版本VLAN,如果所述待添加计算节点已配置IP地址,则ACK_DISCOVERY报文还包括当前使用的IPv4地址及VLAN,ACK_DISCOVERY报文不再以组播形式发送而是以单播的IPv6 UDP(User DatagramProtocol,用户数据报协议)报文形式发送,因为此时待添加计算节点已经知道了管理节点的IPv6的地址。管理节点接收到ACK_DISCOVERY报文之后,将报文中的信息解析出来,内容主要有:待添加计算节点的系统类型、角色、系统版本,还可能包括待添加计算节点的IPv4地址、VLAN。
步骤S13:在所述发现响应报文校验通过,且所述待添加计算节点未配置IP地址时,对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址。
在所述发现响应报文校验通过时,如果所述待添加计算节点未配置IP地址时,所述管理节点对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址。
也即,在接收所述待添加计算节点在对所述发现报文校验通过后利用IPv6单播方式发送的发现响应报文之后,还包括:对所述发现响应报文进行解析,以从所述发现响应报文中提取出所述待添加计算节点的系统信息和角色信息,其中,所述系统信息包括系统类型及系统版本;根据所述角色信息判断所述发现响应报文是否为计算节点发送的报文;如果是,则判断所述待添加计算节点的系统类型与所述管理节点的系统类型是否一致;如果是,则判断所述待添加计算节点的系统版本与所述管理节点的系统版本是否一致;如果是,则判定所述发现响应报文校验通过。
在所述发现响应报文校验通过时,还需要判断所述发现响应报文中的IPv4字段和VLAN字段是否为空;如果是,则判定所述发现响应报文对应的待添加计算节点未配置IP地址,否则,判定所述待添加计算节点已配置IP地址。
其中,根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,包括:根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的;将所述IP地址、所述IP地址对应的掩码、网关以及VLAN封装成配置报文,并通过IPv6单播方式将所述配置报文发送给对应的所述待添加计算节点;接收所述待添加计算节点发送的配置响应报文,以确定所述待添加计算节点的IP地址配置完成,其中,所述配置响应报文为所述待添加 计算节点在利用所述IP地址、所述IP地址对应的掩码、网关以及VLAN进行网络配置后发送的。
其中,配置报文(OFFER_IP报文)中:System字段携带发出此报文的管理节点系统名称;Type字段携带报文类型,即OFFER_IP;role携带发出此报文的角色,即管理节点con;verison携带发出此报文的节点所装系统的版本号;management_ipv4、netmask、gateway、management_vlan这里不再表示发出此报文节点的IPv4地址,掩码、网关、vlan,而是表示管理节点需要给计算节点配置的IPv4地址,掩码、网关、VLAN;bmc_ip是指该节点的带外管理IP,在本报文中为空,ex_info为预留字体,用来预留下将来需要携带的字段,方便此功能的拓展。在配置响应报文(ACK_OFFER_IP报文)中:System字段携带发出此报文的计算节点系统名称;Type字段携带报文类型,即ACK_OFFER_IP;role携带发出此报文的角色,即计算节点com;verison携带发出此报文的节点所装系统的版本号;management_ipv4、netmask、gateway、management_vlan表示发出此报文节点的IPv4地址,掩码、网关、vlan;bmc_ip是指该计算节点的带外管理IP,ex_info为预留字体,用来预留下将来需要携带的字段,方便此功能的拓展。
也即,参见图3所示,为计算节点配置流程图。管理节点在主机发现过程中,管理节点可以在待添加计算节点反馈的ACK_DISCOVERY报文中,获取到计算节点的相关信息。管理节点对这些信息进行校验,包括待添加计算节点的系统类型、角色、系统版本,校验通过后,判断待添加计算节点是否有配置IP地址,若未配置IP地址,则开始封装配置报文(也即,OFFER_IP报文),报文内容包括了管理节点的系统类型、系统版本、需要给计算节点配置的IPv4地址、掩码、网关、vlan。给待添加计算节点分配的IP地址顺序是以待添加计算节点的带外IP(bmc_ip)的顺序进行分配,因为一般情况下,待添加计算节点的带外IP在与计算机柜上位置是关联、连续的。从而这样可以保证计算节点的连续性。OFFER_IP报文以IPv6单播UDP报文形式发送,因为在上述待添加计算节点发现的过程中,管理节点已经知道了每个待添加计算节点的IPv6单播地址。
当待添加计算节点收到此报文之后,通过报文的类型可以知道,这是一个配置待添加计算节点的OFFER_IP报文,于是需要从报文中取出IPv4地址, vlan,然后开始进行配置。等配置完成后,就开始组装配置响应报文(也即ACK_OFFER_IP报文),这个报文用来通信管理节点本待添加计算节点配置已经完成。ACK_OFFER_IP报文中,同样携带有待添加计算节点的系统类型、系统版本、计算节点的IPv4地址、掩码、网关、vlan等信息,与ACK_DISCOVERY报文类似,不同的地方就是这里的IPv4地址、vlan是非空的。此时的待添加计算节点IP信息已经配置好了。
步骤S14:在所述待添加计算节点的IP地址配置完成后,向所述待添加计算节点发送添加报文,并接收所述待添加计算节点在对所述添加报文校验通过时返回的添加响应报文,将所述待添加计算节点添加到所述管理节点管理的数据中心中。
在所述待添加计算节点的IP地址配置完成后,也即,所述管理节点接收到所述配置响应报文之后,表示所述待添加计算节点的IP地址配置完成,所述管理节点便可以向所述添加计算节点发送添加报文,以及接收所述待添加计算节点在对所述添加报文校验通过时返回的添加响应报文,将所述待添加计算节点添加到所述管理节点管理的数据中心中。
其中,所述添加报文(也即JOIN报文)中System字段携带发出此报文的管理节点的系统名称;Type字段携带报文类型,即JOIN;role携带发出此报文的角色,即管理节点con;verison携带发出此报文的管理节点所装系统的版本号;management_ipv4、netmask、gateway、management_vlan这里表示管理节点的IPv4地址,掩码、网关、vlan;bmc_ip是指该管理节点的带外管理IP,在本添加报文中为空,ex_info为预留字体,用来预留下将来需要携带的字段,方便此功能的拓展。
其中,添加响应报文(也即,ACK_JOIN报文)中System字段携带发出此报文的待添加计算节点的系统名称;Type字段携带报文类型,即ACK_JOIN;role携带发出此报文的角色,即计算节点com;verison携带发出此报文的待添加计算节点所装系统的版本号;management_ipv4、netmask、gateway、management_vlan表示发出此报文待添加计算节点的IPv4地址,掩码、网关、vlan;bmc_ip是指该待添加计算节点的带外管理IP,ex_info为预留字体,用来预留下将来需要携带的字段,方便此功能的拓展。
也即,参见图4所示,为主机添加流程图。管理节点进行完前述的发现和待添加计算节点配置两个过程后,已经确认了待添加计算节点检验信息正确,配置信息已经完整。这时就管理节点发出JOIN报文,邀请待添加计算节点加入到数据中心,待添加计算节点收到邀请后,就会开始校验,校验信息包括管理节点的系统类型、角色、系统版本等,再次校验是因为,随时有其他的管理节点会向待添加计算节点发出校验,待添加计算节点需要通过校验信息来确认加入的数据中心与自身版本相匹配;加入数据中心后,待添加计算节点不再回应任何其他管理节点(如果有)的DISCOVERY、OFFER_IP、JOIN报文,待添加计算节点的自动发现服务也会停止运行。管理节点收到待添加计算节点的ACK_JOIN报文后,开始纳管待添加计算节点,控制待添加计算节点提供的资源。
在实际的实时过程中,会存在所述管理节点和所述待添加计算节点不属于同一网络的情况,也即,所述管理节点和所述待添加计算节点之间系统通过路由器进行通信,则所述利用IPv6组播方式向扫描到的所述待添加计算节点发送发现报文的过程中,还包括:如果所述待添加计算节点和所述管理节点不属于同一网络,则利用所述待添加计算节点和所述管理节点之间的路由器的组播中继将所述发现报文发送到所述待添加计算节点。
也即,在所述管理节点和所述待添加计算节点不属于同一网络时,需要打开所述管理节点和所述待添加计算节点之间的路由器的组播中继功能,以便通过所述路由器将所述管理节点通过IPv6组播的报文转发到对应的待添加计算节点。
参见图5所示,为数据中心中的主机发现与添加方法应用环境示意图。其中,图中包括管理节点和计算节点,直接通过交换机与管理节点进行通信的计算节点与管理节点处于同一网络,通过路由器(也即图5中的圆形图形表示路由器)才能与管理节点通信的计算节点与管理节点不属于同一网络,所以需要开启该路由器的组播中继功能,在所述路由器开启组播中继功能之后,便可以进行正常进行前述的各个步骤了。
可见,本申请应用于数据中心的管理节点,扫描待添加计算节点,其中,所述管理节点和所述待添加计算节点上的虚拟化系统或超融合系统为出厂时安装完成的。然后利用IPv6组播方式向扫描到的所述待添加计算节点发送发现 报文,并接收所述待添加计算节点在对所述发现报文校验通过后利用IPv6单播方式发送的发现响应报文。在所述发现响应报文校验通过,且所述待添加计算节点未配置IP地址时,对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址。接着在所述待添加计算节点的IP地址配置完成后,向所述待添加计算节点发送添加报文,并接收所述待添加计算节点在对所述添加报文校验通过时返回的添加响应报文,将所述待添加计算节点添加到所述管理节点管理的数据中心中。由此可见,本申请中的管理节点和计算节点上的虚拟化系统或超融合系统为出厂时便安装完成的,所以不需要在到达用户现场,得到用户网络规划之后才开始进行管理节点和计算节点的虚拟化或超融合系统部署,所以可以大大节约节点上系统部署的时间,也即,可以节约数据中心的部署时间,管理节点在为待添加计算节点分配IP地址时,先将各个计算节点的BMC IP排序,然后根据BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,由于BMC IP表明了计算节点在机柜的顺序,所以可以使得各个相连计算节点分配到的IP地址也是连续的,所以有利于后期运维。
参见图6所示,为管理节点与待添加计算节点的交互图。在数据中心中的主机发现与添加过程中,管理节点上的主机发现服务与待添加计算节点上的主机发现服务之间需要进行三个阶段的交互通信,包括发现、配置及添加三个阶段。在发现阶段,管理节点利用IPv6组播方式向扫描到的所述待添加计算节点发送发现报文(DISCOVERY报文),并接收所述待添加计算节点在对所述发现报文校验通过后利用IPv6单播方式发送的发现响应报文(ACK_DISCOVERY报文)。在配置阶段,在所述发现响应报文校验通过,且所述待添加计算节点未配置IP地址时,管理节点对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址,将分配到的IP地址通过配置报文(OFFER_IP报文)发送给对应的待添加计算节点,接收待添加计算节点在IP 地址配置完成后发送的配置响应报文(ACK_OFFER_IP报文)。在添加阶段,管理节点向所述待添加计算节点发送添加报文(JOIN报文),并接收所述待添加计算节点在对所述添加报文校验通过时返回的添加响应报文(ACK_JOIN报文),将所述待添加计算节点添加到所述管理节点管理的数据中心中。
参见图7所示,本申请实施例公开了一种具体的数据中心中主机发现与添加方法,应用于数据中心的待添加计算节点,该方法包括:
步骤S21:接收管理节点在扫描到所述待添加计算节点后利用IPv6组播方式发送的发现报文,其中,所述管理节点和所述待添加计算节点上的虚拟化系统或超融合系统为出厂时安装完成的。
管理节点会利用IPv6组播方式向所述扫描到的所述待添加计算节点发送发现报文,相应地,所述待添加计算节点便需要接收所述发现报文,其中,所述管理节点和所述待添加计算节点上的虚拟化系统或超融合系统为出厂时安装完成的,以便节约到达客户现场之后根据客户网络规划再进行虚拟化系统或超融合系统安装所需要消耗的时间。
步骤S22:对所述发现报文进行校验,并在所述发现报文校验通过时,利用IPv6单播方式发送所述发现报文对应的发现响应报文,以便所述管理节点在所述发现响应报文校验通过,且所述待添加计算节点未配置IP地址时,对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址。
所述待添加计算节点在对所述发现报文进行校验,并在所述发现报文校验通过时,利用IPv6单播方式发送所述发现报文对应的发现响应报文,所述管理节点在接收到所述发现响应报文之后,对所述发现响应报文进行校验,并在所述发现响应报文校验通过,且所述待添加计算节点未配置IP地址时,对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址。
步骤S23:利用所述IP地址对本地网络进行配置。
相应地,所述待添加计算节点便需要利用所述IP地址对本地网络进行配置, 以便可以由所述管理节点管理以及正常对外提供服务。
步骤S24:接收所述管理节点发送的添加报文,并在所述添加报文校验通过后,向所述管理节点发送添加响应报文,以便所述管理节点在接收到所述添加响应报文后,将所述待添加计算节点添加到所述管理节点管理的数据中心中。
在管理节点确定所述待添加计算节点的IP地址配置完成时,便会向所述待添加计算节点发送添加报文,相应地,所述待添加计算节点便需要接收所述添加报文,并对所述添加报文进行校验,在所述添加报文校验通过后,向所述管理节点发送添加响应报文,以便所述管理节点在接收到所述添加响应报文后,将所述待添加计算节点添加到所述管理节点管理的数据中心中。
由于通信报文有可能会在中途丢失,造成所述待添加计算节点在不同的阶段,收到不匹配的报文时,处理过程发生紊乱,所以在所述待添加计算节点上运行状态机,来保证上述过程能够顺利进行。所以待添加计算节点在接收到报文时,获取本地的状态机的当前状态,其中,所述报文包括所述发现报文、配置报文以及所述添加报文;根据所述状态机的当前状态及预设的状态机状态与响应报文类型之间的对应关系判断是否对接收到的报文进行响应,其中,所述状态机状态包括开始状态、发现状态、配置状态、添加状态及完成状态。其中,预设的状态机状态与响应报文类型之间的对应关系为:待添加计算节点初始状态为开始状态start,此时只处理DISCOVERY报文。待添加计算节点接收到DISCOVERY报文后,状态迁移为发现状态(DISCOVERY状态),此时只处理OFFER_IP报文或者JOIN报文;待添加计算节点接收到OFFER_IP报文后,状态迁移为配置状态(OFFER_IP状态),此时只处理JOIN报文;添加状态(JOIN状态)可能由OFFER_IP状态或者DISCOVERY状态迁移而来,分别对应修改计算节点配置信息和不修改配置信息两种情况;JOIN状态需要处理任何状态的消息,也就是即便计算节点在JOIN状态时,需要回应任何类型的报文,但JOIN状态不变,仅刷新定时器;当感知到待添加结算节点已经加入管理中心所管理的数据中心之后,待添加计算节点状态迁移为完成状态finish,不再处理任何报文;DISCOVERY状态、OFFER_IP状态、JOIN状态都有相应定时器,在指定时间内没有进行状态迁移,就会重新回到start初始状态。
参见图8所示,本申请实施例公开了一种数据中心中主机发现与添加装置,应用于数据中心的管理节点,包括:
扫描模块11,用于扫描待添加计算节点,其中,所述管理节点和所述待添加计算节点上的虚拟化系统或超融合系统为出厂时安装完成的;
发现模块12,用于利用IPv6组播方式向扫描到的所述待添加计算节点发送发现报文,并接收所述待添加计算节点在对所述发现报文校验通过后利用IPv6单播方式发送的发现响应报文;
配置模块13,用于在所述发现响应报文校验通过,且所述待添加计算节点未配置IP地址时,对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址;
添加模块14,用于在所述待添加计算节点的IP地址配置完成后,向所述待添加计算节点发送添加报文,并接收所述待添加计算节点在对所述添加报文校验通过时返回的添加响应报文,将所述待添加计算节点添加到所述管理节点管理的数据中心中。
可见,本申请应用于数据中心的管理节点,扫描待添加计算节点,其中,所述管理节点和所述待添加计算节点上的虚拟化系统或超融合系统为出厂时安装完成的。然后利用IPv6组播方式向扫描到的所述待添加计算节点发送发现报文,并接收所述待添加计算节点在对所述发现报文校验通过后利用IPv6单播方式发送的发现响应报文。在所述发现响应报文校验通过,且所述待添加计算节点未配置IP地址时,对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址。接着在所述待添加计算节点的IP地址配置完成后,向所述待添加计算节点发送添加报文,并接收所述待添加计算节点在对所述添加报文校验通过时返回的添加响应报文,将所述待添加计算节点添加到所述管理节点管理的数据中心中。由此可见,本申请中的管理节点和计算节点上的虚拟化系统或超融合系统为出厂时便安装完成的,所以不需要在到达用户 现场,得到用户网络规划之后才开始进行管理节点和计算节点的虚拟化或超融合系统部署,所以可以大大节约节点上系统部署的时间,也即,可以节约数据中心的部署时间,管理节点在为待添加计算节点分配IP地址时,先将各个计算节点的BMC IP排序,然后根据BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,由于BMC IP表明了计算节点在机柜的顺序,所以可以使得各个相连计算节点分配到的IP地址也是连续的,所以有利于后期运维。
在一些具体的实施过程中,所述配置模块13,用于:
对所述发现响应报文进行解析,以从所述发现响应报文中提取出所述待添加计算节点的系统信息和角色信息,其中,所述系统信息包括系统类型及系统版本;
根据所述角色信息判断所述发现响应报文是否为计算节点发送的报文;
如果是,则判断所述待添加计算节点的系统类型与所述管理节点的系统类型是否一致;
如果是,则判断所述待添加计算节点的系统版本与所述管理节点的系统版本是否一致;
如果是,则判定所述发现响应报文校验通过。
在一些具体的实施过程中,所述配置模块13,用于:
在所述发现响应报文校验通过时,判断所述发现响应报文中的IPv4字段和VLAN字段是否为空;
如果是,则判定所述发现响应报文对应的待添加计算节点未配置IP地址,否则,判定所述待添加计算节点已配置IP地址。
在一些具体的实施过程中,所述配置模块13,用于:
根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的;
将所述IP地址、所述IP地址对应的掩码、网关以及VLAN封装成配置报文,并通过IPv6单播方式将所述配置报文发送给对应的所述待添加计算节点;
接收所述待添加计算节点发送的配置响应报文,以确定所述待添加计算 节点的IP地址配置完成,其中,所述配置响应报文为所述待添加计算节点在利用所述IP地址、所述IP地址对应的掩码、网关以及VLAN进行网络配置后发送的。
在一些具体的实施过程中,所述发现模块12,用于:
如果所述待添加计算节点和所述管理节点不属于同一网络,则利用所述待添加计算节点和所述管理节点之间的路由器的组播中继将所述发现报文发送到所述待添加计算节点。
参见图9所示,本申请实施例公开了一种数据中心中主机发现与添加装置,应用于数据中心的待添加计算节点,包括:
发现响应模块21,用于接收管理节点在扫描到所述待添加计算节点后利用IPv6组播方式发送的发现报文,其中,所述管理节点和所述待添加计算节点上的虚拟化系统或超融合系统为出厂时安装完成的;
所述发现响应模块21,用于对所述发现报文进行校验,并在所述发现报文校验通过时,利用IPv6单播方式发送所述发现报文对应的发现响应报文,以便所述管理节点在所述发现响应报文校验通过,且所述待添加计算节点未配置IP地址时,对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址;
配置响应模块22,用于利用所述IP地址对本地网络进行配置;
添加响应模块23,用于接收所述管理节点发送的添加报文,并在所述添加报文校验通过后,向所述管理节点发送添加响应报文,以便所述管理节点在接收到所述添加响应报文后,将所述待添加计算节点添加到所述管理节点管理的数据中心中。
在一些具体的实施过程中,所述数据中心中主机发现与添加装置,还包括:
判断模块,用于在接收到报文时,获取本地的状态机的当前状态,其中,所述报文包括所述发现报文、所述添加报文;根据所述状态机的当前状态及预设的状态机状态与响应报文类型之间的对应关系判断是否对接收到的报文 进行响应,其中,所述状态机状态包括开始状态、发现状态、配置状态、添加状态及完成状态。
图10为本申请实施例提供的一种电子设备30的结构示意图,该电子设备30具体可以实现前述的数据中心中主机发现与添加方法步骤。
通常,本实施例中的电子设备30包括:处理器31和存储器32。
其中,处理器31可以包括一个或多个处理核心,比如四核心处理器、八核心处理器等。处理器31可以采用DSP(digital signal processing,数字信号处理)、FPGA(field-programmable gate array,现场可编程们阵列)、PLA(programmable logic array,可编程逻辑阵列)中的至少一种硬件来实现。处理器31也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(central processing unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器31可以集成有GPU(graphics processing unit,图像处理器),GPU用于负责显示屏所需要显示的图像的渲染和绘制。一些实施例中,处理器31可以包括AI(artificial intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器32可以包括一个或多个计算机可读存储介质,计算机可读存储介质可以是非暂态的。存储器32还可以包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。本实施例中,存储器32至少用于存储以下计算机程序321,其中,该计算机程序被处理器31加载并执行之后,能够实现前述任一实施例中公开的数据中心中主机发现与添加方法步骤。
在一些实施例中,电子设备30还可包括有显示屏33、输入输出接口34、通信接口35、传感器36、电源37以及通信总线38。
本技术领域人员可以理解,图10中示出的结构并不构成对电子设备30的限定,可以包括比图示更多或更少的组件。
可选的,本申请实施例还公开了一种计算机可读存储介质,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现前述任一实施例中公 开的数据中心中主机发现与添加方法。
其中,关于上述数据中心中主机发现与添加方法的具体过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
最后,还需要说明的是,在本文中,诸如第一和第二之类的关系术语仅仅用来将一个实体或者操作与另一个实体或者操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得一系列包含其他要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上对本申请所提供的一种数据中心中主机发现与添加方法、装置、设备、介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (11)

  1. 一种数据中心中主机发现与添加方法,其特征在于,应用于数据中心的管理节点,包括:
    扫描待添加计算节点,其中,所述管理节点和所述待添加计算节点上的虚拟化系统或超融合系统为出厂时安装完成的;
    利用IPv6组播方式向扫描到的所述待添加计算节点发送发现报文,并接收所述待添加计算节点在对所述发现报文校验通过后利用IPv6单播方式发送的发现响应报文;
    在所述发现响应报文校验通过,且所述待添加计算节点未配置IP地址时,对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址;
    在所述待添加计算节点的IP地址配置完成后,向所述待添加计算节点发送添加报文,并接收所述待添加计算节点在对所述添加报文校验通过时返回的添加响应报文,将所述待添加计算节点添加到所述管理节点管理的数据中心中。
  2. 根据权利要求1所述的数据中心中主机发现与添加方法,其特征在于,所述待添加计算节点在接收到报文时,根据所述待添加计算节点本地的状态机的当前状态及预设的状态机状态与响应报文类型之间的对应关系判断是否对接收到的报文进行响应,其中,所述报文包括:所述发现报文、所述添加报文,所述状态机状态包括开始状态、发现状态、配置状态、添加状态及完成状态。
  3. 根据权利要求1或2所述的数据中心中主机发现与添加方法,其特征在于,所述接收所述待添加计算节点在对所述发现报文校验通过后利用IPv6单播方式发送的发现响应报文之后,还包括:
    对所述发现响应报文进行解析,以从所述发现响应报文中提取出所述待添加计算节点的系统信息和角色信息,其中,所述系统信息包括系统类型及系统版本;
    根据所述角色信息判断所述发现响应报文是否为计算节点发送的报文;
    如果所述发现响应报文是计算节点发送的报文,则判断所述待添加计算节点的系统类型与所述管理节点的系统类型是否一致;
    如果所述待添加计算节点的系统类型与所述管理节点的系统类型一致,则判断所述待添加计算节点的系统版本与所述管理节点的系统版本是否一致;
    如果所述待添加计算节点的系统版本与所述管理节点的系统版本一致,则判定所述发现响应报文校验通过。
  4. 根据权利要求1或2所述的数据中心中主机发现与添加方法,其特征在于,所述接收所述待添加计算节点在对所述发现报文校验通过后利用IPv6单播方式发送的发现响应报文之后,还包括:
    在所述发现响应报文校验通过时,判断所述发现响应报文中的IPv4字段和VLAN字段是否为空;
    如果是,则判定所述发现响应报文对应的待添加计算节点未配置IP地址,否则,判定所述待添加计算节点已配置IP地址。
  5. 根据权利要求1或2所述的数据中心中主机发现与添加方法,其特征在于,所述根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,包括:
    根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的;
    将所述IP地址、所述IP地址对应的掩码、网关以及VLAN封装成配置报文,并通过IPv6单播方式将所述配置报文发送给对应的所述待添加计算节点;
    接收所述待添加计算节点发送的配置响应报文,以确定所述待添加计算节点的IP地址配置完成,其中,所述配置响应报文为所述待添加计算节点在利用所述IP地址、所述IP地址对应的掩码、网关以及VLAN进行网络配置后发送的。6、根据权利要求1至5任一项所述的数据中心中主机发现与添加方法,其特征在于,所述利用IPv6组播方式向扫描到的所述待添加计算节点发送发现报文的过程中,还包括:
    如果所述待添加计算节点和所述管理节点不属于同一网络,则利用所述 待添加计算节点和所述管理节点之间的路由器的组播中继将所述发现报文发送到所述待添加计算节点。
  6. 一种数据中心中主机发现与添加方法,其特征在于,应用于数据中心的待添加计算节点,包括:
    接收管理节点在扫描到所述待添加计算节点后利用IPv6组播方式发送的发现报文,其中,所述管理节点和所述待添加计算节点上的虚拟化系统或超融合系统为出厂时安装完成的;
    对所述发现报文进行校验,并在所述发现报文校验通过时,利用IPv6单播方式发送所述发现报文对应的发现响应报文,以便所述管理节点在所述发现响应报文校验通过,且所述待添加计算节点未配置IP地址时,对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址;
    利用所述IP地址对本地网络进行配置;
    接收所述管理节点发送的添加报文,并在所述添加报文校验通过后,向所述管理节点发送添加响应报文,以便所述管理节点在接收到所述添加响应报文后,将所述待添加计算节点添加到所述管理节点管理的数据中心中。
  7. 根据权利要求7所述的数据中心中主机发现与添加方法,其特征在于,还包括:
    在接收到报文时,获取本地的状态机的当前状态,其中,所述报文包括所述发现报文、所述添加报文;
    根据所述状态机的当前状态及预设的状态机状态与响应报文类型之间的对应关系判断是否对接收到的报文进行响应,其中,所述状态机状态包括开始状态、发现状态、配置状态、添加状态及完成状态。
  8. 一种数据中心中主机发现与添加装置,其特征在于,应用于数据中心的管理节点,包括:
    扫描模块,用于扫描待添加计算节点,其中,所述管理节点和所述待添加计算节点上的虚拟化系统或超融合系统为出厂时安装完成的;
    发现模块,用于利用IPv6组播方式向扫描到的所述待添加计算节点发送发现报文,并接收所述待添加计算节点在对所述发现报文校验通过后利用 IPv6单播方式发送的发现响应报文;
    配置模块,用于在所述发现响应报文校验通过,且所述待添加计算节点未配置IP地址时,对各个所述发现响应报文中的BMC IP进行排序,并根据所述BMC IP的顺序为对应的所述待添加计算节点分配IP地址,以便相邻所述BMC IP对应的所述待添加计算节点分配到的所述IP地址是连续的,其中,所述IP地址为IPv4地址;
    添加模块,用于在所述待添加计算节点的IP地址配置完成后,向所述待添加计算节点发送添加报文,并接收所述待添加计算节点在对所述添加报文校验通过时返回的添加响应报文,将所述待添加计算节点添加到所述管理节点管理的数据中心中。
  9. 根据权利要求9所述的数据中心中主机发现与添加装置,其特征在于,
    所述待添加计算节点在接收到报文时,根据所述待添加计算节点本地的状态机的当前状态及预设的状态机状态与响应报文类型之间的对应关系判断是否对接收到的报文进行响应,其中,所述报文包括所述发现报文、所述添加报文,所述状态机状态包括开始状态、发现状态、配置状态、添加状态及完成状态。
  10. 一种电子设备,其特征在于,包括:
    存储器和处理器;
    其中,所述存储器,用于存储计算机程序;
    所述处理器,用于执行所述计算机程序,以实现权利要求1至8任一项所述的数据中心中主机发现与添加方法。
  11. 一种计算机可读存储介质,其特征在于,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1至8任一项所述的数据中心中主机发现与添加方法。
PCT/CN2022/074595 2021-08-06 2022-01-28 数据中心中主机发现与添加方法、装置、设备及介质 WO2023010821A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/277,376 US11888812B1 (en) 2021-08-06 2022-01-28 Host discovery and addition method and apparatus in data center, and device and medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110899261.1 2021-08-06
CN202110899261.1A CN113347287B (zh) 2021-08-06 2021-08-06 数据中心中主机发现与添加方法、装置、设备及介质

Publications (1)

Publication Number Publication Date
WO2023010821A1 true WO2023010821A1 (zh) 2023-02-09

Family

ID=77481210

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/074595 WO2023010821A1 (zh) 2021-08-06 2022-01-28 数据中心中主机发现与添加方法、装置、设备及介质

Country Status (3)

Country Link
US (1) US11888812B1 (zh)
CN (1) CN113347287B (zh)
WO (1) WO2023010821A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347287B (zh) * 2021-08-06 2021-10-15 苏州浪潮智能科技有限公司 数据中心中主机发现与添加方法、装置、设备及介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516817A (zh) * 2012-06-20 2014-01-15 鸿富锦精密工业(深圳)有限公司 服务器定位方法及系统
CN104333617A (zh) * 2014-11-18 2015-02-04 浪潮电子信息产业股份有限公司 一种Linux系统下rack机柜自动设置静态IP的方法
CN104375860A (zh) * 2014-10-30 2015-02-25 浪潮电子信息产业股份有限公司 一种对高密度机柜节点bmc批量刷新的方法
CN105024849A (zh) * 2015-06-02 2015-11-04 浪潮电子信息产业股份有限公司 一种高密度机柜服务器对各节点bmc批量操作的方法
CN109413223A (zh) * 2018-11-07 2019-03-01 郑州云海信息技术有限公司 服务器bmc网口ip地址配置方法、装置、设备及介质
US20200133686A1 (en) * 2018-10-30 2020-04-30 Hewlett Packard Enterprise Development Lp Remote deployment of operating systems
CN113347287A (zh) * 2021-08-06 2021-09-03 苏州浪潮智能科技有限公司 数据中心中主机发现与添加方法、装置、设备及介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8271685B1 (en) * 2009-10-19 2012-09-18 Sprint Communications Company L.P. Intelligently assigning an IP address to a mobile device
US10924449B2 (en) * 2017-07-06 2021-02-16 Facebook, Inc. Internet protocol (IP) address assignment
US10656960B2 (en) * 2017-12-01 2020-05-19 At&T Intellectual Property I, L.P. Flow management and flow modeling in network clouds

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516817A (zh) * 2012-06-20 2014-01-15 鸿富锦精密工业(深圳)有限公司 服务器定位方法及系统
CN104375860A (zh) * 2014-10-30 2015-02-25 浪潮电子信息产业股份有限公司 一种对高密度机柜节点bmc批量刷新的方法
CN104333617A (zh) * 2014-11-18 2015-02-04 浪潮电子信息产业股份有限公司 一种Linux系统下rack机柜自动设置静态IP的方法
CN105024849A (zh) * 2015-06-02 2015-11-04 浪潮电子信息产业股份有限公司 一种高密度机柜服务器对各节点bmc批量操作的方法
US20200133686A1 (en) * 2018-10-30 2020-04-30 Hewlett Packard Enterprise Development Lp Remote deployment of operating systems
CN109413223A (zh) * 2018-11-07 2019-03-01 郑州云海信息技术有限公司 服务器bmc网口ip地址配置方法、装置、设备及介质
CN113347287A (zh) * 2021-08-06 2021-09-03 苏州浪潮智能科技有限公司 数据中心中主机发现与添加方法、装置、设备及介质

Also Published As

Publication number Publication date
CN113347287B (zh) 2021-10-15
CN113347287A (zh) 2021-09-03
US20240039887A1 (en) 2024-02-01
US11888812B1 (en) 2024-01-30

Similar Documents

Publication Publication Date Title
WO2016155394A1 (zh) 一种虚拟网络功能间链路建立方法及装置
WO2019184164A1 (zh) 自动部署Kubernetes从节点的方法、装置、终端设备及可读存储介质
US20090063706A1 (en) Combined Layer 2 Virtual MAC Address with Layer 3 IP Address Routing
WO2019237588A1 (zh) Linux虚拟服务器的创建方法、装置、计算机设备及存储介质
US11394607B2 (en) Method and system for network configuration
US11941423B2 (en) Data processing method and related device
TWI712295B (zh) 使用者終端和設備的綁定方法、裝置和系統
WO2015081734A1 (zh) 一种在VxLAN中发送ARP报文发送方法、VTEP及VxLAN控制器
JP6432955B2 (ja) 仮想ネットワーク機能インスタンスをマイグレーションさせるための方法、装置およびシステム
CN110855488B (zh) 一种虚拟机接入方法及装置
CN114172905B (zh) 一种集群网络组网的方法、装置、计算机设备及存储介质
CN106878480B (zh) 一种dhcp服务进程共享方法及装置
WO2018019299A1 (zh) 一种虚拟宽带接入方法、控制器和系统
CN106302322B (zh) 一种虚拟机数据流管理方法和系统
US11032186B2 (en) First hop router identification in distributed virtualized networks
EP2584742A1 (en) Method and switch for sending packet
CN110716787A (zh) 容器地址设置方法、设备和计算机可读存储介质
CN112637105B (zh) 切换防火墙的方法、系统、装置及计算机可读存储介质
WO2020232890A1 (zh) 负载均衡应用创建方法、装置、计算机设备及存储介质
CN113419812B (zh) 一种虚拟化环境下端口转发测试方法、装置、设备及介质
CN114070723A (zh) 裸金属服务器的虚拟网络配置方法、系统及智能网卡
US11522754B2 (en) Systems and methods for Zero-Touch Provisioning of a switch in intermediate distribution frames and main distribution frames
WO2023010821A1 (zh) 数据中心中主机发现与添加方法、装置、设备及介质
WO2018161795A1 (zh) 一种路由优先级配置方法、设备以及控制器
WO2021175105A1 (zh) 连接方法、装置、设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22851549

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18277376

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE