Lossless network configuration method, device and computer equipment
By integrating the RoCE network configuration process into a script to automatically configure RoCE network equipment, the problems of low configuration efficiency and poor reliability in the existing technology are solved, and the convenient, automated and accurate configuration of the lossless network is achieved.
Patent Information
- Application Number
- CN202211076979.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-05
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-09-05
AI Technical Summary
When building a RoCE network, the existing technology requires manual input of a large number of command lines, resulting in low configuration efficiency and poor reliability, and it is difficult for novices to achieve lossless network configuration.
The lossless network configuration process is integrated into a script that can be executed on either side of the server or storage device to automatically configure RoCE network devices, including servers, switches and storage devices, to achieve convenient, automated and accurate lossless network configuration.
It improves the reliability and efficiency of lossless network configuration, reduces manual errors, and simplifies the configuration process, allowing novices to easily implement lossless configuration of three-layer network equipment.
Smart Images

Figure CN115529236B
Abstract
Description
Technical Field
[0001] The present application relates to the field of lossless network configuration, and in particular to a method, apparatus, and computer equipment for performing lossless network configuration on devices in a RoCE network. Background Art
[0002] In today's Internet industry, data is king, and users have higher requirements for the Internet experience. However, traditional TCP / IP (Transmission Control Protocol / Internet Protocol) Ethernet connections occupy a lot of CPU resources and require additional data processing, which can no longer meet the current user needs for faster, more efficient and scalable. In this environment, RoCE (RDMA over Converged Ethernet) has gradually come into people's view. RDMA (Remote Direct Memory Access) is used to solve the delay of server-side data processing in network transmission. Based on the network protocol ROCE defined in the IBTA (InfiniBand Trade Association) standard, it allows RDMA to be used over Ethernet networks without using the CPU (Central Processing Unit / Processor) to directly access the memory of one host or server from the memory of another host or server. It frees up the CPU to perform its work, such as running applications and processing large amounts of data. This not only improves bandwidth but also reduces latency, jitter and CPU consumption.
[0003] In the RoCE network, it is necessary to build a lossless Ethernet to ensure that there is no packet loss during network transmission. The following key features must be supported to build a lossless Ethernet: PFC (Priority-based Flow Control) provides priority-based flow control on a hop-by-hop basis, which can run multiple types of traffic on the Ethernet link without affecting each other. When the ECN (Explicit Congestion Notification) device is congested, the ECN field in the IP header of the message is marked, and the receiving end sends a CNP (Congestion Notification Packet) to the sending end to reduce the sending rate, thereby achieving end-to-end congestion management and slowing down the spread of congestion.
[0004] However, the inventors note that although the RoCE network has many advantages: improving data transmission throughput, reducing network latency, reducing CPU load, etc. However, the conditions required to achieve optimal strategy network transmission are: both network devices at both ends must support RoCE network cards and support the construction of lossless networks. This is because in the packet loss processing mechanism of IB (InfiniBand, infinite bandwidth interconnection structure), the loss of any message will cause a large number of retransmissions, seriously affecting the data transmission performance. Moreover, the traditional Ethernet configuration method is to access the network devices in the topology one by one, and a large number of command lines need to be manually input. This requires technicians to have sufficient professional technical reserves and be proficient in the use of professional command lines and codes for servers, switches, and storage layer three network devices. For this part of the application, it is not easy for novices to achieve. In addition, manual large-scale command line input will also have the problems of time-consuming and tedious work, low efficiency, difficulty in ensuring code correctness, and cumbersome self-inspection. Summary of the invention
[0005] In response to the above-mentioned deficiencies or shortcomings, the present application provides a method, apparatus and computer equipment for lossless network configuration of devices in a RoCE network. The embodiments of the present application can integrate and encapsulate the lossless network configuration process of devices in a RoCE network into a script, which can be executed on either the server or the storage device. Whenever it is necessary to perform lossless network configuration on devices in a RoCE network, it is only necessary to execute the script to perform lossless network configuration on the devices in the RoCE network, without the need to manually enter a large number of command lines. The lossless network configuration process is made convenient, automated and precise. In addition, the reliability of the lossless network configuration can also be improved.
[0006] According to a first aspect, the present application provides a method for lossless network configuration of a device in a RoCE network, including:
[0007] Encapsulate the pre-integrated lossless network configuration process as a script;
[0008] Upload the script to the target device in the RoCE network;
[0009] Execute scripts to perform lossless network configuration on each device within the RoCE network.
[0010] In some embodiments, executing a script to perform lossless network configuration on each device within the RoCE network includes:
[0011] Execute the script to perform lossless network configuration on servers, switches, and storage devices in the RoCE network in sequence.
[0012] In some embodiments, executing a script to perform lossless network configuration on a server in a RoCE network includes:
[0013] Execute the script to load the target driver file to the root directory of the server;
[0014] Execute the target driver file to install the ofd driver on the server; ofd is an open format document;
[0015] Configure the ip of the Ethernet card for the server's RoCE network connection; ip is the network communication protocol;
[0016] Enable the PFC function of the server to complete the lossless network configuration; the ECN of the server is enabled by default; PFC is priority-based flow control; ECN is display congestion notification.
[0017] In some embodiments, executing a script to perform lossless network configuration on a switch in a RoCE network includes:
[0018] Configure multiple VLANs to build a local area network to provide a local area network connection environment for servers and storage devices; VLAN is a virtual local area network.
[0019] Enable PFC and ECN on the switch to complete lossless network configuration.
[0020] In some embodiments, after completing the lossless network configuration for the server and the switch, the server sends a port access instruction to the storage device through the switch; and executes a script to perform lossless network configuration on the switch in the RoCE network, including:
[0021] Get the port access command sent from the server; the PFC and ECN of the storage device are enabled by default;
[0022] According to the port access instructions, the service port IP configuration and cluster port IP configuration are performed in sequence, so that the storage device completes lossless network configuration.
[0023] In some embodiments, before performing lossless network configuration on each device in the RoCE network, the method further includes:
[0024] Check whether the server and storage device have network cards;
[0025] When it is detected that both the server and the storage device have network cards, lossless network configuration is performed on each device in the RoCE network.
[0026] In some embodiments, detecting whether the server and the storage device have a network card includes:
[0027] Execute environment detection instructions to determine the running location of the script; the running location is a server or a storage device;
[0028] Execute the server query instruction and the storage device query instruction respectively;
[0029] Whether there is a network card in the server is detected according to the execution result of the server query instruction, and whether there is a network card in the storage device is detected according to the execution result of the storage device query instruction.
[0030] In some embodiments, the method comprises:
[0031] Monitor the global dynamics of the script;
[0032] If an exception occurs in the global dynamics, the script execution process is interrupted, the abnormal position of the script is printed, and a breakpoint is set according to the abnormal position;
[0033] If there is no abnormality in the global dynamics, continue to execute the script.
[0034] According to another aspect, the present application further provides an apparatus for performing lossless network configuration on a device in a RoCE network, including:
[0035] Configuration process encapsulation module: used to encapsulate the pre-integrated lossless network configuration process into a script;
[0036] Script upload module: used to upload the script to the target device in the RoCE network;
[0037] Lossless network configuration module: used to execute scripts to perform lossless network configuration on each device in the RoCE network.
[0038] According to another aspect, the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned method for lossless network configuration of devices in the RoCE network are implemented.
[0039] In the above embodiment of the present application, a method for lossless network configuration of devices in the RoCE network is adopted, which can integrate and encapsulate the lossless network configuration process of devices in the RoCE network into a script. Whenever lossless network configuration of devices in the RoCE network is required, only the script needs to be executed, without repeatedly manually entering a large number of command lines. In the above embodiment, the script can be executed on either the server or the storage device.
[0040] Specifically, most of the existing lossless network configuration methods require manual configuration. In the actual configuration process, the technicians need to have sufficient professional technical reserves and be proficient in the use of professional command lines and codes for servers, switches, and storage devices. Therefore, it is not easy for novices to implement this part of the application. Even if skilled technicians are asked to configure the lossless network of the three-layer network device, the work will still be time-consuming and inefficient. Moreover, since the steps of code input are cumbersome, the accuracy of code instruction input is difficult to guarantee during lossless network configuration, and self-checking is relatively troublesome.
[0041] Therefore, in order to losslessly configure the devices in the three-layer RoCE network of the above-mentioned servers, switches, and storage devices, a pre-packaged script is executed. When executing the script, an environmental test will be performed first to determine whether the running location of the script is a server or a storage device. Continue to execute the script to detect the integrity of the RoCE network topology. Specifically, detecting the integrity of the RoCE network topology is to detect whether the above-mentioned servers and storage devices have network cards. If there are network cards, the RoCE network topology is considered to be complete. By executing the detection process of the above-mentioned script, the running environment of the script and the RoCE network topology are ensured to be complete, thereby improving the reliability of the lossless network configuration. After the script completes the above-mentioned detection process, the above-mentioned servers, switches, and storage devices are configured with lossless networks in turn.
[0042] In the lossless network configuration process, execute the script to first perform lossless network configuration on the server. Specifically, first install the ofd driver on the server, then configure the IP of the Ethernet card, and finally enable the PFC function to complete the lossless network configuration process of the server. Continue to execute the script to perform lossless network configuration on the switch. Specifically, first configure multiple VLANs, and then enable the PFC and ECN functions to complete the lossless network configuration process of the switch. The above-mentioned VLAN is a virtual local area network, which is used to connect the server and storage device to the network, and the above-mentioned switch serves as a bridge for the entire RoCE network transmission. Then, continue to execute the script to perform lossless network configuration on the storage device. Specifically, after the above-mentioned switch completes the lossless network configuration, the above-mentioned storage device accepts the port access instruction sent from the server, so that the storage device accesses the RoCE network. Then, continue to execute the script so that the storage device performs service port IP configuration and cluster port IP configuration respectively, completing the lossless network configuration process of the storage device. Through the steps of the above method, in the process of executing the script to perform lossless network configuration on the server, each step of the process is executed in sequence by the code encapsulated in the script, avoiding the manual input of a large number of command lines, and realizing the convenience and automation of the lossless network configuration process. In addition, the execution of the above script will also perform a global dynamic abnormal flow detection process to monitor abnormalities in any of the above processes. If an abnormality occurs, the script execution is interrupted, the script is exited, the error point and the device breakpoint are printed, and the precision of the lossless network configuration process is realized through the above global dynamic abnormal flow detection process. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A schematic flow chart of a method for performing lossless network configuration on a device in a RoCE network in one or more embodiments of the present application;
[0044] Figure 2 A schematic diagram of the RoCE network topology structure in one or more embodiments of the present application;
[0045] Figure 3 A flowchart of a method for executing a script to perform lossless network configuration on a device in a RoCE network in one or more embodiments of the present application;
[0046] Figure 4 A flowchart of executing a script to perform lossless network configuration on a server in one or more embodiments of the present application;
[0047] Figure 5 A flowchart of executing a script to perform lossless network configuration on a switch in one or more embodiments of the present application;
[0048] Figure 6 A flowchart of executing a script to perform lossless network configuration on a storage device in one or more embodiments of the present application;
[0049] Figure 7 A flowchart for detecting whether a server and a storage device have a network card in one or more embodiments of the present application;
[0050] Figure 8 A flowchart of global dynamic abnormal flow detection in one or more embodiments of the present application;
[0051] Fig. 9 A schematic diagram of an apparatus for performing lossless network configuration on a device in a RoCE network in one or more embodiments of the present application.
[0052] Fig.10 A schematic diagram of the structure of a computer device in one or more embodiments of the present application. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0054] According to a first aspect, the present application provides a flowchart of a method for performing lossless network configuration on a device in a RoCE network. Figure 1 As shown, the method is executed by uploading the script to either end of the server or storage device. First, the execution environment of the script is detected, which can be a server or a storage device. Then, it is detected whether the above server or storage device has a network card, that is, the integrity of the RoCE network topology is detected. Finally, each device in the RoCE network, including servers, switches, and storage devices, is configured with a lossless network in turn. In addition, the script is executed to perform global abnormal flow detection and monitor each of the above steps.
[0055] Among them, the topology of the RoCE network can be as follows Figure 2 As shown, one port of each controller of the storage device and one port of the storage device are divided into a business VLAN (Virtual Local Area Network). The storage device also has two ports, both of which are divided into cluster VLANs. In summary, a storage device includes two ports of business VLANs and two ports of cluster VLANs, that is, a total of four ports are all connected to the switch. The switch serves as a network connection intermediary between the storage device and the server, and only has an IP connection with the two ports of the server. Through the above-mentioned RoCE network topology, a single server can serve multiple storage devices through a switch.
[0056] According to a first aspect, the present application provides a method for lossless network configuration of a device in a RoCE network. In some embodiments, such as Figure 3 As shown, including:
[0057] S110: Encapsulate the pre-integrated lossless network configuration process as a script;
[0058] S120: Upload the script to the target device in the RoCE network;
[0059] S130: Execute the script to perform lossless network configuration on each device in the RoCE network.
[0060] For example, in this embodiment, the pre-integrated lossless network configuration process is first encapsulated as a script, and the pre-integrated lossless network configuration process can be executed as follows: Figure 1 The code of the process shown in the figure is encapsulated as a script. Then, the script is uploaded to the target device in the RoCE network, which can be a server or a storage device. Finally, the script is executed to perform lossless network configuration on each device in the RoCE network. The script can be executed by the above-mentioned server or storage device, and each device in the RoCE network includes a server, a switch, and a storage device.
[0061] This embodiment can upload the script to the server or storage device for execution without manually re-entering a large number of command lines, and automatically perform lossless network configuration on the devices in the RoCE network, thereby making the lossless network configuration process more convenient, automated, and precise.
[0062] In some embodiments, executing a script to perform lossless network configuration on each device within the RoCE network includes:
[0063] Execute the script to perform lossless network configuration on the servers, storage devices, and switches in the RoCE network in sequence.
[0064] Exemplarily, in this embodiment, the script may be executed by a server or a storage device to sequentially perform lossless network configuration on three-layer devices in the RoCE network, namely, the server, the switch, and the storage device.
[0065] Specifically, since the switch is the intermediary for the network connection between the server and the storage device in the RoCE network topology, in this embodiment, it is necessary to first perform lossless network configuration on the server, and then perform lossless network configuration on the switch. After both the server and the switch have completed the lossless network configuration, the server sends a port access instruction to the storage device through the switch, and then starts to perform lossless network configuration on the storage device. Through the above method, the automation and precision of lossless network configuration of devices in the RoCE network can be achieved.
[0066] In some embodiments, executing a script to perform lossless network configuration on a server in a RoCE network includes:
[0067] S210: Execute the script to load the target driver file into the root directory of the server;
[0068] S220: Execute the target driver file to install the ofd driver on the server; ofd is an open format document;
[0069] S230: Performing ip configuration of the Ethernet card for the RoCE network connection of the server; ip is a network communication protocol;
[0070] S240: Enable the PFC function of the server to complete the lossless network configuration; the ECN of the server is enabled by default; PFC is priority-based flow control; ECN is display congestion notification.
[0071] Exemplarily, in this embodiment, the script can be executed by the server or storage device to load the target driver file into the root directory of the server. The target driver file is the driver file saved in the attachment of the script, and then the above target driver file is executed to install the ofd driver in the server and configure the IP of the Ethernet card for the RoCE network connection of the server. Finally, the script continues to be executed to enable the PFC function of the server and complete the lossless network configuration.
[0072] Exemplarily, in this embodiment, the server or storage device executes the script to first install the ofd driver on the server. The installation process may be:
[0073] (1) Execute the script, load the target file to the server root directory, decompress the ofd driver, and execute the following commands in the root directory: . / mlnxofedinstall–with-nvmf, / etc / init.d / openibd restart;
[0074] (2) Enable native nvme multipath: Create or modify the / etc / modprobe.d / nvme_core.conf file and add the line options nvme_core multipath=N. The above nvme is a logical device interface specification. Update the img file and restart dracut -f / boot / initramfs-`uname-r`.img`uname-r`; reboot. The above img is a file compression format. Upload the latest version of nvme-cli compressed package to the server root directory and execute the following command to install it: make / make install.
[0075] After completing the above ofd driver installation, continue to execute the script to determine that the server's device port is in the same RoCE network, and then configure the IP of the Ethernet card. The script can execute the following instructions: cma_roce_tos-d mlx5_1-t104; vconfig add enp250s0f020; ifconfig enp250s0f0.20 192.168.2.51netmask255.255.255.0up; ip link set enp250s0f0.20 type vlan egress 2:3; cat / proc / net / vlan / enp250s0f0.20. By executing the above instructions, it is determined that the server's device port is in the same RoCE network, and then the IP of the Ethernet card is configured. The last instruction above can be used to check whether the above steps are successfully executed. Finally, continue to execute the script to enable the PFC function of the server. Among them, the server's ECN is located on the server's network card and is enabled by default. There is no need to execute the script specifically to enable it. Through the above method, automatic and precise lossless network configuration of the server is achieved.
[0076] In some embodiments, executing a script to perform lossless network configuration on a switch in a RoCE network includes:
[0077] S310: Configure multiple VLANs to build a local area network for providing a local area network connection environment for servers and storage devices; VLAN is a virtual local area network;
[0078] S320: Enable PFC and ECN of the switch to complete lossless network configuration.
[0079] For example, in this embodiment, a script may be executed by a server or storage device to configure multiple VLANs to build a local area network for providing a local area network connection environment for the server and storage device. Then, after setting the port of the above VLAN to access mode, the PFC and ECN of the switch are turned on to complete the lossless network configuration.
[0080] Exemplarily, in this embodiment, multiple VLANs can be set according to the topology requirements of the RoCE network. According to standard principles, it is generally divided into three VLANs, including a service VLAN and two cluster VLANs. Among them, a port of the controller of the storage device and the host-side service port of the storage device are divided into the service VLAN. The storage device is further provided with two ports, and the two ports are divided into two cluster VLANs. Correspondingly, the switch also has corresponding service VLAN ports and cluster VLAN ports connected to the corresponding ports of the above storage devices. The following discussion is about the ports of the switch.
[0081] In this embodiment, each time a VLAN is set, taking vlan1 as an example, the following instructions are executed: configureterminal; vlan datebace; vlan 1 (for example vlan1). If multiple VLANs are to be set, just change vlan1 to vlanN, where N is any natural number, and repeat the above instructions to set multiple VLANs.
[0082] After the above multiple VLANs are set up, set the ports of the above VLANs to access mode. Taking vlan1 as an example, execute the following commands: configure terminal; interface eth-0-1; switchport mode access (set switch port 1 to access mode); switchport access vlan 1 (add switch port 1 to vlan 1).
[0083] When the ports of the above multiple VLANs are set to access mode, take vlan1 as an example to enable the PFC and ECN functions of the switch:
[0084] (1) Execute the following command to enable the PFC function of switch port 1:
[0085] configure terminal; interface eth-0-1; priority-flow-control mode on (indicates enabling the PFC function of port 1);
[0086] priority-flow-control enable priority 3 (indicates enabling the PFC function for all ports, assuming the number of ports is 3).
[0087] (2) Execute the following command to enable the ECN function of the switch:
[0088] configure terminal; class-map type traffic-class ecn_pri3; matchtraffic-class 3; exit; policy-map type traffic-class ecn_pmap; class typetraffic-class ecn_pri3; random-detect maximum-threshold 400ecn. (Indicates that the ECN function is enabled for all ports, assuming that the number of ports is 3)
[0089] (3) If you need to enable ECN on port 3 of the switch, execute the following command:
[0090] configure terminal; interface eth-0-3; service-policy type traffic-class ecn_pmap.
[0091] Through the above operations, the PFC and ECN functions of all ports of the switch are enabled in turn, the lossless network configuration of the switch is completed, and the automatic and precise lossless network configuration of the switch is realized.
[0092] In some embodiments, after completing the lossless network configuration for the server and the switch, the server sends a port access instruction to the storage device through the switch; and executes a script to perform lossless network configuration for the storage device in the RoCE network, including:
[0093] S410: Obtaining a port access instruction sent from a server; PFC and ECN of the storage device are enabled by default;
[0094] S420: Perform service port IP configuration and cluster port IP configuration in sequence according to the port access instruction, so that the storage device completes lossless network configuration.
[0095] For example, in this embodiment, after the lossless network configuration of the server and the switch is completed, the server can send a port access instruction to the storage device through the switch to start the lossless network configuration process of the storage device. The storage device first obtains the port access instruction sent from the server, and then performs service port IP configuration and cluster port IP configuration in sequence according to the port access instruction.
[0096] Specifically, in this embodiment, the following instructions may be executed so that the storage device obtains the port access instruction sent from the server from the port of the switch. Assume that the number of VLANs is 3:
[0097] mtinq lsnodeip|grep active–delim,|cut–d,-f2|sed 1p, which means saving the result to port_id1;
[0098] mtinq lsnodeip|grep active–delim,|cut–d,-f2|sed 2p, which means saving the result to port_id2;
[0099] mtinq lsnodeip|grep active–delim,|cut–d,-f2|sed 3p, which means saving the result to port_id3.
[0100] Through the above instructions, the storage device saves the above port access instructions.
[0101] After saving the port access instructions on the above storage device, configure the IP addresses of the service port and cluster port of the storage device respectively:
[0102] (1) Execute the following command to configure the IP address of the service port of the storage device:
[0103] mcsop cfgportip-gw 192.168.2.1-ip 192.168.2.20-mask 255.255.255.0-node 1-vlan 1port_id1.
[0104] (2) Execute the following command to configure the IP address of the cluster port of the storage device:
[0105] mtop chnodeip–ip 192.168.3.11–gw 192.168.3.1–mask 255.255.255.0–port_id port_id2–vlan 2; mtop chnodeip–ip 192.168.4.11–gw 192.168.4.1–mask255.255.255.0–port_id port_id2–vlan 3.
[0106] Through the above method, under the condition that the PFC and ECN of the storage device are turned on by default, the storage device port is connected to the corresponding port of the switch in turn through IP, so as to complete the lossless network configuration of the storage device, and realize the automatic and precise lossless network configuration of the storage device.
[0107] In some embodiments, performing lossless network configuration on each device in the RoCE network also includes: detecting whether the server and the storage device have a network card; when it is detected that both the server and the storage device have a network card, performing lossless network configuration on each device in the RoCE network.
[0108] For example, before performing lossless network configuration on each device in the RoCE network, it is also necessary to execute a script to detect whether the server and storage device have a network card to ensure the integrity of the RoCE network topology. After confirming that both the server and storage device have a network card, perform lossless network configuration on each device in the RoCE network. Through the above method, the reliability of lossless network configuration can be improved.
[0109] In some embodiments, detecting whether the server and the storage device have a network card includes:
[0110] S510: Execute an environment detection instruction to determine the running location of the script; the running location is a server or a storage device;
[0111] S520: Execute the server query instruction and the storage device query instruction respectively;
[0112] S530: Detect whether there is a network card in the server according to the execution result of the server query instruction, and detect whether there is a network card in the storage device according to the execution result of the storage device query instruction.
[0113] Exemplarily, before performing lossless network configuration on each device in the RoCE network, it is also necessary to execute a script to detect whether the server and storage device have a network card. First, execute the script to perform environmental detection to determine the running location of the script, which can be a server or a storage device. Execute the following instructions in the script respectively: server query instruction (mtinqlshardware) and storage device query instruction (lspci), thereby detecting whether there is a network card in the server according to the execution result of the server query instruction, and detecting whether there is a network card in the storage device according to the execution result of the storage device query instruction, and finally judging the integrity of the RoCE network topology. Through the above method, after ensuring that both the server and the storage device have a network card, the reliability of the lossless network configuration can be improved.
[0114] In some embodiments, the method further comprises:
[0115] S610: monitoring the global dynamics of the script;
[0116] S620: If an exception occurs in the global dynamics, the script execution process is interrupted, the abnormal position of the script is printed, and a breakpoint is set according to the abnormal position;
[0117] S630: If there is no abnormality in the global dynamics, continue to execute the script.
[0118] Exemplarily, monitoring the global dynamics of the script mainly includes monitoring the running status of the following five processing flows:
[0119] (1) Monitor the script running environment;
[0120] (2) Check the integrity of the RoCE network topology;
[0121] (3) Lossless network configuration of the server;
[0122] (4) Lossless network configuration of switches;
[0123] (5) Lossless network configuration of storage devices.
[0124] If any of the processes in the global dynamics described above has an abnormal error, the script execution process is interrupted, the script is exited, the error location is printed, and a breakpoint is set based on the abnormal location. Based on the error information, the user can locate, check, modify, and re-execute the exception in the script. Moreover, since there is no necessary connection between the various processes in the global dynamics, when the script is repeated, it continues to execute from the breakpoint. Through the above method, during the script running process, another global dynamic abnormal flow detection is performed to improve the reliability of the lossless network configuration.
[0125] According to another aspect, the present application also provides a system for performing lossless network configuration on a device in a RoCE network, including:
[0126] Configuration process encapsulation module 110: used to encapsulate the pre-integrated lossless network configuration process into a script;
[0127] The script upload module 120 is used to upload the script to the target device in the RoCE network;
[0128] The lossless network configuration module 130 is used to execute scripts to perform lossless network configuration on each device in the RoCE network.
[0129] In some embodiments, the configuration process encapsulation module 110 is specifically used to encapsulate the pre-integrated lossless network configuration process into a script. The pre-integrated lossless network configuration process can be executed as follows: Figure 1 The code of the process shown is encapsulated as a script.
[0130] In some embodiments, the configuration process encapsulation module 120 is specifically used to upload the script to a target device in the RoCE network, and the target device may be a server or a storage device.
[0131] In some embodiments, the configuration process encapsulation module 130 is specifically used to execute a script to perform lossless network configuration on each device in the RoCE network. The script can be executed by the above-mentioned server or storage device, and each device in the RoCE network includes a server, a switch, and a storage device.
[0132] According to another aspect, the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned method for lossless network configuration of devices in the RoCE network are implemented.
[0133] In the above embodiment of the present application, the lossless network configuration process of the devices in the RoCE network is integrated and encapsulated into a script. Whenever the lossless network configuration of the devices in the RoCE network is required, the script can be executed to automatically perform the lossless network configuration. In this embodiment, the script can be executed on either the server or the storage device.
[0134] Specifically, most of the existing lossless network configuration methods are manually configured. In the actual configuration process, the technicians need to have sufficient professional technical reserves and be proficient in the use of professional command lines and codes for three-layer network devices such as servers, switches, and storage devices. Therefore, it is not easy for novices to implement this part of the application. Even if skilled technicians are asked to configure the lossless network of the three-layer network device, the work will still be time-consuming and inefficient. Moreover, since the steps of code input are cumbersome, the accuracy of code instruction input is difficult to guarantee during lossless network configuration, and self-checking is relatively troublesome.
[0135] Therefore, in order to solve the above problems, the devices in the three-layer RoCE network of the above-mentioned servers, switches, and storage devices can be fully automated and losslessly configured, and the above-mentioned script is executed. The environment is first detected to determine whether the running location of the script is a server or a storage device. Continue to execute the script to detect the integrity of the RoCE network topology. Specifically, detecting the integrity of the RoCE network topology is to detect whether the above-mentioned servers and storage devices have network cards. If there are network cards, the RoCE network topology is considered to be complete. By executing the detection process of the pre-packaged script, an environmental test will be performed first when the script is executed to ensure that the running environment of the script and the RoCE network topology are complete, thereby improving the reliability of the lossless network configuration. After completing the above-mentioned detection process, the script performs lossless network configuration on the above-mentioned servers, switches, and storage devices in turn.
[0136] In the lossless network configuration process, execute the script to first perform lossless network configuration on the server. Specifically, first install the ofd driver on the server, then configure the IP of the Ethernet card, and finally enable the PFC function to complete the lossless network configuration process of the server. Continue to execute the script to perform lossless network configuration on the switch. Specifically, first configure multiple VLANs, and then enable the PFC and ECN functions to complete the lossless network configuration process of the switch. The above-mentioned VLAN is a virtual local area network, which is used to connect the server and storage device to the network. The above-mentioned switch serves as an intermediary for the entire RoCE network transmission. Then, continue to execute the script to perform lossless network configuration on the storage device. Specifically, after the above-mentioned switch completes the lossless network configuration, the above-mentioned storage device accepts the port access instruction sent from the server, so that the storage device accesses the RoCE network. Then, continue to execute the script so that the storage device performs service port IP configuration and cluster port IP configuration respectively, completing the lossless network configuration process of the storage device. Through the steps of the above method, in the process of executing the script to perform lossless network configuration on the server, each step of the process is executed in sequence by the code encapsulated in the script, avoiding the manual input of a large number of command lines, and realizing the convenience and automation of the lossless network configuration process. In addition, the execution of the above script will also perform a global dynamic abnormal flow detection process to monitor abnormalities in any of the above processes. If an abnormality occurs, the script execution is interrupted, the script is exited, the error point and the device breakpoint are printed, and the precision of the lossless network configuration process is realized through the above global dynamic abnormal flow detection process.
[0137] Those skilled in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus), direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0138] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0139] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for performing lossless network configuration on a device in a RoCE network, characterized in that: The devices in the RoCE network include servers, switches, and storage devices, and the method includes: Encapsulate the pre-integrated lossless network configuration process as a script; Uploading the script to a target device in the RoCE network; Executing the script to sequentially perform lossless network configuration on the server, the switch, and the storage device; Before performing lossless network configuration on each device in the RoCE network, the method further includes: Execute an environment detection instruction to determine the running location of the script, the running location being the server or the storage device; Execute the server query instruction and the storage device query instruction respectively; Detecting whether the server has a network card according to the execution result of the server query instruction, and detecting whether the storage device has a network card according to the execution result of the storage device query instruction; When it is detected that both the server and the storage device have network cards, lossless network configuration is performed on the server, the switch and the storage device in sequence; When executing the script, the method further includes: Monitoring the global dynamics of the script; If the global dynamics are abnormal, the execution process of the script is interrupted, the abnormal position of the script is printed, and a breakpoint is set according to the abnormal position; If there is no abnormality in the global dynamics, the script continues to be executed.
2. The method according to claim 1, characterized in that: Executing the script to perform lossless network configuration on the server in the RoCE network includes: Executing the script to load the target driver file into the root directory of the server; Execute the target driver file to install the ofd driver on the server; the ofd is an open format document; Performing an ip configuration of an Ethernet card for the RoCE network connection of the server; the ip is a network communication protocol; The PFC function of the server is turned on to complete the lossless network configuration; the ECN of the server is turned on by default.
3. The method according to claim 1, characterized in that Executing the script to perform lossless network configuration on the switch in the RoCE network includes: Configure multiple VLANs to build a local area network for providing a local area network connection environment for the server and storage device; the VLAN is a virtual local area network, and the PFC and ECN of the switch are turned on to complete lossless network configuration.
4. The method according to claim 1, characterized in that: After completing the lossless network configuration for the server and the switch, the server sends a port access instruction to the storage device through the switch; and executing the script to perform lossless network configuration for the switch in the RoCE network, including: Obtaining a port access instruction sent from the server; the PFC and ECN of the storage device are enabled by default; The service port IP configuration and the cluster port IP configuration are performed in sequence according to the port access instruction, so that the storage device completes lossless network configuration.
5. A device for performing lossless network configuration on a device in a RoCE network, characterized in that: The devices in the RoCE network include servers, switches and storage devices, and the apparatus includes: Configuration process encapsulation module: used to encapsulate the pre-integrated lossless network configuration process into a script; Script upload module: used to upload the script to the target device in the RoCE network; A lossless network configuration module: used for executing the script to sequentially perform lossless network configuration on the server, the switch and the storage device; The apparatus further includes a network card detection module, which is used to: Execute an environment detection instruction to determine the running location of the script, the running location being the server or the storage device; Execute the server query instruction and the storage device query instruction respectively; Detecting whether the server has a network card according to the execution result of the server query instruction, and detecting whether the storage device has a network card according to the execution result of the storage device query instruction; The lossless network configuration module is further used to: when it is detected that both the server and the storage device have network cards, perform lossless network configuration on the server, the switch and the storage device in sequence; The device also includes a global detection module, and when executing the script, the global detection module is further used to: Monitoring the global dynamics of the script; If the global dynamics are abnormal, the execution process of the script is interrupted, the abnormal position of the script is printed, and a breakpoint is set according to the abnormal position; If there is no abnormality in the global dynamics, the script continues to be executed.
6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Method and system for automatically testing RoCE performance based on Linux system
CN106899454A
Method for expanding business network and device
CN109495306A
Distributed machine learning system and method of adaptive RDMA network
CN112348196A
RDMA parameter configuration method and device and storage medium
CN112532447A
Multi-control cluster round performance test method and device, terminal and storage medium
CN115391202A
