A firmware upgrade method, electronic device, storage medium and product

By filtering the master nodes and network file system nodes in the server cluster, centralized management and automation of firmware upgrades are achieved, which solves the time-consuming and labor-intensive problem of firmware upgrades for multiple devices, reduces operation and maintenance costs, and improves cluster stability and monitoring. frequency.

CN118394387BActive Publication Date: 2024-10-22INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410833570.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-10-22
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

In the existing technology, firmware upgrades for multiple devices require logging in and manually uploading them one by one, which is time-consuming, laborious, and costly, making it difficult to meet the operation and maintenance needs of smaller server rooms.

Method used

By selecting the baseboard management controller with the best performance in the target cluster as the master node, using free memory capacity and network transmission rate to select candidate and non-candidate network file system nodes, conducting connectivity tests, copying and executing the firmware upgrade file , to achieve centralized management and automated upgrades.

Benefits of technology

It reduces operation and maintenance costs, saves the time and energy of operation and maintenance personnel, avoids the problem of inconsistent cluster firmware files caused by misoperations caused by long-term concentrated work, achieves stable operation of the cluster, and improves baseboard management control. The monitoring frequency of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118394387B_ABST
    Figure CN118394387B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a firmware upgrade method, electronic device, storage medium and product, which relates to the field of computer technology. The method includes: in response to a received firmware upgrade task, uploading a target firmware upgrade file and key information of a baseboard management controller in a target cluster to a master node; screening out candidate network file system nodes and non-candidate network file system nodes for connectivity testing; determining a network file system configuration node from the candidate network file system nodes through the results of the connectivity test, and determining a mount subnode of the network file system configuration node from the non-candidate network file system nodes; copying the target firmware upgrade file from the master node to the network file system configuration node, and copying the target firmware upgrade file to the mount subnode through the network file system configuration node, and executing the firmware upgrade task. This embodiment saves time and energy of operation and maintenance personnel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a firmware upgrade method, electronic equipment, storage medium and product. Background Art

[0002] 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, thereby efficiently managing the servers in the entire room. However, for a smaller room with only 5 to 30 servers, if a separate machine is configured for virtualization services, it will undoubtedly increase the cost investment, which is obviously unacceptable to many customers.

[0003] BMC (Baseboard Management Controller) is a dedicated microcontroller embedded in the server motherboard, which is the core of the server out-of-band management. It shoulders the heavy responsibility of managing the interface between the management system software and the platform hardware to ensure smooth communication between the two. In terms of functions, BMC has demonstrated its 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 hardware monitoring; it can also perform remote management and control operations, such as remotely monitoring the operating status of the server, and even remotely restarting when necessary to ensure the stable operation of the server. Therefore, through the 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 users perform firmware upgrade operations, they can upgrade the firmware by logging into the BMC management page.

[0004] However, when faced with multiple devices, 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 upgrade of each device, which is time-consuming and labor-intensive. Summary of the invention

[0005] The embodiments of the present invention provide a firmware upgrade method, electronic device, storage medium and product to solve the problem that the current firmware upgrade is high in cost and time-consuming and labor-intensive. The specific technical solution is as follows:

[0006] A first aspect of an embodiment of the present invention provides a firmware upgrade method, the method comprising:

[0007] In response to the received firmware upgrade task, uploading the target firmware upgrade file and key information of at least one baseboard management controller in the target cluster to the master node, wherein each baseboard management controller corresponds to a node, and the master node is the node where the baseboard management controller with the best performance among the at least one baseboard management controller in the target cluster is located, and the key information includes free memory capacity and network transmission rate;

[0008] Filtering out candidate network file system nodes and non-candidate network file system nodes from at least one node in the target cluster according to the free memory capacity and the network transmission rate;

[0009] Performing a connectivity test on the candidate network file system node through the non-candidate network file system node;

[0010] Determine a network file system configuration node from the candidate network file system nodes based on the result of the connectivity test, and determine a mount subnode of the network file system configuration node from the non-candidate network file system nodes;

[0011] Copying the target firmware upgrade file from the master node to the network file system configuration node, and copying the target firmware upgrade file to the mount subnode through the network file system configuration node;

[0012] The firmware upgrade task is executed through the target firmware upgrade file.

[0013] Optionally, before uploading the target firmware upgrade file and 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 includes:

[0014] When determining that a baseboard management controller in the target cluster is started, running an information collection device in the baseboard management controller;

[0015] Collecting data information and network addresses of baseboard management controllers in the target cluster through the information collection device according to a first preset period, wherein the data information includes performance parameter information of the baseboard management controllers;

[0016] Binding the network address and the data information belonging to the same baseboard management controller;

[0017] The master node and the child node are screened out from at least one baseboard management controller in the target cluster according to the performance parameter information.

[0018] Optionally, the data information includes at least one or more of the following: chip model of the baseboard management controller, CPU model, CPU occupancy, total memory capacity, free memory capacity, buffer capacity, first model information of the field replaceable unit, network transmission rate, real-time transmission rate of the management port network card, network connectivity and bandwidth utilization, among which CPU occupancy, free memory capacity, network transmission rate, real-time transmission rate of the management port network card, network connectivity and bandwidth utilization belong to performance parameter information.

[0019] Optionally, 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 in response to the received firmware upgrade task, the method further includes:

[0020] Obtaining firmware model information applicable to a server corresponding to at least one baseboard management controller in the target cluster;

[0021] Dividing at least one baseboard management controller in the target cluster according to the firmware model information, wherein the firmware model information applicable to the server corresponding to the baseboard management controller in each divided area is consistent;

[0022] Parsing the header information of the target firmware upgrade file to obtain the second model information applicable to the target firmware to be upgraded;

[0023] The second model information is compared with the firmware model information to determine a first partition area to which the target firmware upgrade file is applicable and a second partition area to which the target firmware upgrade file is not applicable.

[0024] Optionally, the header information of the target firmware upgrade file further includes: a hash value of the fifth version of the first message digest algorithm;

[0025] The step of copying the target firmware upgrade file from the master node to the network file system configuration node, and copying the target firmware upgrade file to the mount sub-node through the network file system configuration node, comprises:

[0026] Verifying the hash value of the fifth version of the first message digest algorithm;

[0027] If the hash value of the first message digest algorithm version 5 is consistent with the hash value of the preset target message digest algorithm version 5, then obtaining target firmware model information applicable to the network file system configuration node;

[0028] 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 to the mount sub-node through the network file system configuration node, and the firmware model information applicable to the network file system configuration node and the mount sub-node is consistent.

[0029] Optionally, executing the firmware upgrade task through the target firmware upgrade file includes:

[0030] When it is determined that the target firmware upgrade file exists in the designated directory of the mount subnode, triggering the mount subnode to execute the first firmware upgrade task through the target firmware upgrade file;

[0031] Obtaining the upgrade progress and upgrade log of the first firmware upgrade task, and uploading the upgrade progress and the upgrade log to the master node;

[0032] Determine the upgrade status of the mounted subnode according to the upgrade progress and upgrade log;

[0033] When it is determined that the upgrade status of the mount subnode is upgrade completed, the network file system configuration node is controlled to execute the second firmware upgrade task through the target firmware upgrade file.

[0034] Optionally, in response to the received firmware upgrade task, uploading the target firmware upgrade file and key information of at least one baseboard management controller in the target cluster to the master node further includes:

[0035] Pre-setting a first weight about the key information for a firmware upgrade task, and pre-setting a second weight about the key information for a non-firmware upgrade task;

[0036] In response to the received firmware upgrade task, collecting key information of at least one baseboard management controller in the target cluster according to a second preset period;

[0037] The target firmware upgrade file and key information of at least one baseboard management controller in the target cluster are uploaded to the master node.

[0038] Optionally, 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 method further includes:

[0039] When it is determined that the amount of key information collected is greater than the first preset value, extracting the three target key information closest to the current moment;

[0040] Determine the target free memory capacity of each baseboard management controller in the target cluster by using the target key information and the target free memory capacity formula, and determine the target network transmission rate of each baseboard management controller in the target cluster by using the target key information and the target network transmission rate formula;

[0041] Scoring each baseboard management controller in the target cluster according to the target free memory capacity and the target network transmission rate;

[0042] The target firmware upgrade file and at least one baseboard management controller in the target cluster are mirrored in descending order according to the scoring results.

[0043] Optionally, the target free memory capacity formula is:

[0044]

[0045] The target network transmission rate formula is:

[0046]

[0047] in, is the target free memory capacity, The maximum capacity of free memory in the target key information. is the intermediate capacity of free memory in the target key information, is the minimum free memory capacity of the target key information, is the first weight of the key information, is the target network transmission rate, is the maximum network transmission rate of the target key information, is the median rate of network transmission in the target key information, It is the minimum network transmission rate of target key information.

[0048] Optionally, after mirroring the target firmware upgrade file and at least one baseboard management controller in the target cluster in descending order of the scoring results, the method further includes:

[0049] Generating a sorted list of at least one baseboard management controller in the target cluster by image sorting;

[0050] Determine nodes corresponding to the baseboard management controllers ranked in the first third of the sorted list as candidate network file system nodes;

[0051] The nodes corresponding to the baseboard management controllers ranked in the last two thirds in the sorted list are determined as non-candidate network file system nodes.

[0052] Optionally, the performing connectivity test on the candidate network file system node through the non-candidate network file system node includes:

[0053] Performing connectivity tests on each of the non-candidate network file system nodes and each of the candidate network file system nodes in turn for a preset number of times;

[0054] Obtain the first network delay value of each connectivity test;

[0055] The target average network delay value between each of the non-candidate network file system nodes and each of the candidate network file system nodes within a preset number of times is determined by using the first network delay value.

[0056] Optionally, the determining of a network file system configuration node from the candidate network file system nodes and a mount subnode of the network file system configuration node from the non-candidate network file system nodes based on the result of the connectivity test includes:

[0057] Determine the first average network delay value between the non-candidate network file system node and each of the candidate network file system nodes in order from the back to the front of the sorted list;

[0058] Select a second average network delay value with the smallest value from the first average network delay values;

[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 to-be-mounted child node of the hit node, and increase the hit speed measurement of the hit node by 1;

[0060] When it is determined that the hit test speed of the hit node reaches a second preset value, the hit node is determined as a network file system configuration node, and the to-be-mounted child node of the hit node is determined as a mounted child node of the network file system configuration node.

[0061] A second aspect of an embodiment of the present invention provides a firmware upgrade device, the device comprising:

[0062] A first uploading module is used to upload a target firmware upgrade file and key information of at least one baseboard management controller in a target cluster to a master node in response to a received firmware upgrade task, wherein each baseboard management controller corresponds to a node, and the master node is a node where a baseboard management controller with the best performance among at least one baseboard management controller in the target cluster is located, and the key information includes free memory capacity and network transmission rate;

[0063] A first screening module, used for screening out candidate network file system nodes and non-candidate network file system nodes from at least one node in the target cluster according to the free memory capacity and the network transmission rate;

[0064] A testing module, used for performing a connectivity test on the candidate network file system node through the non-candidate network file system node;

[0065] A first determination module is used to determine a network file system configuration node from the candidate network file system nodes according to the result of the connectivity test, and to determine a mount subnode of the network file system configuration node from the non-candidate network file system nodes;

[0066] A file copying module, used 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 to the mount sub-node through the network file system configuration node;

[0067] A task execution module is used to execute the firmware upgrade task through the target firmware upgrade file.

[0068] A third aspect of an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the firmware upgrade method as described in the first aspect of the embodiment of the present invention.

[0069] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the firmware upgrade method described in the first aspect of the embodiment of the present invention are implemented.

[0070] A fifth aspect of an embodiment of the present invention provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the firmware upgrade method as described in the first aspect of the embodiment of the present invention.

[0071] A firmware upgrade method provided by an embodiment of the present invention, in response to a received firmware upgrade task, uploads 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 the node where the baseboard management controller with the best performance among at least one baseboard management controller in the target cluster is located, and the key information includes free memory capacity and network transmission rate; selects alternative network file system nodes and non-alternative network file system nodes from at least one node in the target cluster through free memory capacity and network transmission rate; performs connectivity test on the alternative network file system nodes through the non-alternative network file system nodes; determines a network file system configuration node from the alternative network file system node through the result of the connectivity test, and determines a mount subnode of the network file system configuration node from the non-alternative network file system node; copies the target firmware upgrade file from the master node to the network file system configuration node, and copies the target firmware upgrade file to the mount subnode through the network file system configuration node; and executes the firmware upgrade task through the target firmware upgrade file. In this embodiment, the baseboard management controller in the target cluster is used to manage and run the firmware upgrade task, without adding additional resources, reducing the operation and maintenance costs, and by mounting the subnode, the operation and maintenance personnel do not need to frequently operate the node's WEB page, saving the time and energy of the operation and maintenance personnel, and at the same time, there will be no problem of inconsistent cluster firmware files caused by misoperation due to long-term focus on work, thus achieving stable operation of the cluster. In addition, the present application also tracks the actual situation of at least one baseboard management controller in the target cluster more accurately by increasing the monitoring frequency. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0073] Figure 1 is a flowchart of a firmware upgrade method according to an embodiment of the present invention;

[0074] Figure 2 yes Figure 1 A flowchart of another firmware upgrade method according to an embodiment of the present invention is shown;

[0075] Figure 3 yes Figure 1 A schematic diagram of the structure of a baseboard management controller in a firmware upgrade method shown in one embodiment of the present invention;

[0076] Figure 4 yes Figure 1 The flowchart of step 105 in a firmware upgrade method shown in one embodiment of the present invention;

[0077] Figure 5 yes Figure 1 The flowchart of step 101 in a firmware upgrade method shown in one embodiment of the present invention;

[0078] Figure 6 is a flowchart of another firmware upgrade method according to an embodiment of the present invention;

[0079] Figure 7 is a structural block diagram of a firmware upgrade device provided by an embodiment of the present invention;

[0080] Figure 8 It is a schematic diagram of an electronic device shown in an embodiment of the present invention. DETAILED DESCRIPTION

[0081] To make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented. The division of the following embodiments is for the convenience of description, and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other without contradiction.

[0082] Reference Figure 1 , shows a flowchart of the steps of a firmware upgrade method provided by an embodiment of the present invention, the method may include:

[0083] Step 101 : 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.

[0084] The firmware upgrade task mentioned in the embodiment of the present invention is a task for updating the version of the firmware in the server. Usually, the firmware in the server includes BIOS (Basic Input / Output System), BMC (Baseboard Management Controller), network interface card firmware, CPLD (Complex Programmable Logic Device), etc. Among them, the BMC management platform hardware and the management system software interface to ensure 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 status, etc., to achieve accurate monitoring of the hardware; it can also perform remote management and control operations, such as remote monitoring of the server's operating status, and even remote restart when necessary to ensure the stable operation of the server. Therefore, in order not to occupy additional server resources, the embodiment of the present invention implements the firmware upgrade task through the baseboard management controller.

[0085] In the embodiment of the present invention, each baseboard management controller in the target cluster corresponds to a node, the master node is the node where the baseboard management controller with the best performance among at least one baseboard management controller in the target cluster is located, and the key information includes free memory capacity and network transmission rate.

[0086] It should be noted that the master node mentioned in the embodiment of the present invention is the node where the baseboard management controller with the best performance is located among at least one baseboard management controller in the target cluster. Therefore, data information of the baseboard management controller is first collected, and then judgment is made based on performance parameter information in the data information. The specific steps include:

[0087] When determining that the baseboard management controller in the target cluster is started, running the information collection device in the baseboard management controller;

[0088] Collecting data information and network addresses of baseboard management controllers in the target cluster through an information collection device according to a first preset period, wherein the data information includes performance parameter information of the baseboard management controllers;

[0089] Bind the network address and data information belonging to the same baseboard management controller;

[0090] The master node and the child node are selected from at least one baseboard management controller in the target cluster according to the performance parameter information.

[0091] Among them, the data information includes at least one or more of the following: chip model of the baseboard management controller, CPU model, CPU occupancy, total memory capacity, free memory capacity, buffer capacity, first model information of the field replaceable unit, network transmission rate, real-time transmission rate of the management port network card, network connectivity and bandwidth utilization, among which, CPU occupancy, free memory capacity, network transmission rate, real-time transmission rate of the management port network card, network connectivity and bandwidth utilization belong to performance parameter information.

[0092] The above-mentioned information collection device is part of the function of the baseboard management controller. The first preset period is the period for the baseboard management controller to collect information when no upgrade task is performed. This time can be 5 minutes or 10 minutes. The present invention does not make specific limitations here. Periodic reporting of data can ensure the real-time and accuracy of the data. In addition, because a baseboard management controller and a network address are usually set on a server, 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 from the cluster as the main node through the performance parameter information (there are many methods for selection, such as setting weights for performance parameters, and then weighted summing the performance parameters, and taking the baseboard management controller corresponding to the maximum value as the main node). Through these steps, the baseboard management controller in the target cluster can be effectively managed and optimized to ensure the efficient operation and reliability of the cluster.

[0093] Step 102: select candidate network file system nodes and non-candidate network file system nodes from at least one node in the target cluster according to free memory capacity and network transmission rate.

[0094] The free memory capacity and network transmission rate in the embodiment of the present invention will increase the collection frequency when performing firmware upgrade tasks, and the free memory capacity and network transmission rate can be used to score the node status in the target cluster, and the nodes can be sorted according to the scores, and the alternative network file system nodes and non-alternative network file system nodes can be selected according to the sorting results.

[0095] Step 103: Perform a connectivity test on the candidate network file system node through the non-candidate network file system node.

[0096] In the embodiment of the present invention, after selecting the candidate network file system node and the non-candidate network file system node, it is necessary to mount the non-candidate network file system node to the candidate network file system node, which is achieved by performing a connectivity test. At this time, the task management device in the baseboard management controller sends the NFS (Network File System) server configuration task to the non-candidate network file system node, so that the non-candidate network file system node sequentially tests the connectivity with the candidate network file system node. Usually, the child node (non-candidate network file system node) pings the candidate network file system node. Each ping will obtain a network delay value. After the non-candidate network file system node calculates the average network delay value, it is sent to the task management device for the final matching of the network file system node. The specific steps include:

[0097] Performing connectivity tests on each non-alternative network file system node and each alternative network file system node in turn for a preset number of times;

[0098] Obtain the first network delay value of each connectivity test;

[0099] The target average network delay 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 delay value.

[0100] The above-mentioned preset times can be set according to the requirements, and can be set to 100, 150, etc., which is not specifically limited in the present invention. Then the formula for obtaining the target average network delay value is as follows:

[0101]

[0102] in, is the target average network latency value, is the first network delay value of the Zth connectivity test, and N is the preset number of times.

[0103] Step 104: determine a network file system configuration node from the candidate network file system nodes based on the result of the connectivity test, and determine a mount subnode of the network file system configuration node from the non-candidate network file system nodes.

[0104] In the embodiment of the present invention, the non-alternative network file system nodes are allowed to test the connectivity with the alternative network file system nodes in turn, so each non-alternative network file system node has a connectivity test result for each alternative network file system node, which is pushed from the back to the front from the scored sorting list, and the minimum second average network delay value between each non-alternative network file system node and the alternative network file system node is determined, and the alternative network file system node corresponding to the second average network delay value is determined as a hit node, and the corresponding non-alternative network file system node is determined as a to-be-mounted child node of the hit node, and at the same time, the hit test speed of the alternative network file system node is increased by 1. When the hit test of the alternative network file system node reaches the second preset value, it is considered that the alternative network file system node does not need to be hit again. At this time, the alternative network file system node is determined as a network file system configuration node, and the to-be-mounted child node of the hit node is determined as the mount child node of the network file system configuration node. The specific steps include:

[0105] Determine the first average network delay value between the non-candidate network file system node and each candidate network file system node in order from the back to the front of the sorted list;

[0106] Select a second average network delay value with the smallest value from the first average network delay values;

[0107] 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 to-be-mounted child node of the hit node, and increase the hit speed measurement of the hit node by 1;

[0108] When it is determined that the hit test speed of the hit node reaches the second preset value, the hit node is determined as a network file system configuration node, and the to-be-mounted child node of the hit node is determined as a mount child node of the network file system configuration node.

[0109] Among them, the smaller the average network delay value is, the better the network connection between the non-alternative network file system nodes and the alternative network file system nodes is, so the second average network delay value with the smallest value is selected from the first average network delay value. At the same time, the reliability of the node is evaluated by hitting the speed test to ensure that the finally selected node can provide the best service quality.

[0110] In order to better understand this process, a specific example can be used to illustrate. For example, there are candidate network file system nodes A and B, and non-alternative network file system nodes C, D, E, and F, where the sorted list is A, B, C, D, E, and F. The first average network delay value between F and A is 4ms, and the first average network delay value between F and B is 5ms. Because 4<5, the candidate network file system node hit by node F is A, and the hit speed measurement of A is 1 at this time. The first average network delay value between E and A is 4ms, and the first average network delay value between E and B is 6ms. Because 4<6, the candidate network file system node hit by node E is A, and the hit speed measurement of A is increased by 1, which is 2. Assuming that the second preset value is 2, the hit speed measurement of node A reaches the second preset value at this time. At this time, node A is determined as a network file system configuration node, and nodes E and F are determined as mounted child nodes of node A. According to the above steps, nodes D and C are continued to be judged. At this time, node A no longer participates in the hit.

[0111] Step 105: copy the target firmware upgrade file from the master node to the network file system configuration node, and copy the target firmware upgrade file to the mount sub-node through the network file system configuration node.

[0112] In an embodiment of the present invention, after the nodes in the target cluster are judged, a 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 to the mount sub-node through the network file system configuration node.

[0113] Step 106: Execute the firmware upgrade task through the target firmware upgrade file.

[0114] In the embodiment of the present invention, when executing the firmware upgrade task through the target firmware upgrade file, different nodes execute the task at different times. The mount subnode triggers 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 mount subnode task is completed, the control network file system configuration node starts to execute the upgrade operation. The specific steps include:

[0115] When it is determined that the target firmware upgrade file exists in the designated directory of the mount subnode, triggering the mount subnode to execute the first firmware upgrade task through the target firmware upgrade file;

[0116] Obtain the upgrade progress and upgrade log of the first firmware upgrade task, and upload the upgrade progress and upgrade log to the master node;

[0117] Determine the upgrade status of the mounted subnode through the upgrade progress and upgrade log;

[0118] When it is determined that the upgrade status of the mount subnode is upgrade completed, the network file system configuration node is controlled to execute the second firmware upgrade task through the target firmware upgrade file.

[0119] In addition, after all firmware upgrade tasks are completed, it will verify whether the firmware versions of the mount subnodes and network file system configuration nodes are correctly updated, clean up temporary files and no longer needed upgrade files, and ensure the cleanliness of the system. The above settings can reduce the operations of operation and maintenance personnel, save time and energy.

[0120] In summary, the process of the above firmware upgrade method is as follows: Figure 2 As shown, the master node and child nodes in the target cluster are determined, and then the master node issues the firmware upgrade task through the built-in task management device. During the firmware upgrade task, the network file system configuration node and the mount child 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 and the upgrade progress and upgrade log of the firmware upgrade task are reported.

[0121] It should be noted that the built-in devices of the baseboard management controller include, in addition to the task management device, an information collection device, a firmware upgrade device, and a dynamic configuration device. Different devices have different functions. For example, Figure 3 As shown, the firmware upgrade task is managed on the control page of the baseboard management controller of the master node. The task management device is used to coordinate the tasks in the cluster, including issuing firmware upgrade tasks and network file system configuration tasks; the information collection device is used to collect basic information and network information of the baseboard management controller, the upgrade device is used to upload the target firmware upgrade file, perform firmware upgrade operations on the node, and report the upgrade progress and upgrade log in real time. The dynamic configuration module is used to count the information of the information collection device and perform scoring.

[0122] A firmware upgrade method provided by an embodiment of the present invention, in response to a received firmware upgrade task, uploads 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 the node where the baseboard management controller with the best performance among at least one baseboard management controller in the target cluster is located, and the key information includes free memory capacity and network transmission rate; selects alternative network file system nodes and non-alternative network file system nodes from at least one node in the target cluster through free memory capacity and network transmission rate; performs connectivity test on the alternative network file system nodes through the non-alternative network file system nodes; determines a network file system configuration node from the alternative network file system node through the result of the connectivity test, and determines a mount subnode of the network file system configuration node from the non-alternative network file system node; copies the target firmware upgrade file from the master node to the network file system configuration node, and copies the target firmware upgrade file to the mount subnode through the network file system configuration node; and executes the firmware upgrade task through the target firmware upgrade file. In this embodiment, the baseboard management controller in the target cluster is used to manage and run the firmware upgrade task, without adding additional resources, reducing the operation and maintenance costs, and by mounting the subnode, the operation and maintenance personnel do not need to frequently operate the node's WEB page, saving the time and energy of the operation and maintenance personnel, and at the same time, there will be no problem of inconsistent cluster firmware files caused by misoperation due to long-term focus on work, thus achieving stable operation of the cluster. In addition, the present application also tracks the actual situation of at least one baseboard management controller in the target cluster more accurately by increasing the monitoring frequency.

[0123] Reference Figure 4 , showing Figure 1 The flowchart of step 105 in a firmware upgrade method provided by an embodiment of the present invention shown in FIG. 1 may include:

[0124] Step 1051, verifying the hash value of the fifth version of the first message digest algorithm.

[0125] In the embodiment of the present invention, when the upgrade task is executed, the firmware upgrade file header information will also be parsed to determine whether the target firmware upgrade file is applicable to the model in the target cluster. First, the firmware model information applicable to the server is obtained from at least one baseboard management controller (BMC) in the target cluster, and the BMC in the target cluster is divided according to the obtained firmware model information. The firmware model information applicable to the server corresponding to the BMC in each divided area is consistent. This helps to ensure the hardware compatibility of the firmware upgrade file with the server, and then parses the header information of the target firmware upgrade file to obtain the second model information applicable to the target firmware to be upgraded, and compares the second model information with the previously obtained firmware model information. According to the comparison results, the first divided area to which the target firmware upgrade file is applicable and the second divided area to which it is not applicable are determined. This helps to ensure that only compatible servers are selected for firmware upgrades, and the specific steps include:

[0126] Obtaining firmware model information applicable to a server corresponding to at least one baseboard management controller in the target cluster;

[0127] Dividing at least one baseboard management controller in the target cluster according to the firmware model information, wherein the firmware model information applicable to the server corresponding to the baseboard management controller in each divided area is consistent;

[0128] Parsing the header information of the target firmware upgrade file to obtain the second model information applicable to the target firmware to be upgraded;

[0129] The second model information is compared 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.

[0130] It should be noted that only the baseboard management controller in the first partition area can perform the firmware upgrade operation according to the target firmware upgrade file, so when the network file system configuration node is determined later, it can be selected from the second partition area first, because the server corresponding to the second partition area cannot be upgraded, so the server is idle at this time, and the server has better management space than the baseboard management controller, so the server in the second partition area can be used for management, and the network connectivity is better. The specific steps include:

[0131] Using the server corresponding to the baseboard management controller in the second divided area as a candidate network file system node;

[0132] Obtaining a first number of the first network file system configuration nodes;

[0133] In the case where it is determined that the first number is greater than one third of the number of nodes in the target cluster, using the baseboard management controller in the first divided area as a non-alternative network file system node;

[0134] The network file system configuration node is determined from the candidate network file system nodes through the connectivity test, and the mount subnode of the network file system configuration node is determined from the non-candidate network file system nodes. The network file system configuration node and the mount subnode are applicable to the same firmware model information.

[0135] It should be noted that the above parsed header information also includes: a hash value of the fifth version of the first message digest algorithm, that is, an MD5 value, and the integrity of the target firmware upgrade file can be verified by the hash value of the fifth version of the first message digest algorithm.

[0136] Step 1052: If the hash value of the first message digest algorithm version 5 is consistent with the hash value of the preset target message digest algorithm version 5, then obtain the target firmware model information applicable to the network file system configuration node.

[0137] The preset target message digest algorithm version 5 hash value in the embodiment of the present invention is the initial message digest algorithm version 5 hash value set when the target firmware upgrade file is generated. During the file transmission process, if the file is damaged, the corresponding message digest algorithm version 5 hash value will change. Therefore, by comparing the hash value of the first message digest algorithm version 5 with the preset target message digest algorithm version 5 hash value, it is determined whether the target firmware upgrade file is complete at this time. If they are consistent, it means that the firmware upgrade file has not been tampered with, and subsequent operations can be continued. At this time, the target firmware model information applicable to the network file system configuration node will continue to be determined.

[0138] 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 to the mount subnode through the network file system configuration node.

[0139] In the embodiment of the present invention, 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 means that the firmware upgrade file is applicable to the network file system configuration node.

[0140] At this point, copy the target firmware upgrade file from the master node to the network file system configuration node. This can be done through a network transfer protocol (such as FTP, SFTP, HTTP, etc.) or directly through a network file system (NFS) share. Then, copy the target firmware upgrade file through the network file system configuration node to the mount child node. Ensure that the firmware model information applicable to the network file system configuration node and the mount child node is consistent. In addition, during the firmware upgrade process, the upgrade progress and system status will be monitored to ensure that the upgrade is carried out smoothly. After the upgrade is completed, verify that the firmware version is updated correctly and check whether the system is operating normally.

[0141] The above steps avoid hardware damage or system instability caused by incompatibility, and further ensure the order of firmware upgrade tasks.

[0142] Reference Figure 5 , showing Figure 1 The flowchart of step 101 in a firmware upgrade method provided by an embodiment of the present invention shown in FIG. 1 may include:

[0143] Step 1011 , pre-set a first weight for key information for a firmware upgrade task, and pre-set a second weight for key information for a non-firmware upgrade task.

[0144] In the embodiment of the present invention, the frequencies of key information collected during firmware upgrade tasks and non-firmware upgrade tasks are inconsistent, so different weights are set to truly reflect the data of free memory and network transmission rate during file copying after mounting.

[0145] Step 1012: 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 a second preset period.

[0146] In the embodiment of the present invention, the information collection device of the baseboard management controller is required 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. The collection frequency during the upgrade process will be increased to more accurately track the actual situation of the nodes in the target cluster.

[0147] Step 1013: Upload the target firmware upgrade file and key information of at least one baseboard management controller in the target cluster to the master node.

[0148] In the embodiment of the present invention, key information is collected and uploaded according to the second preset period, so there will be multiple key information in the master node. At this time, when the number of key information is greater than the first preset value, the target free memory capacity and the target network transmission rate can be calculated by calculating the historical data, and then scoring and sorting are performed based on the calculated information. The specific steps include:

[0149] When it is determined that the amount of key information collected is greater than the first preset value, extracting the three target key information closest to the current moment;

[0150] Determine the target free memory capacity of each baseboard management controller in the target cluster through the target key information and the target free memory capacity formula, and determine the target network transmission rate of each baseboard management controller in the target cluster through the target key information and the target network transmission rate formula;

[0151] Score each baseboard management controller in the target cluster by target free memory capacity and target network transmission rate;

[0152] The target firmware upgrade file and at least one baseboard management controller in the target cluster are mirrored in descending order according to the scoring results.

[0153] Among them, because the three target key information closest to the current moment is extracted, the first preset value must be greater than 3, and the specific value is not specifically limited in the present invention. When scoring the model configuration in the cluster through the configuration module 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: free memory scoring value, y: network transmission rate scoring value, s: scoring result), wherein the value of the target free memory capacity is determined as the free memory scoring value, and the value of the target network transmission rate is determined as the network transmission rate scoring value.

[0154] The above steps can more scientifically and accurately determine the performance status of each node in the target cluster, and also facilitate the subsequent determination of candidate network file system nodes and non-candidate network file system nodes based on the scoring and sorting results.

[0155] It should be noted that the target free memory capacity formula is:

[0156]

[0157] The target network transmission rate formula is:

[0158]

[0159] in, is the target free memory capacity, The maximum capacity of free memory in the target key information. is the intermediate capacity of free memory in the target key information, is the minimum free memory capacity of the target key information, is the first weight of key information, is the target network transmission rate, is the maximum network transmission rate of the target key information, is the median rate of network transmission in the target key information, It is the minimum network transmission rate of target key information.

[0160] In addition, the embodiment of the present invention can also use the free memory and network transmission rate information collected during the entire upgrade process as a whole as a calculation parameter for the next upgrade of the NFS node. Taking free memory as an example, assuming that the number of collection times during this upgrade process is n, and the free memory collected is , taking this collection as a whole, during the entire upgrade process, the free memory size is the average value of all collection points during this upgrade process:

[0161]

[0162] in, This is the average value of all the collection points during this upgrade process, n is the number of collections, is the free memory size of the i-th collection.

[0163] In addition, during the copy and upgrade process, the larger the free memory, the better. When there is no upgrade task, the free memory is 3 / 2 of the size of the firmware upgrade file to ensure that the memory will not be full during the subsequent upgrade process, thereby affecting other services. Therefore, after collecting key information, it is necessary to make adjustments based on the key information.

[0164] Furthermore, after the baseboard management controller obtains the scoring results, it sorts the baseboard management controllers in the cluster according to the image according to the scoring results. Due to the network file system service in the baseboard management controller, the network file system with the baseboard management controller as the node can generally support the mounting of 3 devices at the same time. Therefore, when selecting the network file system service node, the first one-third of the sorted list is extracted as the network file system candidate nodes, and the nodes corresponding to the baseboard management controllers ranked in the last two-thirds are correspondingly determined as non-candidate network file system nodes. The specific steps include:

[0165] Generating a sorted list of at least one baseboard management controller in the target cluster by image sorting;

[0166] Determine the nodes corresponding to the baseboard management controllers ranked in the first third of the sorted list as candidate network file system nodes;

[0167] The nodes corresponding to the baseboard management controllers that rank the last two-thirds in the sorted list are determined as non-candidate network file system nodes.

[0168] Because the network file system with the baseboard management controller as the node can support the mounting of three devices at the same time, under ideal conditions, one-fourth of the nodes will be used as alternative network file system nodes. However, because the alternative network file system nodes may have network problems and cannot be mounted, a fault-tolerant space is set to ensure that the mounting can be completed smoothly.

[0169] Reference Figure 6 , shows a flowchart of another firmware upgrade method provided by an embodiment of the present invention, the method may include:

[0170] Upload the target firmware upgrade file to the master node, and then parse the target firmware upgrade file to obtain the second model information applicable to the target firmware to be upgraded, and at the same time obtain the firmware model information applicable to the server corresponding to the baseboard management controller in the target cluster, as well as the free memory capacity and network transmission rate of the baseboard management controller, score by free memory capacity and network transmission rate, and sort according to the scoring results (sorting quantitative cluster), select alternative network file system nodes and non-alternative network file system nodes according to the sorting results, perform connectivity test on the alternative network file system nodes through the non-alternative network file system nodes, determine the network file system configuration node from the alternative network file system nodes through the results of the connectivity test, start the network file system service of the network file system configuration node, copy the target firmware upgrade file from the master node to the network file system configuration node, and copy the target firmware upgrade file to the mount child node through the network file system configuration node, execute the firmware upgrade task through the target firmware upgrade file, and report the upgrade progress and upgrade log until all nodes complete the upgrade.

[0171] Reference Figure 7 , shows a schematic diagram of the structure of a firmware upgrade device provided by an embodiment of the present invention, such as Figure 7 As shown, the device may include:

[0172] The first upload module 201 is used to upload 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, wherein each baseboard management controller corresponds to a node, and the master node is the node where the baseboard management controller with the best performance among at least one baseboard management controller in the target cluster is located, and the key information includes free memory capacity and network transmission rate.

[0173] The first screening module 202 is used to screen out candidate network file system nodes and non-candidate network file system nodes from at least one node in the target cluster according to free memory capacity and network transmission rate.

[0174] The testing module 203 is used to perform a connectivity test on the candidate network file system node through the non-candidate network file system node.

[0175] The first determination module 204 is used 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 mount subnode of the network file system configuration node from the non-candidate network file system nodes.

[0176] The file copy module 205 is used 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 to the mount sub-node through the network file system configuration node.

[0177] The task execution module 206 is used to execute the firmware upgrade task through the target firmware upgrade file.

[0178] Optionally, the firmware upgrade device further includes:

[0179] The running module is used to run the information collection device in the baseboard management controller when it is determined that the baseboard management controller in the target cluster is started.

[0180] The first acquisition module is used to collect data information and network addresses of baseboard management controllers in the target cluster through an information acquisition device according to a first preset period, wherein the data information includes performance parameter information of the baseboard management controllers.

[0181] The binding module is used to bind the network address and data information belonging to the same baseboard management controller.

[0182] The second screening module screens out the master node and the sub-node from at least one baseboard management controller in the target cluster according to the performance parameter information.

[0183] Optionally, the data information includes at least one or more of the following: chip model of the baseboard management controller, CPU model, CPU occupancy, total memory capacity, free memory capacity, buffer capacity, first model information of the field replaceable unit, network transmission rate, real-time transmission rate of the management port network card, network connectivity and bandwidth utilization, among which CPU occupancy, free memory capacity, network transmission rate, real-time transmission rate of the management port network card, network connectivity and bandwidth utilization belong to performance parameter information.

[0184] Optionally, the firmware upgrade device further includes:

[0185] The first acquisition module is used to acquire firmware model information applicable to a server corresponding to at least one baseboard management controller in a target cluster.

[0186] The partitioning module is used to partition at least one baseboard management controller in the target cluster according to the firmware model information, wherein the firmware model information applicable to the servers corresponding to the baseboard management controllers in each partitioned area is consistent.

[0187] The second acquisition module is used to parse the header information of the target firmware upgrade file to obtain the second model information applicable to the target firmware to be upgraded.

[0188] The second determination module is used 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.

[0189] Optionally, the header information of the target firmware upgrade file also includes: a hash value of the fifth version of the first message digest algorithm.

[0190] The file copy module 205 specifically includes:

[0191] The first check submodule is used to check the hash value of the fifth version of the first message digest algorithm.

[0192] The first acquisition submodule is used to acquire target firmware model information applicable to the network file system configuration node if the hash value of the first message digest algorithm version 5 is consistent with the hash value of the preset target message digest algorithm version 5.

[0193] The copy submodule is used to copy the target firmware upgrade file from the main node to the network file system configuration node if the target firmware model information is consistent with the second model information, and copy the target firmware upgrade file to the mount subnode through the network file system configuration node. The firmware model information applicable to the network file system configuration node and the mount subnode is consistent.

[0194] Optionally, the task execution module 206 specifically includes:

[0195] The first task execution submodule is used to trigger the mount subnode to execute the first firmware upgrade task through the target firmware upgrade file when it is determined that the target firmware upgrade file exists in the designated directory of the mount subnode.

[0196] The second acquisition submodule is used to acquire the upgrade progress and upgrade log of the first firmware upgrade task, and upload the upgrade progress and upgrade log to the master node.

[0197] The first determination submodule is used to determine the upgrade status of the mounted subnode through the upgrade progress and the upgrade log.

[0198] The second task execution submodule is used to control the network file system configuration node to execute the second firmware upgrade task through the target firmware upgrade file when it is determined that the upgrade status of the mount subnode is upgrade completed.

[0199] Optionally, the first uploading module 201 specifically includes:

[0200] The weight setting submodule is used to pre-set a first weight about key information for a firmware upgrade task and to pre-set a second weight about key information for a non-firmware upgrade task.

[0201] The first collection submodule is used to collect key information of at least one baseboard management controller in the target cluster according to a second preset period in response to the received firmware upgrade task.

[0202] The upload submodule is used to upload the target firmware upgrade file and key information of at least one baseboard management controller in the target cluster to the master node.

[0203] Optionally, the firmware upgrade device further includes:

[0204] The extraction module is used to extract the three target key information closest to the current moment when it is determined that the amount of collected key information is greater than a first preset value.

[0205] The third determination module is used to determine the target free memory capacity of each baseboard management controller in the target cluster through the target key information and the target free memory capacity formula, and to determine the target network transmission rate of each baseboard management controller in the target cluster through the target key information and the target network transmission rate formula.

[0206] The scoring module is used to score each baseboard management controller in the target cluster according to the target free memory capacity and the target network transmission rate.

[0207] The sorting module is used to sort the target firmware upgrade file and at least one baseboard management controller in the target cluster in mirroring order according to the scoring results from large to small.

[0208] Optionally, the target free memory capacity formula is:

[0209]

[0210] The target network transmission rate formula is:

[0211]

[0212] in, is the target free memory capacity, The maximum capacity of free memory in the target key information. is the intermediate capacity of free memory in the target key information, is the minimum free memory capacity of the target key information, is the first weight of key information, is the target network transmission rate, is the maximum network transmission rate of the target key information, is the median rate of network transmission in the target key information, It is the minimum network transmission rate of target key information.

[0213] Optionally, the firmware upgrade device further includes:

[0214] The generating module is used to generate a sorted list of at least one baseboard management controller in the target cluster by sorting the images.

[0215] The fourth determination module is used to determine the nodes corresponding to the baseboard management controllers ranked in the first third of the sorted list as candidate network file system nodes.

[0216] The fifth determining module is used to determine the nodes corresponding to the bottom two-thirds of the baseboard management controllers in the sorted list as non-candidate network file system nodes.

[0217] Optionally, the testing module 203 specifically includes:

[0218] The test submodule is used to perform connectivity tests on each non-candidate network file system node and each candidate network file system node in turn according to a preset number of times.

[0219] The third acquisition submodule is used to obtain the first network delay value of each connectivity test.

[0220] The second determining submodule is used to determine a target average network delay value between each non-candidate network file system node and each candidate network file system node within a preset number of times according to the first network delay value.

[0221] The first determination module 204 specifically includes:

[0222] The third determining submodule is used to determine the first average network delay value of the non-candidate network file system node and each candidate network file system node in sequence from the back to the front in the sorting list.

[0223] The selection submodule is used to select a second average network delay value with the smallest value from the first average network delay values.

[0224] The fourth determination submodule is used to 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 to-be-mounted child node of the hit node, and add 1 to the hit speed measurement of the hit node.

[0225] The fifth determination submodule is used to determine the hit node as a network file system configuration node and determine the to-be-mounted child node of the hit node as a mount child node of the network file system configuration node when it is determined that the hit test speed of the hit node reaches a second preset value.

[0226] A firmware upgrade method provided by an embodiment of the present invention, in response to a received firmware upgrade task, uploads 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 the node where the baseboard management controller with the best performance among at least one baseboard management controller in the target cluster is located, and the key information includes free memory capacity and network transmission rate; selects alternative network file system nodes and non-alternative network file system nodes from at least one node in the target cluster through free memory capacity and network transmission rate; performs connectivity test on the alternative network file system nodes through the non-alternative network file system nodes; determines a network file system configuration node from the alternative network file system node through the result of the connectivity test, and determines a mount subnode of the network file system configuration node from the non-alternative network file system node; copies the target firmware upgrade file from the master node to the network file system configuration node, and copies the target firmware upgrade file to the mount subnode through the network file system configuration node; and executes the firmware upgrade task through the target firmware upgrade file. In this embodiment, the baseboard management controller in the target cluster is used to manage and run the firmware upgrade task, without adding additional resources, reducing the operation and maintenance costs, and by mounting the subnode, the operation and maintenance personnel do not need to frequently operate the node's WEB page, saving the time and energy of the operation and maintenance personnel, and at the same time, there will be no problem of inconsistent cluster firmware files caused by misoperation due to long-term focus on work, thus achieving stable operation of the cluster. In addition, the present application also tracks the actual situation of at least one baseboard management controller in the target cluster more accurately by increasing the monitoring frequency.

[0227] Based on the same inventive concept, another embodiment of the present invention provides an electronic device 300, such as Figure 8 shown. Figure 8 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301. When the computer program is executed by the processor, the steps in the firmware upgrade method described in any of the above embodiments of the present invention are implemented.

[0228] Based on the same inventive concept, another embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the firmware upgrade method described in any of the above embodiments of the present invention are implemented.

[0229] Based on the same inventive concept, another embodiment of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps in the firmware upgrade method described in any of the above embodiments of the present invention.

[0230] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0231] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the relevant technology, 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 number of instructions for a terminal (which can be a mobile phone, computer, server, air conditioner, or network equipment, etc.) to execute the methods described in each embodiment of the present invention.

[0232] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

[0233] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0234] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0235] In the embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0236] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0237] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0238] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the relevant technology or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, ROM, RAM, disk or optical disk, etc., which can store program code.

[0239] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A firmware upgrade method, characterized in that: The method comprises: In response to the received firmware upgrade task, the target firmware upgrade file and key information of at least one baseboard management controller in the target cluster are uploaded to the master node, wherein each baseboard management controller corresponds to a node, the key information includes free memory capacity and network transmission rate, and the master node is the node where the baseboard management controller corresponding to the maximum value in the sum result after weighting and weighted summing the performance parameters of at least one baseboard management controller in the target cluster is located, and the performance parameters include central processing unit occupancy, free memory capacity, network transmission rate, real-time transmission rate of the management port network card, network connectivity and bandwidth utilization; Screening out candidate network file system nodes and non-candidate network file system nodes from at least one node in the target cluster by using the free memory capacity and the network transmission rate, wherein the key information includes three target key information closest to the current moment, and the three target key information are used to determine the target free memory capacity and target network transmission rate of each node in the target cluster; the value of the target free memory capacity is the free memory score value, and the value of the target network transmission rate is the network transmission rate score value; at least one node in the target cluster is mirror sorted in descending order according to the sum of the free memory score value and the network transmission rate score value, and the candidate network file system nodes and non-candidate network file system nodes are screened according to the mirror sorting result; Performing a connectivity test on the candidate network file system node through the non-candidate network file system node; Determine a network file system configuration node from the candidate network file system nodes based on the result of the connectivity test, and determine a mount subnode of the network file system configuration node from the non-candidate network file system nodes; Copying the target firmware upgrade file from the master node to the network file system configuration node, and copying the target firmware upgrade file to the mount subnode through the network file system configuration node; The firmware upgrade task is executed through the target firmware upgrade file.

2. The firmware upgrade method according to claim 1, characterized in that: Before uploading the target firmware upgrade file and 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 includes: When determining that a baseboard management controller in the target cluster is started, running an information collection device in the baseboard management controller; Collecting data information and network addresses of baseboard management controllers in the target cluster through the information collection device according to a first preset period, wherein the data information includes performance parameter information of the baseboard management controllers; Binding the network address and the data information belonging to the same baseboard management controller; The master node and the child node are screened out from at least one baseboard management controller in the target cluster according to the performance parameter information.

3. The firmware upgrade method according to claim 2, characterized in that: The data information includes at least one or more of the following: chip model of the baseboard management controller, central processing unit model, central processing unit occupancy, total memory capacity, free memory capacity, buffer capacity, first model information of the field replaceable unit, network transmission rate, real-time transmission rate of the management port network card, network connectivity and bandwidth utilization, among which central processing unit occupancy, free memory capacity, network transmission rate, real-time transmission rate of the management port network card, network connectivity and bandwidth utilization belong to performance parameter information.

4. The firmware upgrade method according to claim 1, characterized in that: 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 in response to the received firmware upgrade task, the method further includes: Obtaining firmware model information applicable to a server corresponding to at least one baseboard management controller in the target cluster; Dividing at least one baseboard management controller in the target cluster according to the firmware model information, wherein the firmware model information applicable to the server corresponding to the baseboard management controller in each divided area is consistent; Parsing the header information of the target firmware upgrade file to obtain the second model information applicable to the target firmware to be upgraded; The second model information is compared with the firmware model information to determine a first partition area to which the target firmware upgrade file is applicable and a second partition area to which the target firmware upgrade file is not applicable.

5. The firmware upgrade method according to claim 1, characterized in that: The header information of the target firmware upgrade file also includes: a hash value of the fifth version of the first message digest algorithm; The step of copying the target firmware upgrade file from the master node to the network file system configuration node, and copying the target firmware upgrade file to the mount sub-node through the network file system configuration node, comprises: Verifying the hash value of the fifth version of the first message digest algorithm; If the hash value of the first message digest algorithm version 5 is consistent with the hash value of the preset target message digest algorithm version 5, then obtaining target firmware model information applicable to the network file system configuration node; 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 to the mount sub-node through the network file system configuration node, and the firmware model information applicable to the network file system configuration node and the mount sub-node is consistent.

6. The firmware upgrade method according to claim 1, characterized in that: The performing the firmware upgrade task by using the target firmware upgrade file includes: When it is determined that the target firmware upgrade file exists in the designated directory of the mount subnode, triggering the mount subnode to execute the first firmware upgrade task through the target firmware upgrade file; Obtaining the upgrade progress and upgrade log of the first firmware upgrade task, and uploading the upgrade progress and the upgrade log to the master node; Determine the upgrade status of the mounted subnode according to the upgrade progress and upgrade log; When it is determined that the upgrade status of the mount subnode is upgrade completed, the network file system configuration node is controlled to execute the second firmware upgrade task through the target firmware upgrade file.

7. The firmware upgrade method according to claim 1, characterized in that: In response to the received firmware upgrade task, 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: Pre-setting a first weight about the key information for a firmware upgrade task, and pre-setting a second weight about the key information for a non-firmware upgrade task; In response to the received firmware upgrade task, collecting key information of at least one baseboard management controller in the target cluster according to a second preset period; The target firmware upgrade file and key information of at least one baseboard management controller in the target cluster are uploaded to the master node.

8. The firmware upgrade method according to claim 7, characterized in that: 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 method further includes: When it is determined that the amount of key information collected is greater than the first preset value, extracting the three target key information closest to the current moment; Determine the target free memory capacity of each baseboard management controller in the target cluster by using the target key information and the target free memory capacity formula, and determine the target network transmission rate of each baseboard management controller in the target cluster by using the target key information and the target network transmission rate formula; Scoring each baseboard management controller in the target cluster according to 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 in descending order according to the scoring results.

9. The firmware upgrade method according to claim 8, characterized in that: The target free memory capacity formula is: The target network transmission rate formula is: in, is the target free memory capacity, The maximum capacity of free memory in the target key information. is the intermediate capacity of free memory in the target key information, is the minimum free memory capacity of the target key information, is the first weight of the key information, is the target network transmission rate, is the maximum network transmission rate of the target key information, is the median rate of network transmission in the target key information, It is the minimum network transmission rate of target key information.

10. The firmware upgrade method according to claim 8, characterized in that: After mirroring the target firmware upgrade file and at least one baseboard management controller in the target cluster in descending order of the scoring results, the method further includes: Generating a sorted list of at least one baseboard management controller in the target cluster by image sorting; Determine nodes corresponding to the baseboard management controllers ranked in the first third of the sorted list as candidate network file system nodes; The nodes corresponding to the baseboard management controllers ranked in the last two thirds in the sorted list are determined as non-candidate network file system nodes.

11. The firmware upgrade method according to claim 1, characterized in that: The performing connectivity test on the candidate network file system node through the non-candidate network file system node comprises: Performing connectivity tests on each of the non-candidate network file system nodes and each of the candidate network file system nodes in turn for a preset number of times; Obtain the first network delay value of each connectivity test; The target average network delay value between each of the non-candidate network file system nodes and each of the candidate network file system nodes within a preset number of times is determined by using the first network delay value.

12. The firmware upgrade method according to claim 11, characterized in that: The method of determining a network file system configuration node from the candidate network file system nodes based on the result of the connectivity test, and determining a mount subnode of the network file system configuration node from the non-candidate network file system nodes, comprises: Determine the first average network delay value between the non-candidate network file system node and each of the candidate network file system nodes in order from the back to the front of the sorted list; Select a second average network delay value with the smallest value from the first average network delay values; 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 to-be-mounted child node of the hit node, and increase the hit speed measurement of the hit node by 1; When it is determined that the hit test speed of the hit node reaches a second preset value, the hit node is determined as a network file system configuration node, and the to-be-mounted child node of the hit node is determined as a mounted child node of the network file system configuration node.

13. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps in the firmware upgrade method according to any one of claims 1 to 12.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the firmware upgrade method according to any one of claims 1 to 12 are implemented.

15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps in the firmware upgrade method according to any one of claims 1 to 12 are implemented.