CN114157639B - Method, device and equipment for collecting information of intelligent network card of server and readable medium - Google Patents

Method, device and equipment for collecting information of intelligent network card of server and readable medium Download PDF

Info

Publication number
CN114157639B
CN114157639B CN202111425589.6A CN202111425589A CN114157639B CN 114157639 B CN114157639 B CN 114157639B CN 202111425589 A CN202111425589 A CN 202111425589A CN 114157639 B CN114157639 B CN 114157639B
Authority
CN
China
Prior art keywords
information
intelligent network
network card
bare metal
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111425589.6A
Other languages
Chinese (zh)
Other versions
CN114157639A (en
Inventor
刘元锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111425589.6A priority Critical patent/CN114157639B/en
Publication of CN114157639A publication Critical patent/CN114157639A/en
Application granted granted Critical
Publication of CN114157639B publication Critical patent/CN114157639B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method, a device, equipment and a readable medium for acquiring information of an intelligent network card of a bare metal server, wherein the method comprises the following steps: responding to the starting of the pxe of the bare metal server, and acquiring the BMC IP address of the bare metal server system through IPA service; acquiring driving information of all nodes of the bare metal server through the acquired BMC IP address, and acquiring a smart_card flag bit from the driving information; responding to the smart_card flag bit being wire, obtaining user information and IP address information of the intelligent network card system; acquiring information of an intelligent network card based on user information and IP address information of the intelligent network card system, and transmitting the information of the intelligent network card to an Ironic Injector module; and the Ironic Injector module updates preset information according to the information of the intelligent network card to create an Ironic pxe smart port. By using the scheme of the invention, whether the bare metal server is provided with the intelligent network card can be automatically judged, the information of the intelligent network card can be automatically acquired, and an ironic pxe smart port is created according to the information of the intelligent network card.

Description

Method, device and equipment for collecting information of intelligent network card of server and readable medium
Technical Field
The invention relates to the field of computers, in particular to a method, a device, equipment and a readable medium for acquiring information of an intelligent network card of a bare metal server.
Background
With the rapid development of the cloud computing field, the bare metal service is a computing service with virtual machine elasticity and physical machine performance, and can provide a dedicated cloud physical server for individuals or enterprises. The method can provide excellent computing performance for services such as key application systems, high-performance computing, big data, core databases and the like and ensure data security. When the bare metal cloud physical machine is created, the same as the virtual machine is created, and the required bare metal cloud physical machine can be created by only specifying the required hardware requirements (such as CPU memory and the like), the mirror image and the required network. And the user can apply flexibly and apply according to the requirement.
But for bare metal OVERLAY networks (OVERLAY networks are virtual networks built on existing physical networks with independent control and forwarding planes, and for terminal devices (e.g. servers) connected to the OVERLAY, the physical network is transparent so that separation of the bearer network and the traffic network can be achieved) implementation is different from that of virtual machine OVERLAY on openstack.
Previously for opentack virtual machines, they shared resources that occupied the computing node, but the computing node was not exposed to the end user. Therefore, a tunnel can be deployed on the computing node, and the encapsulation and the decapsulation of the virtual machine are realized. However, in the bare metal scenario, the bare metal monopolizes one computing node, and the computing node needs to be completely exposed to the end user, so that the virtual machine OVERLAY implementation of deploying the tunnel on the computing node cannot be applied in the bare metal scenario.
Under the scheme of realizing the bare metal OVERLAY by means of the intelligent network card, how to realize the inspection workflow of the bare metal is a very important link. The checking flow of the bare metal not only needs to acquire hardware information such as a CPU, a memory, a hard disk and the like of the bare metal node, but also needs to acquire network card information of a hostname and some rep ports on the intelligent network card. Currently, open source communities have no bare metal inspection implementation scheme.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide a method, an apparatus, a device, and a readable medium for collecting information of an intelligent network card of a bare metal server, by using the technical solution of the present invention, whether the bare metal server has an intelligent network card can be automatically determined, information of the intelligent network card can be automatically obtained, and an ironic px smart port can be created according to the information of the intelligent network card.
Based on the above object, an aspect of the embodiment of the present invention provides a method for collecting information of a bare metal server intelligent network card, including the following steps:
in response to a bare metal server (typically a physical server that indicates that an operating system has not yet been installed, which may be referred to simply as bare metal) performing a px boot-up, a service obtains the BMC IP address of the bare metal server system via IPA (Ironic Python Agent, a python-based agent for handling a series of actions of bare metal nodes in ironic, such as checking, configuring, cleaning and deploying images);
acquiring driving information of all nodes of the bare metal server through the acquired BMC IP address, and acquiring a smart_card flag bit from the driving information;
responding to the smart_card flag bit being wire, obtaining user information and IP address information of the intelligent network card system;
acquiring information of an intelligent network card based on user information and IP address information of the intelligent network card system, and transmitting the information of the intelligent network card to an Ironic Injector (bare metal inspection) module;
and the Ironic Injector module updates preset information according to the information of the intelligent network card to create an Ironic pxe smart port.
According to one embodiment of the present invention, obtaining driving information of all nodes of the bare metal server through the obtained BMC IP address, and obtaining the smart_card flag bit from the driving information includes:
accessing the ironic-api through the BMC IP address;
the ironic-api acquires driving information of all nodes in all bare metal servers;
and traversing and comparing BMC IP addresses of all nodes, and acquiring a smart_card flag bit from the driving information.
According to one embodiment of the present invention, acquiring information of an intelligent network card based on user information and IP address information of the intelligent network card system and transmitting the information of the intelligent network card to an infrared indicator module includes:
configuring an IP address of a tmfifo_net0 intelligent network interface in a bare metal server system as 192.168.100.3/24;
based on the acquired user information, the hostname and rep port information of the intelligent network card are acquired by using the sshpass command.
According to one embodiment of the present invention, the Ironic device module performs an update operation on preset information according to information of the intelligent network card to create an Ironic px smart port, including:
the Ironic Injector module traverses all ports of the bare metal server node;
in response to the mac address of the port being either mac_pf0 or mac_pf1, an update operation is performed on the under-port/local_link_connection/hostnamin information,/local_link_connection/port_id information, and/is_smart information.
In another aspect of the embodiment of the present invention, there is also provided an apparatus for collecting information of a bare metal server intelligent network card, the apparatus including:
the first acquisition module is configured to respond to the starting of the pxe by the bare metal server and acquire the BMC IP address of the bare metal server system through IPA service;
the second acquisition module is configured to acquire driving information of all nodes of the bare metal server through the acquired BMC IP address, and acquire a smart_card flag bit from the driving information;
the third acquisition module is configured to respond to the smart_card flag bit being wire to acquire the user information and the IP address information of the intelligent network card system;
the transmission module is configured to acquire information of the intelligent network card based on user information and IP address information of the intelligent network card system and transmit the information of the intelligent network card to the Ironic instruction module;
and the updating module is configured to update preset information according to the information of the intelligent network card so as to create an Ironic pxe smart port.
According to one embodiment of the invention, the second acquisition module is further configured to:
accessing the ironic-api through the BMC IP address;
the ironic-api acquires driving information of all nodes in all bare metal servers;
and traversing and comparing BMC IP addresses of all nodes, and acquiring a smart_card flag bit from the driving information.
According to one embodiment of the invention, the transmission module is further configured to:
configuring an IP address of a tmfifo_net0 intelligent network interface in a bare metal server system as 192.168.100.3/24;
based on the acquired user information, the hostname and rep port information of the intelligent network card are acquired by using the sshpass command.
According to one embodiment of the invention, the update module is further configured to:
the Ironic Injector module traverses all ports of the bare metal server node;
in response to the mac address of the port being either mac_pf0 or mac_pf1, an update operation is performed on the under-port/local_link_connection/hostnamin information,/local_link_connection/port_id information, and/is_smart information.
In another aspect of the embodiments of the present invention, there is also provided a computer apparatus including:
at least one processor; and
and a memory storing computer instructions executable on the processor, the instructions when executed by the processor performing the steps of any of the methods described above.
In another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the methods described above.
The invention has the following beneficial technical effects: according to the method for acquiring the information of the intelligent network card of the bare metal server, the pxe is started in response to the bare metal server, and the BMC IP address of the bare metal server system is acquired through IPA service; acquiring driving information of all nodes of the bare metal server through the acquired BMC IP address, and acquiring a smart_card flag bit from the driving information; responding to the smart_card flag bit being wire, obtaining user information and IP address information of the intelligent network card system; acquiring information of an intelligent network card based on user information and IP address information of the intelligent network card system, and transmitting the information of the intelligent network card to an Ironic Injector module; the technical scheme that the IRONG Injector module updates preset information according to information of the intelligent network card to create an IRONG pxe smart port can automatically judge whether the bare metal server is provided with the intelligent network card or not, automatically acquire information of the intelligent network card, and create the IRONG pxe smart port according to the information of the intelligent network card.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for bare metal server intelligent network card information acquisition according to one embodiment of the invention;
FIG. 2 is a schematic diagram of an apparatus for bare metal server intelligent network card information acquisition according to one embodiment of the invention;
FIG. 3 is a schematic diagram of a computer device according to one embodiment of the invention;
fig. 4 is a schematic diagram of a computer-readable storage medium according to one embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
Based on the above objective, the first aspect of the embodiments of the present invention proposes an embodiment of a method for collecting information of a bare metal server intelligent network card. Fig. 1 shows a schematic flow chart of the method.
As shown in fig. 1, the method may include the steps of:
s1, responding to the bare metal server to perform px starting, and acquiring the BMC IP address of the bare metal server system through IPA service.
The bare metal server is a node with an intelligent network card or not, and can be understood to be started by the pxe with the intelligent network card or not, if the pxe is started by the intelligent network card, the bare metal server is considered to be the node with the intelligent network card, and necessary information such as a hostname and a rep port of the intelligent network card system needs to be acquired. If the user decides to start the pxe on the bare metal with the smart network card, the user needs to identify the bare metal node which is an intelligent network card when registering the bare metal, and add the driver info fields such as bmc_ip, smart_card, smart_card_ip, smart_card_ username, smart _card_password, etc. (e.g., -driver-info smart_card=true, - -driver-info smart_card_ip = 10.7.11.127- -driver-info smart_card_user = root- -driver-info smart_password=input@123). The driver info fields are written into the ironic db by ironic (bare metal service in OpenStack), and after the IPA service of the bare metal is powered up, the bmc_ip address of the bare metal is obtained.
S2, driving information of all nodes of the bare metal server is obtained through the obtained BMC IP address, and a smart_card flag bit is obtained from the driving information.
And then searching driver_info (driving information) of all nodes according to the BMC IP address. And traversing and comparing the bmc_ip of all the nodes, and acquiring a smart_card flag bit from the driver-info after finding out the node.
And S3, responding to the smart_card flag bit being wire, and acquiring user information and IP address information of the intelligent network card system.
If the smart_card flag bit is true, the node is a bare metal node with the intelligent network card, and information such as an account user password and an ip address of the intelligent network card system is returned for standby.
S4, acquiring information of the intelligent network card based on user information and IP address information of the intelligent network card system, and transmitting the information of the intelligent network card to the Ironic indicator module.
After the IPA service knows that the node where the IPA service is located is a bare metal node of the intelligent network card, the IPA service needs to acquire the desired information from the system of the intelligent network card. An internal network card of tmfifo_net0 is arranged in an operating system of the intelligent network card, the ip address of the network card is solidified into ' 192.168.100.2/24 ', an intelligent network card port of tmfifo_net0 is also arranged in a bare metal system where an IPA service is arranged, the ip of the network card can be configured into ' 192.168.100.3/24 ', thus network channels of the bare metal system and the intelligent network card system can be opened, necessary information such as a hostname and a rep port can be acquired by using a sshpass command and an account password to the intelligent network card system, and the necessary information is reported to an ironic-sector module according to the format of ' hostname ', mac_pf0: 0hfp ', mac_pf1:pf1.
And S5, the IRONG Injector module updates preset information according to the information of the intelligent network card to create an IRONG mxe smart port.
After the Ironic-insactor module receives information such as hostname of the intelligent network card, the Ironic-insactor module will traverse all ports of the current bare metal node, and if the mac address of a port is mac_pf0 or mac_pf1 of the reported information in the traversing process, update operations are performed on "/local_link_connection/hostname", "/local_link_connection/port_id", "/is_smart" information under the port, so Ironic pxe smart port is created.
By the technical scheme, whether the bare metal server is provided with the intelligent network card can be automatically judged, the information of the intelligent network card can be automatically acquired, and an ironic pxe smart port is created according to the information of the intelligent network card.
In a preferred embodiment of the present invention, obtaining the driving information of all nodes of the bare metal server through the obtained BMC IP address, and obtaining the smart_card flag bit from the driving information includes:
accessing the ironic-api through the BMC IP address;
the ironic-api acquires driving information of all nodes in all bare metal servers;
and traversing and comparing BMC IP addresses of all nodes, and acquiring a smart_card flag bit from the driving information. The bare metal starts up by pxe, and after pxe acquires the inspection mirror image and powers on, IPA service in the system can be automatically pulled up. After the IPA service is powered on, the bmc_ip address of the bare metal system is obtained, and then the bmc_ip is carried to access the ironic-api through PF0 PF0hpf br-int P0 bm-aspect, and the ironic-api obtains the driver_info of all nodes of all the bare metals. And traversing and comparing the bmc_ip of all the nodes, and acquiring a smart_card flag bit from the driver-info after finding out the node.
In a preferred embodiment of the present invention, obtaining information of an intelligent network card based on user information and IP address information of the intelligent network card system, and transmitting the information of the intelligent network card to an infrared indicator module includes:
configuring an IP address of a tmfifo_net0 intelligent network interface in a bare metal server system as 192.168.100.3/24;
based on the acquired user information, the hostname and rep port information of the intelligent network card are acquired by using the sshpass command. An internal network card of tmfifo_net0 is arranged in an operating system of the intelligent network card, the ip address of the network card is solidified into 192.168.100.2/24, an intelligent network card port of tmfifo_net0 is also arranged in a bare metal system where an ironic-python-agent is arranged, and the ip of the network card port can be configured into 192.168.100.3/24, so that network channels of the bare metal system and the intelligent network card system can be opened, and necessary information such as a necessary hostname and a rep port can be obtained by using an sshpass command and an account password.
In a preferred embodiment of the present invention, the Ironic device module performs an update operation on preset information according to information of the intelligent network card to create an Ironic px smart port, including:
the Ironic Injector module traverses all ports of the bare metal server node;
in response to the mac address of the port being either mac_pf0 or mac_pf1, an update operation is performed on the under-port/local_link_connection/hostnamin information,/local_link_connection/port_id information, and/is_smart information.
By the technical scheme, whether the bare metal server is provided with the intelligent network card can be automatically judged, the information of the intelligent network card can be automatically acquired, and an ironic pxe smart port is created according to the information of the intelligent network card.
It should be noted that, it will be understood by those skilled in the art that all or part of the procedures in implementing the methods of the above embodiments may be implemented by a computer program to instruct related hardware, and the above program may be stored in a computer readable storage medium, and the program may include the procedures of the embodiments of the above methods when executed. Wherein the storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like. The computer program embodiments described above may achieve the same or similar effects as any of the method embodiments described above.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. When executed by a CPU, performs the functions defined above in the methods disclosed in the embodiments of the present invention.
Based on the above objective, in a second aspect of the embodiments of the present invention, an apparatus for collecting information of a bare metal server intelligent network card is provided, as shown in fig. 2, an apparatus 200 includes:
the first acquisition module is configured to respond to the starting of the pxe by the bare metal server and acquire the BMC IP address of the bare metal server system through IPA service;
the second acquisition module is configured to acquire driving information of all nodes of the bare metal server through the acquired BMC IP address, and acquire a smart_card flag bit from the driving information;
the third acquisition module is configured to respond to the smart_card flag bit being wire to acquire the user information and the IP address information of the intelligent network card system;
the transmission module is configured to acquire information of the intelligent network card based on user information and IP address information of the intelligent network card system and transmit the information of the intelligent network card to the Ironic instruction module;
and the updating module is configured to update preset information according to the information of the intelligent network card so as to create an Ironic pxe smart port.
In a preferred embodiment of the invention, the second acquisition module is further configured to:
accessing the ironic-api through the BMC IP address;
the ironic-api acquires driving information of all nodes in all bare metal servers;
and traversing and comparing BMC IP addresses of all nodes, and acquiring a smart_card flag bit from the driving information.
In a preferred embodiment of the invention, the transmission module is further configured to:
configuring an IP address of a tmfifo_net0 intelligent network interface in a bare metal server system as 192.168.100.3/24;
based on the acquired user information, the hostname and rep port information of the intelligent network card are acquired by using the sshpass command.
In a preferred embodiment of the invention, the update module is further configured to:
the Ironic Injector module traverses all ports of the bare metal server node;
in response to the mac address of the port being either mac_pf0 or mac_pf1, an update operation is performed on the under-port/local_link_connection/hostnamin information,/local_link_connection/port_id information, and/is_smart information.
Based on the above object, a third aspect of the embodiments of the present invention proposes a computer device. Fig. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 3, an embodiment of the present invention includes the following means: at least one processor 21; and a memory 22, the memory 22 storing computer instructions 23 executable on the processor, the instructions when executed by the processor performing the method of:
responding to the starting of the pxe of the bare metal server, and acquiring the BMC IP address of the bare metal server system through IPA service;
acquiring driving information of all nodes of the bare metal server through the acquired BMC IP address, and acquiring a smart_card flag bit from the driving information;
responding to the smart_card flag bit being wire, obtaining user information and IP address information of the intelligent network card system;
acquiring information of an intelligent network card based on user information and IP address information of the intelligent network card system, and transmitting the information of the intelligent network card to an Ironic Injector module;
and the Ironic Injector module updates preset information according to the information of the intelligent network card to create an Ironic pxe smart port.
In a preferred embodiment of the present invention, obtaining the driving information of all nodes of the bare metal server through the obtained BMC IP address, and obtaining the smart_card flag bit from the driving information includes:
accessing the ironic-api through the BMC IP address;
the ironic-api acquires driving information of all nodes in all bare metal servers;
and traversing and comparing BMC IP addresses of all nodes, and acquiring a smart_card flag bit from the driving information.
In a preferred embodiment of the present invention, obtaining information of an intelligent network card based on user information and IP address information of the intelligent network card system, and transmitting the information of the intelligent network card to an infrared indicator module includes:
configuring an IP address of a tmfifo_net0 intelligent network interface in a bare metal server system as 192.168.100.3/24;
based on the acquired user information, the hostname and rep port information of the intelligent network card are acquired by using the sshpass command.
In a preferred embodiment of the present invention, the Ironic device module performs an update operation on preset information according to information of the intelligent network card to create an Ironic px smart port, including:
the Ironic Injector module traverses all ports of the bare metal server node;
in response to the mac address of the port being either mac_pf0 or mac_pf1, an update operation is performed on the under-port/local_link_connection/hostnamin information,/local_link_connection/port_id information, and/is_smart information.
Based on the above object, a fourth aspect of the embodiments of the present invention proposes a computer-readable storage medium. Fig. 4 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 4, the computer-readable storage medium 31 stores a computer program 32 that, when executed by a processor, performs the following method:
responding to the starting of the pxe of the bare metal server, and acquiring the BMC IP address of the bare metal server system through IPA service;
acquiring driving information of all nodes of the bare metal server through the acquired BMC IP address, and acquiring a smart_card flag bit from the driving information;
responding to the smart_card flag bit being wire, obtaining user information and IP address information of the intelligent network card system;
acquiring information of an intelligent network card based on user information and IP address information of the intelligent network card system, and transmitting the information of the intelligent network card to an Ironic Injector module;
and the Ironic Injector module updates preset information according to the information of the intelligent network card to create an Ironic pxe smart port.
In a preferred embodiment of the present invention, obtaining the driving information of all nodes of the bare metal server through the obtained BMC IP address, and obtaining the smart_card flag bit from the driving information includes:
accessing the ironic-api through the BMC IP address;
the ironic-api acquires driving information of all nodes in all bare metal servers;
and traversing and comparing BMC IP addresses of all nodes, and acquiring a smart_card flag bit from the driving information.
In a preferred embodiment of the present invention, obtaining information of an intelligent network card based on user information and IP address information of the intelligent network card system, and transmitting the information of the intelligent network card to an infrared indicator module includes:
configuring an IP address of a tmfifo_net0 intelligent network interface in a bare metal server system as 192.168.100.3/24;
based on the acquired user information, the hostname and rep port information of the intelligent network card are acquired by using the sshpass command.
In a preferred embodiment of the present invention, the Ironic device module performs an update operation on preset information according to information of the intelligent network card to create an Ironic px smart port, including:
the Ironic Injector module traverses all ports of the bare metal server node;
in response to the mac address of the port being either mac_pf0 or mac_pf1, an update operation is performed on the under-port/local_link_connection/hostnamin information,/local_link_connection/port_id information, and/is_smart information.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. The above-described functions defined in the methods disclosed in the embodiments of the present invention are performed when the computer program is executed by a processor.
Furthermore, the above-described method steps and system units may also be implemented using a controller and a computer-readable storage medium storing a computer program for causing the controller to implement the above-described steps or unit functions.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general purpose or special purpose computer or general purpose or special purpose processor. Further, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.

Claims (4)

1. The method for acquiring the information of the intelligent network card of the bare metal server is characterized by comprising the following steps of:
responding to the starting of the pxe of the bare metal server, and acquiring the BMC IP address of the bare metal server system through IPA service;
acquiring driving information of all nodes of the bare metal server through the acquired BMC IP address, and acquiring a smart_card flag bit from the driving information, wherein acquiring the driving information of all nodes of the bare metal server through the acquired BMC IP address, and acquiring the smart_card flag bit from the driving information comprises accessing an irinic-api through the BMC IP address, acquiring the driving information of all nodes in all the bare metal server through the irinic-api, traversing and comparing the BMC IP addresses of all the nodes, and acquiring the smart_card flag bit from the driving information;
responding to the smart_card flag bit being wire, obtaining user information and IP address information of an intelligent network card system;
acquiring information of an intelligent network card based on user information and IP address information of the intelligent network card system, and transmitting the information of the intelligent network card to an IronInjector module, wherein the acquiring information of the intelligent network card based on the user information and the IP address information of the intelligent network card system, and transmitting the information of the intelligent network card to the IronInjector module comprises configuring an IP address of a tmfifo_net0 intelligent network interface in a bare metal server system as 192.168.100.3/24, and acquiring hostname and rep interface information of the intelligent network card based on the acquired user information and using sshpass commands;
the method comprises the steps that an IronInjector module performs updating operation on preset information according to information of the intelligent network card to create an Ironpxe smart port, wherein the IronInjector module performs updating operation on the preset information according to the information of the intelligent network card to create the Ironpxe smart port, the IronInjector module traverses all ports of a bare metal server node, and performs updating operation on the port-under/local_link_connection/hostnamin information,/local_link_connection/port_id information and/is_smart information in response to the mac address of the port being mac_Pf0 or mac_Pf1.
2. The utility model provides a device of bare metal server intelligent network card information acquisition which characterized in that, the device includes:
the system comprises a first acquisition module, a second acquisition module and a second acquisition module, wherein the first acquisition module is configured to respond to the starting of the pxe of the bare metal server and acquire the BMC IP address of the bare metal server system through IPA service;
the second acquisition module is configured to acquire driving information of all nodes of the bare metal server through the acquired BMC IP address, acquire a smart_card flag bit from the driving information, access an ironic-api through the BMC IP address, acquire driving information of all nodes in all the bare metal server through the ironic-api, traverse and compare the BMC IP addresses of all the nodes, and acquire the smart_card flag bit from the driving information;
the third acquisition module is configured to respond to the smart_card flag bit being wire to acquire user information and IP address information of the intelligent network card system;
the transmission module is configured to acquire information of the intelligent network card based on user information and IP address information of the intelligent network card system and transmit the information of the intelligent network card to the Ironic Insector module, and is further configured to configure an IP address of a tmfifo_net0 intelligent network interface in the bare metal server system to 192.168.100.3/24, acquire hostname and rep interface information of the intelligent network card based on the acquired user information and by using sshpass commands;
the updating module is configured to update preset information according to the information of the intelligent network card to create an Ironic px smart port, and further configured to traverse all ports of the bare metal server node, and execute updating operation on the local link connection port id information and the is smart information under the ports in response to the mac address of the ports being mac_pf0 or mac_pf1.
3. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of claim 1.
4. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of claim 1.
CN202111425589.6A 2021-11-26 2021-11-26 Method, device and equipment for collecting information of intelligent network card of server and readable medium Active CN114157639B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111425589.6A CN114157639B (en) 2021-11-26 2021-11-26 Method, device and equipment for collecting information of intelligent network card of server and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111425589.6A CN114157639B (en) 2021-11-26 2021-11-26 Method, device and equipment for collecting information of intelligent network card of server and readable medium

Publications (2)

Publication Number Publication Date
CN114157639A CN114157639A (en) 2022-03-08
CN114157639B true CN114157639B (en) 2023-07-14

Family

ID=80458368

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111425589.6A Active CN114157639B (en) 2021-11-26 2021-11-26 Method, device and equipment for collecting information of intelligent network card of server and readable medium

Country Status (1)

Country Link
CN (1) CN114157639B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115509563B (en) * 2022-11-15 2023-02-28 济南浪潮数据技术有限公司 Mirror image file manufacturing method, device, equipment and medium
CN115720181B (en) * 2022-11-18 2024-09-24 济南浪潮数据技术有限公司 Bare metal node control method, system, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109445801A (en) * 2018-11-05 2019-03-08 郑州云海信息技术有限公司 A kind of method and apparatus detecting bare machine network interface card information
CN110495136A (en) * 2017-11-01 2019-11-22 华为技术有限公司 The hardware attributes of bare metal server find method and system
CN112436966A (en) * 2020-11-17 2021-03-02 浪潮云信息技术股份公司 OpenStack platform-based cloud physical host network card binding configuration method and system
CN113612702A (en) * 2021-09-30 2021-11-05 苏州浪潮智能科技有限公司 Method, system, equipment and storage medium for realizing bare metal inspection process

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110495136A (en) * 2017-11-01 2019-11-22 华为技术有限公司 The hardware attributes of bare metal server find method and system
CN109445801A (en) * 2018-11-05 2019-03-08 郑州云海信息技术有限公司 A kind of method and apparatus detecting bare machine network interface card information
CN112436966A (en) * 2020-11-17 2021-03-02 浪潮云信息技术股份公司 OpenStack platform-based cloud physical host network card binding configuration method and system
CN113612702A (en) * 2021-09-30 2021-11-05 苏州浪潮智能科技有限公司 Method, system, equipment and storage medium for realizing bare metal inspection process

Also Published As

Publication number Publication date
CN114157639A (en) 2022-03-08

Similar Documents

Publication Publication Date Title
CN114157639B (en) Method, device and equipment for collecting information of intelligent network card of server and readable medium
US20070260721A1 (en) Physical server discovery and correlation
CN110673941B (en) Migration method of micro-services in multiple computer rooms, electronic equipment and storage medium
CN109542590B (en) Method for virtual Socket communication under multiple tenants of Docker cluster
CN113612702B (en) Method, system, equipment and storage medium for realizing bare metal inspection process
CN113273135B (en) Network topology discovery in a substation
CN114978652B (en) Authority control method of edge device, resource access method and device
CN115499489B (en) Method, device, equipment and readable medium for managing sub-network in link
CN111147340A (en) Method, equipment and medium for carrying out networked access on CAN bus interface
CN111193783A (en) Service access processing method and device
CN116760834A (en) Load balancing method, system, equipment and storage medium
US9542200B2 (en) Dynamic port naming in a chassis
CN114697191A (en) Resource migration method, device, equipment and storage medium
US20230254381A1 (en) Service Request Handling
CN112600703B (en) Network equipment remote access fault positioning method and device
CN115712545B (en) Method, device, equipment and medium for realizing service topology awareness of cluster
CN107547341B (en) Access method and device of virtual extensible local area network VXLAN
CN108628864B (en) Data access method and data management device
CN117675900A (en) Device management method, device, equipment and machine-readable storage medium
CN115426258B (en) Information configuration method, device, switch and readable storage medium
EP4344259A1 (en) Session binding relationship processing method and apparatus, electronic device, and readable medium
CN113626144B (en) Method, device, equipment and readable medium for creating and storing double live volumes by clusters
CN112527375B (en) Method, device, equipment and readable medium for modifying volume QoS configuration
CN116366370B (en) Asymmetric communication method, system, storage medium and communication equipment
CN112748882B (en) Communication method, device, equipment and readable medium of host and storage equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant