Firmware upgrade method, electronic device, storage medium, and product
By selecting the best-performing baseboard management controller from the server cluster as the master node, and using idle memory and network transmission rate to filter nodes, conduct connectivity tests and file copying, the problem of time-consuming and laborious firmware upgrades for multiple devices is solved, achieving efficient and stable firmware upgrade management.
Patent Information
- Application Number
- PCT/CN2025/102793
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-26
- Filing Date
- 2025-06-23
- Publication Date
- 2026-01-02
AI Technical Summary
In existing technologies, firmware upgrades for multiple devices require logging into the BMC management page and manually uploading files for each device, resulting in high costs and time-consuming processes.
By selecting the best-performing baseboard management controller from the target cluster as the master node, and using free memory capacity and network transmission rate to filter candidate and non-candidate network file system nodes, connectivity tests are conducted to determine the network file system configuration node and mounted child nodes, and firmware upgrade files are copied and executed through these nodes.
It enables firmware upgrade management without the need for additional resources, reduces operation and maintenance costs, saves time and energy for operation and maintenance personnel, avoids the problem of inconsistent cluster firmware files, ensures stable cluster operation, and improves the monitoring frequency and accuracy of the baseboard management controller.
Smart Images

Figure CN2025102793_02012026_PF_FP_ABST
Abstract
Description
Firmware upgrading method, electronic device, storage medium and product
[0001] Cross-reference of related applications
[0002] This application claims priority to the Chinese patent application No. 202410833570.2, filed on June 26, 2024, and entitled "Firmware upgrading method, electronic device, storage medium and product", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present application relates to the technical field of computers, and in particular to a firmware upgrading method, an electronic device, a storage medium and a product. BACKGROUND
[0004] For a large server room, the operation and maintenance team usually applies for a dedicated machine, on which the operation and maintenance personnel can flexibly deploy virtualization services and various services to efficiently manage the servers in the entire server room. However, for a server room with a smaller scale, containing only 5 to 30 servers, if a separate machine is configured for virtualization services, the cost investment will undoubtedly increase, which is obviously unacceptable to many customers.
[0005] BMC (Baseboard Management Controller) is a special microcontroller embedded in the server motherboard, which is the core of the out-of-band management of the server. It shoulders the heavy responsibility of managing the interface between system software and platform hardware, ensuring smooth communication between the two. In terms of function, BMC has shown strong strength. It can not only monitor the key parameters of the server in real time, such as temperature, voltage, fan speed and power status, to achieve accurate monitoring of hardware; but also can perform remote management and control operations, such as remotely monitoring the running status of the server, and even remotely restarting when necessary, to ensure the stable operation of the server. Therefore, through effective management of BMC, we can not only ensure the stable operation of the server room, but also further reduce costs and improve overall operational efficiency. For example, under the existing technical framework, when the user performs firmware upgrading operation, the user can perform firmware upgrading by logging in to the BMC management page.
[0006] However, when facing multiple devices, the operation and maintenance personnel need to log in to the BMC management page of each machine one by one, and then manually upload the same BMC, BIOS (Basic Input Output System), CPLD (Complex Programmable Logic Device) and other firmware files one by one to complete the upgrading work of each device, which is time-consuming and laborious. SUMMARY
[0007] Embodiments of the present application provide a firmware upgrade method, an electronic device, a storage medium and a product, which solve the problem of high cost and time-consuming and laborious when upgrading firmware, and the specific technical solutions are as follows:
[0008] The first aspect of embodiments of the present application provides a firmware upgrade method, the method comprising:
[0009] In response to the received firmware upgrade task, uploading the target firmware upgrade file and the key information of the baseboard management controller of at least one of the target cluster to the master node, wherein each baseboard management controller corresponds to a node, the master node is the node where the baseboard management controller with the best performance among the baseboard management controllers of at least one of the target cluster, and the key information includes the idle memory capacity and the network transmission rate;
[0010] Selecting the candidate network file system node and the non-candidate network file system node from at least one node of the target cluster through the idle memory capacity and the network transmission rate;
[0011] Performing connectivity test on the candidate network file system node through the non-candidate network file system node;
[0012] Determining the network file system configuration node from the candidate network file system node and the mounting sub-node of the network file system configuration node from the non-candidate network file system node through the result of the connectivity test;
[0013] Copying the target firmware upgrade file from the master node to the network file system configuration node, and copying the target firmware upgrade file from the network file system configuration node to the mounting sub-node;
[0014] Performing the firmware upgrade task through the target firmware upgrade file.
[0015] In some embodiments of the present application, before uploading the target firmware upgrade file and the key information of the baseboard management controller of at least one of the target cluster to the master node in response to the received firmware upgrade task, the method further comprises:
[0016] In the case of determining that the baseboard management controller of the target cluster is started, running the information acquisition device in the baseboard management controller;
[0017] Collecting the data information and the network address of the baseboard management controller of the target cluster through the information acquisition device according to a first preset period, wherein the data information includes the performance parameter information of the baseboard management controller;
[0018] Binding the network address and the data information belonging to the same baseboard management controller;
[0019] screening the master node and the slave node from the baseboard management controller of at least one of the target cluster through the performance parameter information.
[0020] In some embodiments of the present application, the data information at least includes any one or more of the following: a chip model of the baseboard management controller, a central processing unit model, a central processing unit occupancy rate, a total memory capacity, a free memory capacity, a buffer capacity, first machine type information of a field replaceable unit, a network transmission rate, a real-time transmission rate of a management port network card, network connectivity and bandwidth utilization, wherein the central processing unit occupancy rate, the free memory capacity, the network transmission rate, the real-time transmission rate of the management port network card, the network connectivity and the bandwidth utilization belong to the performance parameter information.
[0021] In some embodiments of the present application, in response to the received firmware upgrade task, after uploading the target firmware upgrade file and the key information of the baseboard management controller of at least one of the target cluster to the master node, the method further comprises:
[0022] obtaining firmware machine type information applicable to a server corresponding to the baseboard management controller of at least one of the target cluster;
[0023] dividing the baseboard management controller of at least one of the target cluster through the firmware machine type information, wherein the baseboard management controllers in each division area correspond to the same firmware machine type information applicable to the server;
[0024] analyzing header information of the target firmware upgrade file to obtain second machine type information applicable to the target firmware to be upgraded;
[0025] comparing the second machine type information with the firmware machine type information to determine a first division area to which the target firmware upgrade file is applicable and a second division area to which the target firmware upgrade file is not applicable.
[0026] In some embodiments of the present application, the header information of the target firmware upgrade file further includes a hash value of the first message digest algorithm version 5;
[0027] copying the target firmware upgrade file from the master node to a network file system configuration node, and copying the target firmware upgrade file from the network file system configuration node to a mounted slave node, comprising:
[0028] verifying the hash value of the first message digest algorithm version 5;
[0029] if the hash value of the first message digest algorithm version 5 is consistent with a preset target hash value of the fifth version of the message digest algorithm, obtaining target firmware machine type information applicable to the network file system configuration node;
[0030] If the target firmware model information is consistent with the second model information, the target firmware upgrade file is copied from the master node to the network file system configuration node, and the target firmware upgrade file is copied from the network file system configuration node to the mounting sub-node, and the firmware model information of the network file system configuration node and the mounting sub-node is consistent.
[0031] In some embodiments of the present application, the firmware upgrade task is performed by the target firmware upgrade file, comprising:
[0032] In the case where it is determined that the target firmware upgrade file exists in the specified directory of the mounting sub-node, the mounting sub-node is triggered to perform the first firmware upgrade task by the target firmware upgrade file;
[0033] The upgrade progress and the upgrade log of the first firmware upgrade task are obtained, and the upgrade progress and the upgrade log are uploaded to the master node;
[0034] The upgrade state of the mounting sub-node is determined by the upgrade progress and the upgrade log;
[0035] In the case where it is determined that the upgrade state of the mounting sub-node is upgrade completed, the network file system configuration node is controlled to perform the second firmware upgrade task by the target firmware upgrade file.
[0036] In some embodiments of the present application, in response to the received firmware upgrade task, the target firmware upgrade file and the key information of the baseboard management controller of at least one of the target cluster are uploaded to the master node, and further comprising:
[0037] The first weight of the key information is set for the firmware upgrade task in advance, and the second weight of the key information is set for the non-firmware upgrade task;
[0038] In response to the received firmware upgrade task, the key information of the baseboard management controller of at least one of the target cluster is collected according to a second preset period;
[0039] The target firmware upgrade file and the key information of the baseboard management controller of at least one of the target cluster are uploaded to the master node.
[0040] In some embodiments of the present application, after the target firmware upgrade file and the key information of the baseboard management controller of at least one of the target cluster are uploaded to the master node, further comprising:
[0041] In the case where it is determined that the number of collected key information is greater than a first preset value, the target key information closest to the current time is extracted three times;
[0042] The target free memory capacity of each baseboard management controller in the target cluster is determined through the target key information and a target free memory capacity formula, and the target network transmission rate of each baseboard management controller in the target cluster is determined through the target key information and a target network transmission rate formula;
[0043] Each baseboard management controller in the target cluster is scored through the target free memory capacity and the target network transmission rate;
[0044] The target firmware upgrade file and the baseboard management controller of at least one of the target cluster are sorted in the mirror image according to the order from large to small of the scoring results.
[0045] In some embodiments of the present application, the target free memory capacity formula is:
[0046] The target network transmission rate formula is:
[0047] Wherein, r m is the target free memory capacity, F max is the maximum capacity of free memory in the target key information, F mid is the intermediate capacity of free memory in the target key information, F min is the minimum capacity of free memory in the target key information, w1 is the first weight about the key information, r n is the target network transmission rate, N max is the maximum rate of network transmission in the target key information, N mid is the intermediate rate of network transmission in the target key information, N min is the minimum rate of network transmission in the target key information.
[0048] In some embodiments of the present application, after the target firmware upgrade file and the baseboard management controller of at least one of the target cluster are sorted in the mirror image according to the order from large to small of the scoring results, it further includes:
[0049] A sorting list about the baseboard management controller of at least one of the target cluster is generated through the mirror image sorting;
[0050] The nodes corresponding to the baseboard management controllers ranked in the top one-third quantity in the sorting list are determined as the candidate network file system nodes;
[0051] The nodes corresponding to the baseboard management controllers ranked in the last two-thirds quantity in the sorting list are determined as the non-candidate network file system nodes.
[0052] In some embodiments of the present application, the connectivity test of the candidate network file system nodes through the non-candidate network file system nodes includes:
[0053] sequentially test the connectivity between each non-candidate network file system node and each candidate network file system node for a preset number of times;
[0054] obtain a first network delay value for each connectivity test;
[0055] determine a target average network delay value for each non-candidate network file system node and each candidate network file system node within the preset number of times through the first network delay value.
[0056] In some embodiments of the present application, the network file system configuration node is determined from the candidate network file system nodes and the mounting sub-node of the network file system configuration node is determined from the non-candidate network file system nodes through the results of the connectivity test, comprising:
[0057] determine the first average network delay value of each non-candidate network file system node and each candidate network file system node in the order from the back to the front of the sorting list;
[0058] select the second average network delay value with the smallest value from the first average network delay value;
[0059] determine the candidate network file system node corresponding to the second average network delay value as the hit node, determine the corresponding non-candidate network file system node as the mounting sub-node of the hit node, and increase the hit speed of the hit node by 1;
[0060] In the case where the hit speed of the hit node reaches a second preset value, determine the hit node as the network file system configuration node and determine the mounting sub-node of the hit node as the mounting sub-node of the network file system configuration node.
[0061] The second aspect of the embodiment of the present application provides a firmware upgrade device, the device comprising:
[0062] The first uploading module is configured to upload the target firmware upgrade file and the key information of the baseboard management controller of at least one of the target cluster to the master node in response to the received firmware upgrade task, wherein each baseboard management controller corresponds to a node, the master node is a node where the baseboard management controller with the best performance in the baseboard management controllers of at least one of the target cluster, and the key information includes the idle memory capacity and the network transmission rate;
[0063] The first screening module is configured to screen out the candidate network file system node and the non-candidate network file system node from at least one node of the target cluster through the idle memory capacity and the network transmission rate;
[0064] The test module is configured to test the connectivity between the non-candidate network file system node and the candidate network file system node.
[0065] The first determining module is configured to determine the network file system configuration node from the candidate network file system nodes according to the result of the connectivity test, and determine the mounting sub-node of the network file system configuration node from the non-candidate network file system nodes;
[0066] The file copying module is configured to copy the target firmware upgrade file from the master node to the network file system configuration node, and copy the target firmware upgrade file from the network file system configuration node to the mounting sub-node.
[0067] The task execution module is configured to execute the firmware upgrade task by using the target firmware upgrade file.
[0068] The third aspect of the embodiments of the present application provides an electronic device, which comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, and when the computer program is executed by the processor, the steps of the firmware upgrade method of the first aspect of the embodiments of the present application are implemented.
[0069] The fourth aspect of the embodiments of the present application provides a computer non-volatile readable storage medium, and the computer non-volatile readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the firmware upgrade method of the first aspect of the embodiments of the present application are implemented.
[0070] The fifth aspect of the embodiments of the present application provides a computer program product, which comprises computer programs / instructions, and when the computer programs / instructions are executed by a processor, the steps of the firmware upgrade method of the first aspect of the embodiments of the present application are implemented.
[0071] The embodiment of the application provides a firmware upgrade method, in response to a received firmware upgrade task, uploading target firmware upgrade files and key information of at least one substrate management controller in a target cluster to a master node, wherein each substrate management controller corresponds to a node, the master node is a node where a substrate management controller with the best performance in the at least one substrate management controller in the target cluster, the key information includes idle memory capacity and network transmission rate; selecting an alternative network file system node and a non-alternative network file system node from the at least one node in the target cluster through the idle memory capacity and the network transmission rate; performing a connectivity test on the alternative network file system node through the non-alternative network file system node; determining a network file system configuration node from the alternative network file system node and a mounting sub-node of the network file system configuration node from the non-alternative network file system node through a result of the connectivity test; copying the target firmware upgrade files from the master node to the network file system configuration node, and copying the target firmware upgrade files to the mounting sub-node through the network file system configuration node; and performing a firmware upgrade task through the target firmware upgrade files. In the embodiment, the substrate management controller in the target cluster is used to manage and run the firmware upgrade task, additional resources are not needed, operation and maintenance costs are reduced, the mounting sub-node is used to make an operation and maintenance personnel not need to frequently operate a WEB page of a node, time and energy of the operation and maintenance personnel are saved, and a problem of inconsistent cluster firmware files caused by long-time focus work is avoided, so that stable operation of the cluster is realized. In addition, the application also improves a monitoring frequency to more accurately track real conditions of the at least one substrate management controller in the target cluster. BRIEF DESCRIPTION OF DRAWINGS
[0072] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description.
[0073] Fig. 1 is a step flowchart of a firmware upgrade method according to some embodiments of the application;
[0074] Fig. 2 is a step flowchart of another firmware upgrade method according to some embodiments of the application shown in Fig. 1;
[0075] Fig. 3 is a structural schematic diagram of a substrate management controller in a firmware upgrade method according to some embodiments of the application shown in Fig. 1;
[0076] Fig. 4 is a step 105 flowchart in a firmware upgrade method according to some embodiments of the application shown in Fig. 1;
[0077] Fig. 5 is a step 101 flowchart in a firmware upgrade method according to some embodiments of the application shown in Fig. 1;
[0078] FIG. 6 is a step flow chart of another firmware upgrade method according to some embodiments of the present application;
[0079] FIG. 7 is a structural block diagram of a firmware upgrade device according to some embodiments of the present application;
[0080] FIG. 8 is a schematic diagram of an electronic device according to some embodiments of the present application. DETAILED DESCRIPTION
[0081] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the various embodiments of the present application will be described in detail below with reference to the accompanying drawings. However, those of ordinary skill in the art can understand that, in the various embodiments of the present application, many technical details are presented in order to make the readers better understand the present application. However, the technical solutions claimed by the present application can be implemented even without these technical details and based on various changes and modifications of the following embodiments. The division of the following various embodiments is for the convenience of description, and should not constitute any limitation on the specific implementation of the present application. The various embodiments can be combined with each other and referenced to each other without contradiction.
[0082] Referring to FIG. 1, a step flow chart of a firmware upgrade method according to an embodiment of the present application is shown, the method can include:
[0083] In step 101, in response to a received firmware upgrade task, upload the target firmware upgrade file and the key information of the baseboard management controller of at least one of the target cluster to the master node.
[0084] The firmware upgrade task mentioned in the embodiments of the present application is a task for updating the version of the firmware in the server. The firmware in the server usually includes BIOS (Basic Input / Output System, basic input / output system), BMC (Baseboard Management Controller, baseboard management controller), network interface card firmware, CPLD (Complex Programmable Logic Device, complex programmable logic device), etc. Among them, BMC manages the interface between the platform hardware and the management system software, and ensures smooth communication between the two. In terms of function, BMC can not only monitor the key parameters of the server in real time, such as temperature, voltage, fan speed, and power state, etc., to realize accurate monitoring of the hardware; but also can perform remote management and control operations, such as remotely monitoring the running state of the server, and even remotely restarting when necessary, to ensure the stable operation of the server. Therefore, in order not to occupy additional server resources, the firmware upgrade task is implemented by the baseboard management controller in the embodiments of the present application.
[0085] The target cluster in the embodiment of the present application corresponds to one node for each baseboard management controller, the master node is the node of the best-performing baseboard management controller among at least one baseboard management controller in the target cluster, and the key information includes the idle memory capacity and the network transmission rate.
[0086] It should be noted that the master node mentioned in the embodiment of the present application is the node of the best-performing baseboard management controller among at least one baseboard management controller in the target cluster, so the data information of the baseboard management controller is collected first, and then the performance parameter information in the data information is used for judgment, and the specific steps include:
[0087] In the case of determining that the baseboard management controller in the target cluster is started, running the information collection device in the baseboard management controller;
[0088] Collecting the data information and the network address of the baseboard management controller in the target cluster according to the first preset period through the information collection device, wherein the data information includes the performance parameter information of the baseboard management controller;
[0089] Binding the network address and the data information belonging to the same baseboard management controller;
[0090] Selecting the master node and the slave node from at least one baseboard management controller in the target cluster through the performance parameter information.
[0091] The data information at least includes any one or more of the following: the chip model of the baseboard management controller, the central processing unit model, the central processing unit occupancy rate, the total memory capacity, the idle memory capacity, the buffer capacity, the first machine type information of the field replaceable unit, the network transmission rate, the real-time transmission rate of the management port network card, the network connectivity, and the bandwidth utilization rate, wherein the central processing unit occupancy rate, the idle memory capacity, the network transmission rate, the real-time transmission rate of the management port network card, the network connectivity, and the bandwidth utilization rate belong to the performance parameter information.
[0092] The information collection device is part of the baseboard management controller function, the first preset period is the period of collecting information by the baseboard management controller when no upgrade task is performed, which can be 5 minutes or 10 minutes, and the application does not make specific limitations, and the periodic reporting of data can ensure the real-time and accuracy of the data. In addition, because one baseboard management controller is usually arranged on one server, and one network address is arranged, the network address is used as the unique identity of the baseboard management controller, and the baseboard management controller with the best performance is selected as the master node from the cluster through the performance parameter information (there are many methods for screening, such as setting a weight for the performance parameter, then performing weighted summation on the performance parameter, and taking the baseboard management controller corresponding to the maximum value as the master node). Through these steps, the baseboard management controller in the target cluster can be effectively managed and optimized, and the efficient operation and reliability of the cluster can be ensured.
[0093] In step 102, the idle memory capacity and the network transmission rate are used to select the candidate network file system node and the non-candidate network file system node from at least one node in the target cluster.
[0094] The idle memory capacity and the network transmission rate in the embodiment of the application can increase the collection frequency when performing the firmware upgrade task, and the idle memory capacity and the network transmission rate can be used to score the node state in the target cluster, and the nodes are sorted according to the score, and the candidate network file system node and the non-candidate network file system node are selected according to the sorting result.
[0095] In step 103, the connectivity of the candidate network file system node is tested by the non-candidate network file system node.
[0096] After the candidate network file system node and the non-candidate network file system node are selected in the embodiment of the application, the non-candidate network file system node needs to be mounted to the candidate network file system node, which is realized by performing the connectivity test at this time. The task management device in the baseboard management controller issues an NFS (Network File System) server configuration task to the non-candidate network file system node, so that the non-candidate network file system node tests the connectivity with the candidate network file system node in turn. Usually, the child node (non-candidate network file system node) pings (network probes) the candidate network file system node, and obtains a network delay value each time. After the non-candidate network file system node calculates the average network delay value, the average network delay value is sent to the task management device, which is used for matching the final network file system node. The specific steps include:
[0097] Each non-candidate network file system node is sequentially tested for connectivity with each candidate network file system node according to a preset number of times;
[0098] obtaining a first network delay value of each connectivity test;
[0099] determining a target average network delay value of each non-candidate network file system node and each candidate network file system node within a preset number of times through the first network delay value.
[0100] The preset number of times can be set according to requirements, and can be set to 100, 150, etc., which is not specifically limited herein. Then the formula for obtaining the target average network delay value is as follows:
[0101] wherein, is the target average network delay value, t z is the first network delay value of the Zth connectivity test, and N is the preset number of times.
[0102] Step 104, determining a network file system configuration node from the candidate network file system nodes through the result of the connectivity test, and determining a mounting sub-node of the network file system configuration node from the non-candidate network file system nodes.
[0103] In the embodiment of the application, the non-candidate network file system nodes are sequentially tested for connectivity with the candidate network file system nodes, so each non-candidate network file system node has a connectivity test result for each candidate network file system node. The smallest second average network delay value of each non-candidate network file system node and the candidate network file system node is determined by pushing from the back to the front of the ranked list, the candidate network file system node corresponding to the second average network delay value is determined as a hit node, the non-candidate network file system node corresponding to the second average network delay value is determined as a mounting sub-node of the hit node, and the hit speed of the hit node is increased by 1. When the hit test of the candidate network file system node reaches a second preset value, it is considered that the candidate network file system node does not need to be hit any more. At this time, the candidate network file system node is determined as the network file system configuration node, and the mounting sub-node of the hit node is determined as the mounting sub-node of the network file system configuration node. The specific steps include:
[0104] determining the first average network delay value of each non-candidate network file system node and each candidate network file system node in order from the back to the front of the ranked list;
[0105] selecting the second average network delay value with the smallest value from the first average network delay value;
[0106] determining the candidate network file system node corresponding to the second average network delay value as a hit node, determining the non-candidate network file system node corresponding to the second average network delay value as a mounting sub-node of the hit node, and increasing the hit speed of the hit node by 1.
[0107] In the case where the hit speed of the hit node reaches the second preset value, the hit node is determined as the network file system configuration node, and the to-be-mounted sub-node of the hit node is determined as the mounted sub-node of the network file system configuration node.
[0108] The smaller the average network delay value is, the better the network connection of the non-alternative network file system node and the alternative network file system node is, so the second average network delay value with the smallest value is selected from the first average network delay values, and the reliability of the node is evaluated through the hit speed to ensure that the finally selected node can provide the best service quality.
[0109] To better understand this process, a specific example can be used for illustration. In the example, the alternative network file system nodes are A, B, C, D, E, and F, the non-alternative network file system nodes are C, D, E, and F, the ranking list is A, B, C, D, E, and F, the first average network delay value of F and A is 4 ms (milliseconds), the first average network delay value of E and A is 4 ms, and the first average network delay value of E and B is 6 ms. Because 4 < 5, the hit alternative network file system node of the F node is A, at this time, the hit speed of A is 1. Because 4 < 6, the hit alternative network file system node of the E node is A, at this time, the hit speed of A is 2. Assuming that the second preset value is 2, at this time, the hit speed of the A node reaches the second preset value, at this time, the A node is determined as the network file system configuration node, and the E and F nodes are determined as the mounted sub-nodes of the A node. The above steps are continued to judge the D and C nodes, at this time, the A node no longer participates in the hit.
[0110] Step 105, the target firmware upgrade file is copied from the master node to the network file system configuration node, and the target firmware upgrade file is copied from the network file system configuration node to the mounted sub-node.
[0111] In the embodiment of the application, after the nodes in the target cluster are judged, the firmware upgrade task is issued through the task management device in the baseboard management controller, at this time, the target firmware upgrade file is copied from the master node to the network file system configuration node, and the target firmware upgrade file is copied from the network file system configuration node to the mounted sub-node.
[0112] Step 106, the firmware upgrade task is executed through the target firmware upgrade file.
[0113] In the embodiment of the present application, when the firmware upgrade task is performed by the target firmware upgrade file, the timing of performing the task by different nodes is different. The mounting sub-node triggers the execution of the upgrade operation after determining that the target firmware upgrade file exists in the specified directory, and reports the execution progress and execution log of the task to the master node. After determining that the task of the mounting sub-node is completed, the control network file system configuration node starts to perform the upgrade operation. The specific steps include:
[0114] In the case where the target firmware upgrade file exists in the specified directory of the mounting sub-node, the mounting sub-node is triggered to perform the first firmware upgrade task by the target firmware upgrade file;
[0115] The upgrade progress and upgrade log of the first firmware upgrade task are obtained, and the upgrade progress and upgrade log are uploaded to the master node;
[0116] The upgrade state of the mounting sub-node is determined by the upgrade progress and upgrade log;
[0117] In the case where the upgrade state of the mounting sub-node is upgrade completed, the control network file system configuration node performs the second firmware upgrade task by the target firmware upgrade file.
[0118] In addition, after all firmware upgrade tasks are completed, it is further verified whether the firmware versions of the mounting sub-node and the network file system configuration node are correctly updated, and the temporary files and no longer needed upgrade files are cleaned up, to ensure the tidiness of the system. Through the above settings, the operation of the operation and maintenance personnel can be reduced, time can be saved, and physical strength can be saved.
[0119] In summary, the flow of the above firmware upgrade method is shown in FIG. 2. The master node and the sub-node in the target cluster are determined, and then the master node issues a firmware upgrade task by the built-in task management device. In the process of the firmware upgrade task, the network file system configuration node and the mounting sub-node mounted on the network file system configuration node are configured. After the setting is completed, the target firmware upgrade file is copied, and the firmware upgrade task is started to be performed and the upgrade progress and upgrade log of the firmware upgrade task are reported.
[0120] It should be noted that the devices built-in in the baseboard management controller include the task management device, the information collection device, the firmware upgrade device and the dynamic configuration device. Different devices have different functions. For example, as shown in FIG. 3, the control page of the baseboard management controller of the master node is used to manage the firmware upgrade task. The task management device is used to arrange the tasks in the cluster, including issuing the firmware upgrade task and the network file system configuration task. The information collection device is used to collect the basic information and the network information of the baseboard management controller. The upgrade device is used to upload the target firmware upgrade file, perform the firmware upgrade operation on the node, and report the upgrade progress and the upgrade log in real time. The dynamic configuration module is used to collect the information of the information collection device and perform scoring.
[0121] The firmware upgrade method provided in the embodiment of the application comprises the following steps: in response to a received firmware upgrade task, uploading a target firmware upgrade file and key information of at least one baseboard management controller in a target cluster to a master node, wherein each baseboard management controller corresponds to a node, the master node is a node where a baseboard management controller with the best performance in the at least one baseboard management controller in the target cluster is located, and the key information comprises an idle memory capacity and a network transmission rate; selecting a candidate network file system node and a non-candidate network file system node from the at least one node in the target cluster through the idle memory capacity and the network transmission rate; performing a connectivity test on the candidate network file system node through the non-candidate network file system node; determining a network file system configuration node from the candidate network file system node and a mounting sub-node of the network file system configuration node from the non-candidate network file system node according to a result of the connectivity test; copying the target firmware upgrade file from the master node to the network file system configuration node, and copying the target firmware upgrade file from the network file system configuration node to the mounting sub-node; and performing a firmware upgrade task through the target firmware upgrade file. In the embodiment, the baseboard management controllers in the target cluster are used to manage and run the firmware upgrade task, without the need of adding extra resources, thereby reducing the operation and maintenance cost. Moreover, the mounting sub-node enables the operation and maintenance personnel to not need to frequently operate the WEB page of the node, thereby saving the time and energy of the operation and maintenance personnel, and meanwhile, the problem of inconsistent firmware files in the cluster caused by the long-time focus on work is avoided, thereby realizing the stable operation of the cluster. In addition, the application further improves the monitoring frequency to more accurately track the real situation of the at least one baseboard management controller in the target cluster.
[0122] Referring to FIG. 4, a flow chart of step 105 in the firmware upgrade method provided in the embodiment of the application shown in FIG. 1 is shown. The method can comprise the following steps:
[0123] Step 1051, verifying the hash value of the first message digest algorithm version 5.
[0124] The firmware upgrade file header information is parsed when the upgrading task in the embodiment of the application is executed, and it is determined whether the target firmware upgrade file is applicable to the models in the target cluster. First, the firmware model information applicable to the servers of at least one baseboard management controller (BMC) in the target cluster is acquired, and the BMCs in the target cluster are divided according to the acquired firmware model information. The firmware model information applicable to the servers of the BMCs in each division area is consistent. This helps to ensure the hardware compatibility of the firmware upgrade file with the servers, and then the header information of the target firmware upgrade file is parsed to acquire second model information applicable to the target firmware to be upgraded. The second model information is compared with the previously acquired firmware model information, and according to the comparison result, a first division area to which the target firmware upgrade file is applicable and a second division area to which the target firmware upgrade file is not applicable are determined. This helps to ensure that only compatible servers are selected for firmware upgrade. The specific steps include:
[0125] Acquire the firmware model information applicable to the servers of at least one baseboard management controller in the target cluster;
[0126] Divide the at least one baseboard management controller in the target cluster by the firmware model information, wherein the firmware model information applicable to the servers of the baseboard management controllers in each division area is consistent;
[0127] Parse the header information of the target firmware upgrade file to acquire second model information applicable to the target firmware to be upgraded;
[0128] Compare the second model information with the firmware model information to determine a first division area to which the target firmware upgrade file is applicable and a second division area to which the target firmware upgrade file is not applicable.
[0129] It should be noted that only the baseboard management controllers in the first division area can perform firmware upgrade operation according to the target firmware upgrade file, so when the network file system configuration node is determined subsequently, the baseboard management controllers in the second division area can be selected preferentially because the servers corresponding to the baseboard management controllers in the second division area cannot be upgraded, so the servers are idle at this time, and the management space of the servers is better than that of the baseboard management controllers, so the servers in the second division area can be used for management, and the network connectivity is better. The specific steps include:
[0130] The servers corresponding to the baseboard management controllers in the second division area are selected as backup network file system nodes;
[0131] Acquire a first number of first network file system configuration nodes;
[0132] In a case where the first number is greater than one third of the number of nodes in the target cluster, the baseboard management controllers in the first division area are selected as non-backup network file system nodes.
[0133] determining the network file system configuration node from the alternative network file system nodes and determining a mounting sub-node of the network file system configuration node from the non-alternative network file system nodes, the network file system configuration node and the mounting sub-node being consistent in applicable firmware model information.
[0134] It should be noted that the parsed header information further includes a first message digest algorithm version 5 hash value, i.e., an MD5 value, which can be used to verify the integrity of the target firmware upgrade file.
[0135] At step 1052, if the first message digest algorithm version 5 hash value is consistent with the preset target message digest algorithm version 5 hash value, target firmware model information applicable to the network file system configuration node is obtained.
[0136] The preset target message digest algorithm version 5 hash value in the embodiment of the present application is an initial message digest algorithm version 5 hash value set when the target firmware upgrade file is generated. During file transmission, if the file is damaged, the corresponding message digest algorithm version 5 hash value will change. Therefore, by comparing the first message digest algorithm version 5 hash value with the preset target message digest algorithm version 5 hash value, it can be determined whether the target firmware upgrade file is complete at this time. If the first message digest algorithm version 5 hash value is consistent with the preset target message digest algorithm version 5 hash value, it indicates that the firmware upgrade file has not been tampered with, and the subsequent operation can continue. At this time, the target firmware model information applicable to the network file system configuration node will be obtained.
[0137] At step 1053, if the target firmware model information is consistent with the second model information, the target firmware upgrade file is copied from the master node to the network file system configuration node, and the target firmware upgrade file is copied from the network file system configuration node to the mounting sub-node.
[0138] In the embodiment of the present application, after the hash value verification is passed, the target firmware model information applicable to the network file system configuration node is obtained, and the target firmware model information is compared with the second model information. If the two are consistent, it indicates that the firmware upgrade file is applicable to the network file system configuration node.
[0139] At this time, the target firmware upgrade file is copied from the master node to the network file system configuration node. This can be done through a network transmission protocol (such as FTP, SFTP, HTTP, etc.) or directly through a network file system (NFS) share, and then the target firmware upgrade file is copied from the network file system configuration node to the mounting sub-node. Ensure that the firmware model information of the network file system configuration node and the mounting sub-node is consistent. In addition, during the firmware upgrade process, the upgrade progress and system status are monitored to ensure smooth upgrade, and after the upgrade is completed, the firmware version is verified to be correctly updated and the system is checked to be running normally.
[0140] The above steps avoid the problem of hardware damage or system instability caused by incompatibility, further ensuring the sequential performance of the firmware upgrade task.
[0141] Referring to FIG. 5, a flowchart of step 101 in a firmware upgrade method provided by the embodiment of the application shown in FIG. 1 is shown. The method can include:
[0142] Step 1011, a first weight of critical information is set for the firmware upgrade task, and a second weight of critical information is set for the non-firmware upgrade task.
[0143] In the embodiment of the application, the critical information frequency collected by the firmware upgrade task and the non-firmware upgrade task is inconsistent, so different weights are set to truly reflect the idle memory and network transmission rate data during file copying after mounting.
[0144] Step 1012, in response to the received firmware upgrade task, critical information of the baseboard management controller of at least one of the target cluster is collected according to a second preset period.
[0145] In the embodiment of the application, the information collection device of the baseboard management controller needs to collect data information of the baseboard management controller in real time, but the collection frequency set during the upgrade process and the non-upgrade process is inconsistent, which will increase the collection frequency during the upgrade process to more accurately track the real situation of the nodes in the target cluster.
[0146] Step 1013, the target firmware upgrade file and the critical information of the baseboard management controller of at least one of the target cluster are uploaded to the master node.
[0147] In the embodiment of the application, the critical information is collected and uploaded according to the second preset period, so there are multiple critical information in the master node. At this time, when the number of critical information is greater than a first preset value, the target idle memory capacity and the target network transmission rate can be calculated by the historical data, and then the calculated information is scored and sorted, and the specific steps include:
[0148] In a case that the number of the collected key information is greater than the first preset value, the three target key information closest to the current time are extracted;
[0149] The target idle memory capacity of each baseboard management controller in the target cluster is determined through the target key information and the target idle memory capacity formula, and the target network transmission rate of each baseboard management controller in the target cluster is determined through the target key information and the target network transmission rate formula;
[0150] Each baseboard management controller in the target cluster is scored through the target idle memory capacity and the target network transmission rate;
[0151] The target firmware upgrade file and the baseboard management controller of the target cluster are sorted in image according to the order from large to small of the scoring results.
[0152] Among them, because the three target key information closest to the current time are extracted, the first preset value is greater than 3, and the specific value is not limited herein. When the configuration module scores the model configuration in the cluster according to the data obtained by the information collection device and the task management device, the scoring rule is set as s=x+y (x: idle memory score value, y: network transmission rate score value, s: scoring result), wherein the value of the target idle memory capacity is determined as the idle memory score value, and the value of the target network transmission rate is determined as the network transmission rate score value.
[0153] Through the above steps, the performance state of each node in the target cluster can be determined more scientifically and accurately, and the selected network file system node and the non-selected network file system node can be determined according to the scoring and sorting results.
[0154] It should be noted that the target idle memory capacity formula is:
[0155] The target network transmission rate formula is:
[0156] Among them, r m is the target idle memory capacity, F max is the maximum idle memory capacity in the target key information, F mid is the intermediate idle memory capacity in the target key information, F min is the minimum idle memory capacity in the target key information, w1 is the first weight related to the key information, r n is the target network transmission rate, N max is the maximum network transmission rate in the target key information, N mid is the intermediate network transmission rate in the target key information, N min is the minimum network transmission rate in the target key information.
[0157] In addition, the embodiment of the application can collect the information of the idle memory and the network transmission rate in the whole upgrading process as a whole, and use the information as the calculation parameter for the next time of upgrading the NFS node. Taking the idle memory as an example, assuming that the collection times in the upgrading process are n, and the collected idle memory is x i ={x1,x2,x3,...,x n}(i∈(1,...,n), n is the collection times, and xi is the idle memory size collected once) take the collection as a whole, and the idle memory size in the whole upgrading process is the average value of all the collection points in the upgrading process:
[0158] wherein, is the average value of all the collection points in the upgrading process, n is the collection times, and xi is the idle memory size collected once. i is the idle memory size collected once.
[0159] In addition, in the copying and upgrading process, the larger the idle memory is, the better. When there is no upgrading task, the idle memory is 3 / 2 times the size of the firmware upgrading file, so as to ensure that in the subsequent upgrading process, the memory is not full, thereby affecting other businesses, so after collecting the key information, the key information needs to be adjusted.
[0160] Further, after the baseboard management controller obtains the scoring result, the baseboard management controller in the cluster is sorted according to the image according to the scoring result. Since the network file system service in the baseboard management controller generally supports 3 devices to be mounted at the same time in the network file system with the baseboard management controller as the node. Therefore, when selecting the network file system service node, the first third quantity of the sorting list is extracted as the network file system candidate node, and the corresponding node of the baseboard management controller ranked in the last two-thirds is determined as a non-candidate network file system node. The specific steps include:
[0161] generating a sorting list of at least one baseboard management controller in the target cluster through image sorting;
[0162] determining the nodes corresponding to the baseboard management controllers ranked in the first third quantity in the sorting list as candidate network file system nodes;
[0163] determining the nodes corresponding to the baseboard management controllers ranked in the last two-thirds in the sorting list as non-candidate network file system nodes.
[0164] Because the network file system with the substrate management controller as the node can support 3 devices to be mounted at the same time, if in the ideal state, one fourth of the nodes will be selected as the backup network file system node, but because the backup network file system node may have a problem of network disconnection, resulting in failure to mount, so the fault tolerance space is set to ensure that the mounting can be successfully completed.
[0165] Referring to FIG. 6, a flow chart of steps of another firmware upgrade method provided by the embodiment is shown, the method can include:
[0166] The target firmware upgrade file is uploaded to the master node, and then the target firmware upgrade file is parsed to obtain the second model information applicable to the target firmware to be upgraded, and the firmware model information applicable to the server corresponding to the substrate management controller in the target cluster, and the idle memory capacity and the network transmission rate of the substrate management controller, the idle memory capacity and the network transmission rate are scored, and the sorting result is sorted (quantitative cluster sorting), the backup network file system node and the non-backup network file system node are selected according to the sorting result, the connectivity of the backup network file system node is tested through the non-backup network file system node, the network file system configuration node is determined from the backup network file system node according to the connectivity test result, the network file system service of the network file system configuration node is started, the target firmware upgrade file is copied from the master node to the network file system configuration node, and the target firmware upgrade file is copied to the mounting sub-node through the network file system configuration node, the firmware upgrade task is executed through the target firmware upgrade file, and the upgrade progress and the upgrade log are reported until all nodes complete the upgrade.
[0167] Referring to FIG. 7, a structural schematic diagram of a firmware upgrade device provided by the embodiment is shown, as shown in FIG. 7, the device can include:
[0168] The first uploading module 201 is configured to upload the target firmware upgrade file and the key information of at least one substrate management controller in the target cluster to the master node in response to the received firmware upgrade task, wherein each substrate management controller corresponds to a node, the master node is a node where the substrate management controller with the best performance among the at least one substrate management controller in the target cluster is located, and the key information includes the idle memory capacity and the network transmission rate.
[0169] The first screening module 202 is configured to screen the backup network file system node and the non-backup network file system node from the at least one node in the target cluster through the idle memory capacity and the network transmission rate.
[0170] The test module 203 is configured to test the connectivity of the backup network file system node through the non-backup network file system node.
[0171] The first determining module 204 is configured to determine a network file system configuration node from the candidate network file system nodes according to the result of the connectivity test, and determine a mounting sub-node of the network file system configuration node from the non-candidate network file system nodes.
[0172] The file copying module 205 is configured to copy the target firmware upgrade file from the master node to the network file system configuration node, and copy the target firmware upgrade file from the network file system configuration node to the mounting sub-node.
[0173] The task executing module 206 is configured to execute a firmware upgrade task according to the target firmware upgrade file.
[0174] In some embodiments of the present application, the firmware upgrade device further comprises:
[0175] The running module is configured to run the information collecting device in the baseboard management controller when it is determined that the baseboard management controller in the target cluster is started.
[0176] The first collecting module is configured to collect data information and a network address of the baseboard management controller in the target cluster according to the first preset period by the information collecting device, wherein the data information comprises performance parameter information of the baseboard management controller.
[0177] The binding module is configured to bind the network address and the data information belonging to the same baseboard management controller.
[0178] The second screening module is configured to screen the master node and the sub-node from at least one baseboard management controller in the target cluster according to the performance parameter information.
[0179] In some embodiments of the present application, the data information comprises at least one or more of the following: a chip model of the baseboard management controller, a central processing unit model, a central processing unit occupancy rate, a total memory capacity, a free memory capacity, a buffer capacity, first model information of a field replaceable unit, a network transmission rate, a real-time transmission rate of a management port network card, network connectivity and bandwidth utilization, wherein the central processing unit occupancy rate, the free memory capacity, the network transmission rate, the real-time transmission rate of the management port network card, the network connectivity and the bandwidth utilization belong to the performance parameter information.
[0180] In some embodiments of the present application, the firmware upgrade device further comprises:
[0181] The first obtaining module is configured to obtain firmware model information applicable to a server corresponding to at least one baseboard management controller in the target cluster.
[0182] The dividing module is configured to divide the baseboard management controllers of at least one of the target clusters according to the firmware model information, wherein the baseboard management controllers in each divided area correspond to servers with consistent firmware model information.
[0183] The second obtaining module is configured to parse header information of the target firmware upgrade file to obtain second model information applicable to the target firmware to be upgraded.
[0184] The second determining module is configured to compare the second model information with the firmware model information to determine a first divided area to which the target firmware upgrade file is applicable and a second divided area to which the target firmware upgrade file is not applicable.
[0185] In some embodiments of the present application, the header information of the target firmware upgrade file further includes a hash value of the first message digest algorithm version 5.
[0186] The file copying module 205 specifically includes:
[0187] The first checking submodule is configured to check the hash value of the first message digest algorithm version 5.
[0188] The first obtaining submodule is configured to, if the hash value of the first message digest algorithm version 5 is consistent with a preset hash value of the target message digest algorithm version 5, obtain target firmware model information applicable to the network file system configuration node.
[0189] The copying submodule is configured to, if the target firmware model information is consistent with the second model information, copy the target firmware upgrade file from the master node to the network file system configuration node, and copy the target firmware upgrade file from the network file system configuration node to the mounting subnode, wherein the firmware model information applicable to the network file system configuration node and the mounting subnode is consistent.
[0190] In some embodiments of the present application, the task execution module 206 specifically includes:
[0191] The first task execution submodule is configured to, if it is determined that the target firmware upgrade file exists in the specified directory of the mounting subnode, trigger the mounting subnode to execute a first firmware upgrade task by using the target firmware upgrade file.
[0192] The second obtaining submodule is configured to obtain an upgrade progress and an upgrade log of the first firmware upgrade task, and upload the upgrade progress and the upgrade log to the master node.
[0193] The first determining submodule is configured to determine an upgrade state of the mounting subnode by using the upgrade progress and the upgrade log.
[0194] The second task execution submodule is configured to control the network file system configuration node to execute a second firmware upgrade task by using the target firmware upgrade file in a case where it is determined that the upgrade state of the mounting subnode is upgrade completed.
[0195] In some embodiments of the present application, the first uploading module 201 specifically includes:
[0196] The weight setting submodule is configured to pre-set a first weight of the key information for the firmware upgrade task and a second weight of the key information for the non-firmware upgrade task.
[0197] The first collection submodule is configured to collect the key information of the baseboard management controller of at least one of the target clusters according to a second preset period in response to the received firmware upgrade task.
[0198] The uploading submodule is configured to upload the target firmware upgrade file and the key information of the baseboard management controller of at least one of the target clusters to the master node.
[0199] In some embodiments of the present application, the firmware upgrade device further includes:
[0200] The extraction module is configured to extract the target key information for the last three times closest to the current time in a case where it is determined that the number of the collected key information is greater than a first preset value.
[0201] The third determination module is configured to determine the target idle memory capacity of each baseboard management controller in the target clusters by using a target idle memory capacity formula and the target key information, and determine the target network transmission rate of each baseboard management controller in the target clusters by using a target network transmission rate formula and the target key information.
[0202] The scoring module is configured to score each baseboard management controller in the target clusters by using the target idle memory capacity and the target network transmission rate.
[0203] The sorting module is configured to sort the target firmware upgrade file and the baseboard management controller of at least one of the target clusters in a mirroring manner according to the scoring results from large to small.
[0204] In some embodiments of the present application, the target idle memory capacity formula is:
[0205] The target network transmission rate formula is:
[0206] wherein, r m is the target idle memory capacity, F max is the maximum idle memory capacity in the target key information, F mid is the intermediate idle memory capacity in the target key information, and F minw1 is a first weight about the key information, r n N is a target network transmission rate max N is a target network transmission maximum rate in the target key information mid N is a target network transmission intermediate rate in the target key information min N is a target network transmission minimum rate in the target key information.
[0207] In some embodiments of the present application, the firmware upgrade device further comprises:
[0208] The generating module is configured to generate an ordering list of the baseboard management controllers of the at least one of the target clusters by mirror ordering.
[0209] The fourth determining module is configured to determine the nodes corresponding to the baseboard management controllers ranked in the top one-third quantity in the ordering list as candidate network file system nodes.
[0210] The fifth determining module is configured to determine the nodes corresponding to the baseboard management controllers ranked in the last two-thirds quantity in the ordering list as non-candidate network file system nodes.
[0211] In some embodiments of the present application, the testing module 203 specifically comprises:
[0212] The testing submodule is configured to sequentially perform connectivity tests on each non-candidate network file system node and each candidate network file system node according to a preset number of times.
[0213] The third obtaining submodule is configured to obtain a first network delay value of each connectivity test.
[0214] The second determining submodule is configured to determine a target average network delay value of each non-candidate network file system node and each candidate network file system node within the preset number of times by the first network delay value.
[0215] The first determining module 204 specifically comprises:
[0216] The third determining submodule is configured to sequentially determine the first average network delay value of each non-candidate network file system node and each candidate network file system node according to the order from back to front in the ordering list.
[0217] The selecting submodule is configured to select a second average network delay value with the smallest value from the first average network delay values.
[0218] The fourth determining submodule is configured to determine the candidate network file system node corresponding to the second average network delay value as a hit node, determine the non-candidate network file system node corresponding to the second average network delay value as a to-be-mounted subnode of the hit node, and increase the hit speed of the hit node by 1.
[0219] The fifth determining sub-module is configured to determine the hit node as the network file system configuration node and determine the to-be-mounted sub-node of the hit node as the mounted sub-node of the network file system configuration node when the hit speed of the hit node reaches the second preset value.
[0220] The embodiment of the present application provides a firmware upgrade method, in response to a received firmware upgrade task, uploading target firmware upgrade files and key information of at least one baseboard management controller in a target cluster to a master node, wherein each baseboard management controller corresponds to a node, the master node is a node where a baseboard management controller with the best performance in the at least one baseboard management controller in the target cluster, the key information includes an idle memory capacity and a network transmission rate; selecting an optional network file system node and a non-optional network file system node from the at least one node in the target cluster through the idle memory capacity and the network transmission rate; performing a connectivity test on the optional network file system node through the non-optional network file system node; determining a network file system configuration node from the optional network file system node and determining a mounted sub-node of the network file system configuration node from the non-optional network file system node through a result of the connectivity test; copying the target firmware upgrade files from the master node to the network file system configuration node, and copying the target firmware upgrade files to the mounted sub-node through the network file system configuration node; and performing a firmware upgrade task through the target firmware upgrade files. In the embodiment, the baseboard management controller in the target cluster is used to manage and run the firmware upgrade task, without the need of adding additional resources, thereby reducing operation and maintenance costs, and through the mounted sub-node, an operation and maintenance personnel does not need to frequently operate a WEB page of a node, thereby saving time and energy of the operation and maintenance personnel, and at the same time, the problem of inconsistent cluster firmware files caused by frequent operation due to long-time focus on work is avoided, thereby realizing stable operation of the cluster. In addition, the present application further improves the monitoring frequency to more accurately track the real situation of the at least one baseboard management controller in the target cluster.
[0221] Based on the same inventive concept, another embodiment of the present application provides an electronic device 300, as shown in FIG. 8. FIG. 8 is a schematic diagram of an electronic device according to an embodiment of the present application. The electronic device comprises a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301, and the computer program implements the steps in the firmware upgrade method of any of the above embodiments of the present application when executed by the processor.
[0222] Based on the same inventive concept, another embodiment of the present application provides a computer non-volatile readable storage medium, and the computer non-volatile readable storage medium stores a computer program, and the computer program implements the steps in the firmware upgrade method of any of the above embodiments of the present application when executed by a processor.
[0223] Based on the same inventive concept, another embodiment of the present application provides a computer program product comprising computer programs / instructions which, when executed by a processor, implement the steps in the firmware upgrade method of any of the above embodiments of the present application.
[0224] It should be noted that, in the present document, the terms "comprising", "containing" or any other similar term are intended to encompass non-exclusive inclusion, such that processes, methods, articles or apparatuses that comprise a list of elements are not limited to those elements, but can also include other elements not expressly listed, or other elements inherent in such processes, methods, articles or apparatuses. Without more limitations, the element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0225] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and necessary general hardware platforms, of course, they can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for making a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the methods of various embodiments of the present application.
[0226] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above specific embodiments, which are only illustrative and not restrictive, and those of ordinary skill in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope of protection of the claims.
[0227] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in the embodiments of the present application can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solutions. Those of ordinary skill in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0228] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the system, device and unit described above can refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0229] In the embodiments provided in the present application, it should be understood that the disclosed system and method can be implemented in other manners. For example, the system embodiments described above are merely schematic; the division of the units is only a logical function division; there can be another division manner in actual implementation; for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.
[0230] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. In actual implementation, some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments.
[0231] In addition, each functional unit in the embodiments of the present application can be integrated in one processing unit, or each unit can exist physically as separate units, or two or more units can be integrated in one unit.
[0232] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the related art, or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the embodiments of the present application. The foregoing storage medium includes: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, and various media that can store program codes.
[0233] The above is merely specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A firmware upgrade method characterized by comprising: The method comprises: in response to the received firmware upgrade task, uploading target firmware upgrade file and key information of at least one baseboard management controller in the target cluster to a master node, wherein each baseboard management controller corresponds to a node, the master node is a node where a baseboard management controller with the best performance among the baseboard management controllers of at least one node in the target cluster is located, and the key information comprises free memory capacity and network transmission rate; selecting a candidate network file system node and a non-candidate network file system node from at least one node in the target cluster through the free memory capacity and the network transmission rate; performing connectivity test on the candidate network file system node through the non-candidate network file system node; determining a network file system configuration node from the candidate network file system node and a mounting sub-node of the network file system configuration node from the non-candidate network file system node according to the result of the connectivity test; copying the target firmware upgrade file from the master node to the network file system configuration node, and copying the target firmware upgrade file from the network file system configuration node to the mounting sub-node; performing the firmware upgrade task through the target firmware upgrade file.
2. The firmware upgrade method according to claim 1, wherein Before the step of uploading the target firmware upgrade file and the key information of at least one baseboard management controller in the target cluster to the master node in response to the received firmware upgrade task, the method further comprises: running an information acquisition device in the baseboard management controller when it is determined that the baseboard management controller is started; acquiring data information and a network address of the baseboard management controller in the target cluster through the information acquisition device according to a first preset period, wherein the data information comprises performance parameter information of the baseboard management controller; binding the network address and the data information belonging to the same baseboard management controller; selecting a master node and a sub-node from at least one baseboard management controller in the target cluster through the performance parameter information.
3. The firmware upgrade method of claim 2, wherein, The data information comprises at least one or more of the following: chip model of the baseboard management controller, central processing unit model, central processing unit occupancy rate, total memory capacity, free memory capacity, buffer capacity, first machine type information of the field replaceable unit, network transmission rate, real-time transmission rate of the management port network card, network connectivity, and bandwidth utilization rate, wherein the central processing unit occupancy rate, the free memory capacity, the network transmission rate, the real-time transmission rate of the management port network card, the network connectivity, and the bandwidth utilization rate belong to the performance parameter information.
4. The firmware upgrade method according to claim 3, wherein, The master node is a node where the baseboard management controller corresponding to the maximum value in the weighted sum result is located after weight allocation and weighted summation are performed on the performance parameter information of at least one baseboard management controller in the target cluster.
5. The firmware upgrade method of claim 1, wherein, After the step of uploading the target firmware upgrade file and the key information of at least one baseboard management controller in the target cluster to the master node in response to the received firmware upgrade task, the method further comprises: acquiring firmware machine type information suitable for a server corresponding to at least one baseboard management controller in the target cluster; Dividing the baseboard management controllers of at least one of the target clusters according to the firmware model information, wherein the baseboard management controllers in each division area correspond to servers with consistent firmware model information; Analyzing the header information of the target firmware upgrade file to obtain second model information applicable to the target firmware to be upgraded; Comparing the second model information with the firmware model information to determine a first division area applicable to the target firmware upgrade file and a second division area not applicable to the target firmware upgrade file.
6. The firmware upgrade method according to claim 5, wherein, The method further comprises: Taking the servers corresponding to the baseboard management controllers in the second division area as the alternative network file system nodes; Obtaining a first number of the first network file system configuration nodes; In a case where the first number is greater than one third of the number of nodes in the target cluster, taking the baseboard management controllers in the first division area as the non-alternative network file system nodes.
7. The firmware upgrade method of claim 1, wherein, The header information of the target firmware upgrade file further comprises a hash value of the first message digest algorithm version 5; The copying of the target firmware upgrade file from the master node to the network file system configuration nodes and the mounting of the target firmware upgrade file to the mounting sub-nodes through the network file system configuration nodes comprises: Verifying the hash value of the first message digest algorithm version 5; If the hash value of the first message digest algorithm version 5 is consistent with a preset target hash value of the fifth version of the target message digest algorithm, obtaining target firmware model information applicable to the network file system configuration nodes; If the target firmware model information is consistent with the second model information, copying the target firmware upgrade file from the master node to the network file system configuration nodes and mounting the target firmware upgrade file to the mounting sub-nodes through the network file system configuration nodes, wherein the firmware model information applicable to the network file system configuration nodes and the mounting sub-nodes is consistent.
8. The firmware upgrade method of claim 7, wherein, Copying the target firmware upgrade file from the master node to the network file system configuration nodes through a network transmission protocol or through a network file system sharing.
9. The firmware upgrade method of claim 1, wherein, The execution of the firmware upgrade task through the target firmware upgrade file comprises: In a case where the target firmware upgrade file exists in a specified directory of the mounting sub-node, triggering the mounting sub-node to execute a first firmware upgrade task through the target firmware upgrade file; Obtaining an upgrade progress and an upgrade log of the first firmware upgrade task and uploading the upgrade progress and the upgrade log to the master node; Determining an upgrade state of the mounting sub-node through the upgrade progress and the upgrade log; In a case where the upgrade state of the mounting sub-node is determined to be upgrade completed, controlling the network file system configuration nodes to execute a second firmware upgrade task through the target firmware upgrade file.
10. The firmware upgrade method of claim 9, wherein, The method further comprises: After the completion of the first firmware upgrade task and the second firmware upgrade task, verifying whether the firmware versions of the mounting sub-nodes and the network file system configuration nodes are correctly updated, and cleaning up temporary files and upgrade files.
11. The firmware upgrade method of claim 1, wherein, The step of responding to the received firmware upgrade task by uploading the target firmware upgrade file and key information of at least one baseboard management controller in the target cluster to the master node also includes: A first weight is pre-set for the key information in firmware upgrade tasks, and a second weight is set for the key information in non-firmware upgrade tasks. In response to the received firmware upgrade task, key information of at least one baseboard management controller in the target cluster is collected according to the second preset cycle. Upload the target firmware upgrade file and key information of at least one baseboard management controller in the target cluster to the master node.
12. The firmware upgrade method of claim 11, wherein, After uploading the target firmware upgrade file and key information of at least one baseboard management controller in the target cluster to the master node, the process further includes: If the amount of key information collected is greater than a first preset value, extract the three most recent key information about the target at the current time. The target free memory capacity of each baseboard management controller in the target cluster is determined by using target key information and target free memory capacity formula, and the target network transmission rate of each baseboard management controller in the target cluster is determined by using target key information and target network transmission rate formula. Each baseboard management controller in the target cluster is scored based on the target free memory capacity and the target network transmission rate. The target firmware upgrade file and at least one baseboard management controller in the target cluster are mirrored and sorted according to the scoring results from largest to smallest.
13. The firmware upgrade method of claim 12, wherein, The method further includes: The candidate network file system nodes and the non-candidate network file system nodes are selected based on the sorting results.
14. The firmware upgrade method of claim 12, wherein, The target free memory capacity formula is: The target network transmission rate formula is: wherein r m is the target free memory capacity, F max is the target maximum free memory capacity in the target critical information, F mid is the target intermediate free memory capacity in the target critical information, F min is the target minimum free memory capacity in the target critical information, w1 is a first weight with respect to the critical information, r n is the target network transmission rate, N max is the target maximum network transmission rate in the target critical information, N mid is the target intermediate network transmission rate in the target critical information, N min is the target minimum network transmission rate in the target critical information.
15. The firmware upgrade method of claim 12, wherein, After mirroring and sorting the target firmware upgrade file and at least one baseboard management controller in the target cluster according to the scoring results from largest to smallest, the process further includes: Generate a sorted list of at least one baseboard management controller in the target cluster by mirror sorting; The nodes corresponding to the top third of the baseboard management controllers in the sorted list are identified as candidate network file system nodes. The nodes corresponding to the bottom two-thirds of the baseboard management controllers in the sorted list are identified as non-candidate network file system nodes.
16. The firmware upgrade method of claim 1, wherein, The connectivity test of the candidate network file system nodes through the non-candidate network file system nodes includes: Each of the non-candidate network file system nodes is sequentially connected to each of the candidate network file system nodes for a preset number of connectivity tests. Obtain the first network latency value for each connectivity test; The target average network latency value between each non-candidate network file system node and each candidate network file system node within a preset number of times is determined by the first network latency value.
17. The firmware upgrade method of claim 11, wherein, The process of determining the network file system configuration node from the candidate network file system nodes based on the connectivity test results, and determining the mountable child nodes of the network file system configuration node from the non-candidate network file system nodes, includes: The first average network latency value of the non-candidate network file system nodes and each of the candidate network file system nodes is determined sequentially from back to front according to the sorted list. selecting a second average network delay value with the smallest value from the first average network delay values; determining the alternative network file system node corresponding to the second average network delay value as a hit node, determining the non-alternative network file system node corresponding to the second average network delay value as a to-be-mounted child node of the hit node, and adding 1 to the hit speed test of the hit node; in a case where the hit speed test of the hit node reaches a second preset value, determining the hit node as a network file system configuration node, and determining the to-be-mounted child node of the hit node as a mounted child node of the network file system configuration node.
18. An electronic device, comprising: comprising: a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implements the steps in the firmware upgrade method according to any one of claims 1 to 17.
19. A computer non-volatile readable storage medium characterized in that, The computer program is stored on the computer non-volatile readable storage medium, and the computer program, when executed by the processor, implements the steps in the firmware upgrade method according to any one of claims 1 to 17.
20. A computer program product comprising computer programs / instructions, characterized in that, The computer program / instruction is executed by the processor to implement the steps in the firmware upgrade method according to any one of claims 1 to 17.
Citation Information
Patent Citations
Method, device and controlled terminal for batch refreshing of server node firmware
CN109254780A
Customized cluster configuration method and system, terminal and storage medium
CN113076111A
Wireless mesh network upgrading method and device, main node and storage medium
CN114286366A
Firmware upgrading method, electronic equipment, storage medium and product
CN118394387A