CN113872803A - Firmware upgrading method and device - Google Patents
Firmware upgrading method and device Download PDFInfo
- Publication number
- CN113872803A CN113872803A CN202111109169.7A CN202111109169A CN113872803A CN 113872803 A CN113872803 A CN 113872803A CN 202111109169 A CN202111109169 A CN 202111109169A CN 113872803 A CN113872803 A CN 113872803A
- Authority
- CN
- China
- Prior art keywords
- firmware
- server
- upgrade
- upgrading
- upgraded
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 33
- 230000001960 triggered effect Effects 0.000 claims abstract description 17
- 238000000547 structure data Methods 0.000 claims description 11
- 238000001514 detection method Methods 0.000 claims description 8
- 230000008569 process Effects 0.000 claims description 6
- 230000005856 abnormality Effects 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000006855 networking Effects 0.000 description 3
- 230000015654 memory Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/082—Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the application discloses a firmware upgrading method and device. In this embodiment, first, one server in the server cluster is upgraded, and after the one server is upgraded successfully, other servers in the server cluster are triggered to be upgraded automatically, so that the problem that the existing script command carries the IP address of each server and backs up the IP address of each server when the server in the server cluster is upgraded is solved.
Description
Technical Field
The present application relates to network communication technologies, and in particular, to a firmware upgrading method and apparatus.
Background
Under the condition that the data volume of the internet is larger and larger at present, a single server often fails due to too much pressure. In order to solve the problem that the pressure of a single server is too large, a server cluster is introduced.
The server cluster is composed of a plurality of servers. In a specific implementation, the requests from the clients can be equally distributed to the servers in the server cluster as much as possible in a load balancing manner, so that the single server is prevented from being out of order due to too much pressure. In addition, in the server cluster, even if a certain server fails, the other servers in the server cluster can be used for replacing the server, so that the failed server can be automatically avoided, and the normal access of a user is ensured.
The firmware on each server in a server cluster is often upgraded on a demand basis. Here, the firmware on the server may be a BIOS, a CPLD, a BMC, or the like, and the present application is not particularly limited. Currently, a commonly used firmware upgrade method is to trigger upgrade by using a BMC (Baseboard Management Controller) that sends a compiled script command to each server, but the script command needs to carry an IP address of each server, and the IP address of each server needs to be backed up, which is heavy in workload and cumbersome.
Disclosure of Invention
The application provides a firmware upgrading method and device, so that the IP address of each server does not need to be carried in a script command, and the IP address of each server is backed up.
The technical scheme is as follows:
the firmware upgrading method is applied to the servers in the server cluster and comprises the following steps:
the server is used as the first server to be upgraded in the server cluster, when an external upgrade command is detected, a firmware upgrade package is obtained and firmware corresponding to the firmware upgrade package on the server is upgraded, after the firmware upgrade is successful, if the upgrade of other servers in the server cluster is determined to be triggered according to the firmware upgraded successfully, firmware upgrade information associated with the firmware upgraded successfully in the server is sent to other servers in the server cluster so as to control other servers in the server cluster to perform corresponding firmware upgrade according to the firmware upgrade information; the firmware upgrade information at least includes: the storage address of the firmware upgrade package, and the upgrade reference parameter for determining whether to trigger firmware upgrade; or,
the server is used as a non-first server for upgrading in the server cluster, and when firmware upgrading information sent by other servers in the server cluster is received, if firmware upgrading on the server is determined to be triggered according to upgrading reference parameters in the firmware upgrading information, a firmware upgrading packet is obtained according to a storage address of a firmware upgrading packet in the firmware upgrading information, and firmware corresponding to the firmware upgrading packet on the server is upgraded.
Firmware upgrading device is applied to the server in the server cluster, and the device includes:
the upgrading management unit is used for acquiring a firmware upgrading packet and sending a first upgrading message to the upgrading unit when an external upgrading command is detected when the server is used as the first server for upgrading in the server cluster, and after the upgrading unit successfully upgrades the firmware, if the upgrading of other servers in the server cluster is determined to be triggered according to the successfully upgraded firmware, the firmware upgrading information associated with the successfully upgraded firmware in the server is sent to other servers in the server cluster so as to control the other servers in the server cluster to carry out corresponding firmware upgrading according to the firmware upgrading information; the firmware upgrade information at least includes: the storage address of the firmware upgrade package, and the upgrade reference parameter for determining whether to trigger firmware upgrade; or, when the server is used as a non-first server in the server cluster for upgrading, and when firmware upgrading information sent by other servers in the server cluster is received, if firmware upgrading on the server is determined to be triggered according to upgrading reference parameters in the firmware upgrading information, acquiring a firmware upgrading packet according to a storage address of the firmware upgrading packet in the firmware upgrading information and sending a second upgrading message to an upgrading unit;
and the upgrading unit is used for upgrading the firmware corresponding to the firmware upgrading packet on the server when the first upgrading message or the second upgrading message is received.
According to the technical scheme, in the embodiment, firstly, one server in the server cluster is upgraded, and after the server is upgraded successfully, other servers in the server cluster are triggered to be upgraded automatically, so that the problems that the IP address of each server is contained in a script command and the IP address of each server is backed up when the server in the server cluster is upgraded in the prior art are solved;
further, in this embodiment, after the upgrade operation is successfully performed on one server in the server cluster, the server triggers other servers in the server cluster to automatically upgrade, so that the server in the server cluster performs the safe and controllable upgrade operation.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a system networking schematic of the present application;
FIG. 2 is a schematic flow chart diagram illustrating one embodiment of a firmware upgrade method of the present application;
FIG. 3 is a schematic flow chart diagram illustrating another embodiment of a firmware upgrade method of the present application;
FIG. 4 is a schematic flow chart diagram illustrating another embodiment of a firmware upgrade method of the present application;
FIG. 5 is a schematic flow chart diagram illustrating another embodiment of a firmware upgrade method of the present application;
FIG. 6 is a schematic diagram of setting backup space in the present application;
FIG. 7 is a schematic flow chart of a log storage process after a server is upgraded in the present application;
FIG. 8 is a first schematic diagram of a firmware upgrade apparatus according to the present application;
fig. 9 is a second structural diagram of the firmware upgrading device of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments that can be derived from the embodiments given herein by a person of ordinary skill in the art are intended to be within the scope of the present disclosure.
Some of the related concepts related to the present application will be first introduced:
TLV: in the data communication protocol, the optional information may be encoded in a type-length-value format, or called TLV. Wherein, the type and length fields are fixed length, generally 1-4 bytes, and the value field is variable length.
LLDP: the Link Layer Discovery Protocol is named Link Layer Discovery Protocol and provides a standard Link Layer Discovery mode, Information such as main capability, a Management address, an equipment identifier, an interface identifier and the like of local equipment can be organized into different TLVs (Type/Length/Value), the TLVs are packaged in an LLDPDU (Link Layer Discovery Protocol Data Unit) and are distributed to neighbors directly connected with the neighbor, and the neighbors store the Information in a standard MIB (Management Information Base) form after receiving the Information so as to be used for a network Management system to search and judge the communication condition of a Link.
NAND flash: the NAND-flash memory is one of flash memories, has the advantages of large capacity, high rewriting speed and the like, is suitable for storing a large amount of data, and is written in a blank area, and if a target area has data, the data must be written after being erased.
The application provides a firmware upgrading method based on the point that firmware version information is transmitted by using messages in the same network, so as to solve the problem that an IP address needs to be backed up when a server cluster is upgraded. Referring to fig. 2, the method applied to the server in the server cluster may include the following steps:
s101, when a server serving as a first server for upgrading in a server cluster detects an external upgrading command, a firmware upgrading package is obtained, and firmware corresponding to the firmware upgrading package on the server is upgraded.
In this embodiment, the server in the server cluster to be upgraded first may be selected from the outside or may be specified in advance. Taking external selection as an example, the client randomly selects one of the servers in the server cluster as the first server to be upgraded. Further, for example, a certain Identifier (ID) may be pre-designated as the first server to be upgraded.
As described in step S101, after detecting the external upgrade command, the server in the server cluster that is the first server to perform the upgrade obtains the firmware upgrade package and upgrades the firmware corresponding to the firmware upgrade package on the server.
Optionally, in this embodiment, there are many ways to obtain the firmware upgrade package, for example, obtaining a firmware upgrade package storage path of the BMC stored in the server, and obtaining the firmware upgrade package based on the firmware upgrade package storage path; for another example, the firmware upgrade package can be directly obtained based on the firmware upgrade package storage path carried by the upgrade command. And so on, this embodiment will not be described by way of example.
As another embodiment, the first upgrade-performing server may also receive the firmware package and the upgrade command at the same time, without acquiring the firmware upgrade package according to the path address.
And S102, after the firmware is successfully upgraded, determining to trigger the upgrading of other servers in the server cluster according to the successfully upgraded firmware.
In this embodiment, there are many ways to determine to trigger the upgrade of other servers in the server cluster according to the firmware that is successfully upgraded in step S102, for example, receiving an upgrade controllable instruction sent by an external device; the upgrade controllable instruction is used for representing a detection result of the external device, and the detection result includes: the new firmware version of the firmware which is successfully upgraded is compatible with the server, or the new firmware version of the firmware which is successfully upgraded is incompatible with the server; and when the new firmware version of the firmware which is successfully upgraded and indicated by the upgrade controllable instruction is identified to be compatible with the server, determining to trigger the upgrade of other servers in the server cluster. In this embodiment, the external device may be a PC connected to the server cluster network, and after detecting that the first server to be upgraded is successfully upgraded, the external device may detect whether the new firmware version after the successful upgrade is compatible with the server. For example, the number of rebooting times in the server upgrading process and within a period of time after the server is upgraded successfully is detected, if the number of rebooting times of the server is greater than the number of rebooting times required by the upgraded version, the server can be determined to have an abnormal rebooting condition, at this time, it can be determined that the new firmware version of the successfully upgraded firmware is incompatible with the server, and otherwise, it is determined that the new firmware version of the successfully upgraded firmware is compatible with the server. Here, the period of time may be set according to actual requirements, for example, set for 3 hours, and the present embodiment is not particularly limited.
S103, sending the firmware upgrading information associated with the successfully upgraded firmware in the server to other servers in the server cluster to control the other servers in the server cluster to carry out corresponding firmware upgrading according to the firmware upgrading information.
In this embodiment, the firmware upgrade information associated with the firmware that is successfully upgraded in the server may be sent to other servers in the server cluster by using a Link Layer Discovery Protocol (LLDP). Specifically, the first server to be upgraded carries firmware upgrade information associated with the successfully upgraded firmware in an LLDP message and broadcasts the firmware upgrade information to other servers in the server cluster, so that the other servers perform corresponding firmware upgrade according to the firmware upgrade information. In this embodiment, the firmware upgrade information may be sent to other servers in the server cluster by being carried in the TLV field newly added to the LLDP packet. Based on the system networking shown in fig. 1, in the networking shown in fig. 1, each server in the server cluster is connected to the network through a dedicated port, and if the server 201 is the first server to be upgraded, the server 201, which is the first server to be upgraded, sends an LLDP message to the servers 202 to 20N.
As an embodiment, the firmware upgrade information includes at least: the storage address of the firmware upgrade package and an upgrade reference parameter for determining whether to trigger firmware upgrade.
And the storage address of the firmware upgrading packet is used for other servers to obtain the firmware upgrading packet.
And determining whether the upgrading of the firmware is triggered according to the upgrading reference parameter, wherein the upgrading reference parameter is used for determining whether the upgrading of the firmware is triggered by other servers. In this embodiment, there are many specific implementation forms of the upgrade reference parameter, which will be described in the following by way of example, and will not be described herein again.
As described in step S103, after the first server performing the upgrade sends the firmware upgrade information associated with the firmware successfully upgraded in the server to the other servers in the server cluster, if the other servers in the server cluster determine to trigger the firmware upgrade on the server according to the upgrade reference parameter in the firmware upgrade information, the other servers obtain the firmware upgrade packet according to the storage address of the firmware upgrade packet in the firmware upgrade information and upgrade the firmware corresponding to the firmware upgrade packet on the server, otherwise, the firmware on the server is not upgraded. And finally, triggering other servers in the server cluster to automatically upgrade through one server in the server cluster.
Thus, the flow shown in fig. 2 is completed.
As can be seen by the flow shown in fig. 2:
in this embodiment, first, one server in the server cluster is upgraded, and after the one server is upgraded successfully, other servers in the server cluster are triggered to be upgraded automatically, so that the problem that the existing script command carries the IP address of each server and backs up the IP address of each server when the server in the server cluster is upgraded is solved.
It should be noted that, in the flow shown in fig. 2, for example, the first server performing the upgrade carries the firmware upgrade information associated with the successfully upgraded firmware in the LLDP message and broadcasts the firmware upgrade information to other servers in the server cluster, optionally, after the first server performing the upgrade sends the LLDP message, if it is determined that all the other servers in the server cluster have received the LLDP message (determined by responses of the other servers), the LLDP function is turned off. Of course, if it is determined that there are servers in the server cluster that have not received the LLDP packet (have not received a response), the LLDP packet may be repeatedly returned to the server that has not received the LLDP packet before, and it is finally required to ensure that all other servers in the server cluster have received the LLDP packet. The flow shown in fig. 2 is described by the angle of the first server standing in the server cluster for upgrading, and the following description describes the embodiment of the present application by the angle of the second server standing in the server cluster for upgrading:
referring to fig. 3, fig. 3 is a flowchart of a second method provided in the embodiments of the present application. The process is applied to a server which is not upgraded for the first time in the server cluster. As shown in fig. 3, the process may include the following steps:
s201, the non-first server for upgrading receives firmware upgrading information sent by other servers in the server cluster.
The firmware upgrade information is as described above and will not be described herein.
Step S202, if the firmware upgrading on the server is determined to be triggered according to the upgrading reference parameter in the firmware upgrading information, the firmware upgrading packet is obtained according to the storage address of the firmware upgrading packet in the firmware upgrading information, and the firmware corresponding to the firmware upgrading packet on the server is upgraded.
As an embodiment, the upgrade reference parameter includes an upgrade time, a firmware version number, and a firmware name of a first server in the server cluster to be upgraded. Under this premise, determining to trigger firmware upgrade on the server according to the upgrade reference parameter in the firmware upgrade information may include:
and determining whether to upgrade by comparing the upgrade time in the local record of the server with the upgrade time of the first server to be upgraded in the firmware upgrade information, the firmware version number corresponding to the firmware name in the local record and the firmware version number in the firmware upgrade information. And determining to trigger firmware upgrade only if the upgrade time in the local record is earlier than the upgrade time of a first server for upgrading in the firmware upgrade information and the current firmware version number of the firmware corresponding to the firmware name in the server is different from the firmware version number included in the upgrade reference parameter.
If one of the servers in the cluster needs to be upgraded independently for other reasons, the firmware version corresponding to the firmware name in the local record of the server is consistent with the firmware version in the firmware upgrade information, and although the upgrade time in the local record is earlier than the upgrade time of the first server in the firmware upgrade information, the upgrade is not triggered in the upgrade.
In another embodiment, the firmware upgrade information includes: the storage address of the firmware upgrade package, the upgrade time of the first server to be upgraded, the firmware version number and the firmware name.
The storage address of the firmware upgrade package is used for other servers to obtain the firmware upgrade package;
the upgrade time, firmware version number, and firmware name of the first server to be upgraded are used by other servers to determine whether to trigger the upgrade.
In another embodiment, the firmware upgrade information includes: the storage address of the firmware upgrade package, the upgrade time, the firmware version number and the firmware name of the first server to be upgraded, and the server identifier of the first server to be upgraded in the server cluster.
The storage address of the firmware upgrade package is used for other servers to obtain the firmware upgrade package;
the upgrading time, the firmware version number and the firmware name of the first server for upgrading are used for other servers to determine whether to trigger upgrading;
the server identification of the first server to be upgraded in the server cluster is used for positioning a source when abnormality occurs in the upgrading process of the non-first server to be upgraded in the server cluster.
Finally, the automatic upgrading of other servers in the server cluster is triggered by the first server for upgrading in the server cluster.
The flow shown in fig. 3 is completed.
In this embodiment, the upgrade personnel do not need to know the IP addresses of other servers, which avoids the problem that the existing server cluster has the IP address of each server in the script command and backs up the IP address of each server when upgrading the servers.
In another embodiment of the present application, a log function may also be included.
Referring to fig. 4, a flowchart of another embodiment of a firmware upgrade method of the present application includes the following steps:
step S301 triggers step S304 on the basis of step S101, as described in step S304.
The descriptions of steps S302-S303 can refer to the corresponding descriptions of steps S102-S103 in fig. 2, and are not repeated here.
S304, the server obtains and stores the structure data defined by the outside for each firmware upgraded, and the structure data is used for determining the recovered firmware version when the server recovers the firmware version. The structural body data at least includes: firmware version storage information, firmware version information, and description information of the firmware version.
In this embodiment, a segment of storage space is created in a reserved space in a NAND Flash of a server, and after the server is upgraded, a user is allowed to design a corresponding structure body in the storage space to store data, where fields in the structure body include: the firmware version storage information, the firmware version information, the description information of the firmware version, the upgrading time, the server UUID + IP address, the server UUID which fails to upgrade + the IP address group + the failure log and fields which are added by some users.
For example, upgraded firmware includes: BIOS, CPLD, and BMC, then their backup spaces in NAND Flash can be set such that, as shown in figure 6,
0x00000000-0x00 FFFFFF: the space capacity is 16MB as a BIOS firmware version information storage place;
0x01000000-0x01 FFFFFF: the space capacity is 16MB as a storage place of BMC firmware version information;
0x02000000-0x02 FFFFFF: the storage space is 16MB as the CPLD firmware version information storage place.
The values of the start address and the space capacity can be set by themselves, and should not be regarded as limiting the start address and the space capacity.
The firmware version storage information includes a start address of the firmware version storage and a size of the firmware version.
And the upgrading time is the time for upgrading the version by the server.
When the server finishes upgrading to store the version information, as shown in fig. 7, it is determined whether the storage space is sufficient, and if the capacity is sufficient, the storage space is directly stored into the free space.
And if the storage capacity of the space is exceeded, performing cyclic coverage, and covering the firmware version information with the earliest upgrade time through the field value of the upgrade time in the structure body so as to realize covering the oldest firmware version information each time.
In another aspect of the present application, the server standing in the server cluster is not the first server to perform the upgrade. As shown with reference to figure 5 of the drawings,
the descriptions of steps S401 to S402 can refer to the corresponding descriptions of steps S201 to S202 in fig. 3, and are not repeated here.
The description of step S403 may refer to the corresponding description of step S304 in fig. 4, and is not repeated here.
Corresponding to the above method embodiment, the present application further provides a firmware upgrading apparatus, applied to a server in a server cluster, as shown in fig. 8, where the apparatus may include:
the upgrade management unit 601 is configured to, when the server is used as a first server in the server cluster to perform upgrade, acquire a firmware upgrade package and send a first upgrade message to the upgrade unit when an external upgrade command is detected, and after the upgrade unit successfully upgrades the firmware, if it is determined to trigger upgrade of other servers in the server cluster according to the firmware that is successfully upgraded, send firmware upgrade information associated with the firmware that is successfully upgraded in the server to other servers in the server cluster to control the other servers in the server cluster to perform corresponding firmware upgrade according to the firmware upgrade information; the firmware upgrade information at least includes: the storage address of the firmware upgrade package, and the upgrade reference parameter for determining whether to trigger firmware upgrade; or, when the server is used as a non-first server in the server cluster for upgrading, and when firmware upgrading information sent by other servers in the server cluster is received, if firmware upgrading on the server is determined to be triggered according to upgrading reference parameters in the firmware upgrading information, acquiring a firmware upgrading packet according to a storage address of the firmware upgrading packet in the firmware upgrading information and sending a second upgrading message to an upgrading unit;
an upgrading unit 602, configured to upgrade, when the first upgrade message or the second upgrade message is received, the firmware on the server corresponding to the firmware upgrade package.
In an embodiment of the present application, the determining, by the upgrade management unit 601, to trigger the upgrade of other servers in the server cluster according to the firmware that is successfully upgraded includes:
receiving an upgrading controllable instruction sent by external equipment; the upgrade controllable instruction is used for representing a detection result of the external device, and the detection result includes: the new firmware version of the firmware which is successfully upgraded is compatible with the server, or the new firmware version of the firmware which is successfully upgraded is incompatible with the server;
and when the new firmware version of the firmware which is successfully upgraded and indicated by the upgrade controllable instruction is identified to be compatible with the server, determining to trigger the upgrade of other servers in the server cluster.
In another embodiment, the upgrade management unit 601 includes an upgrade time, a firmware version number, and a firmware name of a first server in the server cluster to be upgraded;
if the latest upgrade time recorded locally by the server is earlier than the upgrade time included by the upgrade reference parameter, and the current firmware version number of the firmware corresponding to the firmware name in the server is different from the firmware version number included by the upgrade reference parameter, determining to trigger the firmware upgrade, otherwise, determining not to trigger the firmware upgrade.
As shown in fig. 9, the apparatus may further include:
information storage unit 603: the method is used for the server to obtain and store the structure data which is customized for each firmware upgraded externally after each firmware is upgraded, the structure data is used for determining the firmware version to be restored when the server restores the firmware version, and the structure data at least comprises the following steps: firmware version storage information, firmware version information, and description information of the firmware version.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for apparatus or system embodiments, since they are substantially similar to method embodiments, they are described in relative terms, as long as they are described in partial descriptions of method embodiments. The above-described apparatus or system embodiments are merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the functions of the modules may be implemented in one or more of software and/or hardware when implementing the aspects of the present application. And part or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing is directed to embodiments of the present application and it is noted that numerous modifications and adaptations may be made by those skilled in the art without departing from the principles of the present application and are intended to be within the scope of the present application.
Claims (10)
1. A firmware upgrading method is applied to a server in a server cluster, and comprises the following steps:
the server is used as the first server to be upgraded in the server cluster, when an external upgrade command is detected, a firmware upgrade package is obtained and firmware corresponding to the firmware upgrade package on the server is upgraded, after the firmware upgrade is successful, if the upgrade of other servers in the server cluster is determined to be triggered according to the firmware upgraded successfully, firmware upgrade information associated with the firmware upgraded successfully in the server is sent to other servers in the server cluster so as to control other servers in the server cluster to perform corresponding firmware upgrade according to the firmware upgrade information; the firmware upgrade information at least includes: the storage address of the firmware upgrade package, and the upgrade reference parameter for determining whether to trigger firmware upgrade; or,
the server is used as a non-first server for upgrading in the server cluster, and when firmware upgrading information sent by other servers in the server cluster is received, if firmware upgrading on the server is determined to be triggered according to upgrading reference parameters in the firmware upgrading information, a firmware upgrading packet is obtained according to a storage address of a firmware upgrading packet in the firmware upgrading information, and firmware corresponding to the firmware upgrading packet on the server is upgraded.
2. The method of claim 1, wherein the determining to trigger the upgrade of other servers in the server cluster according to the successfully upgraded firmware comprises:
receiving an upgrading controllable instruction sent by external equipment; the upgrade controllable instruction is used for representing a detection result of the external device, and the detection result includes: the new firmware version of the firmware which is successfully upgraded is compatible with the server, or the new firmware version of the firmware which is successfully upgraded is incompatible with the server;
and when the new firmware version of the firmware which is successfully upgraded and indicated by the upgrade controllable instruction is identified to be compatible with the server, determining to trigger the upgrade of other servers in the server cluster.
3. The method according to claim 1, wherein sending firmware upgrade information associated with the firmware that is successfully upgraded in the local server to other servers in the server cluster comprises:
carrying the firmware upgrading information in a Link Layer Discovery Protocol (LLDP) message; a TLV field carrying firmware upgrading information is newly added to the LLDP message;
and sending the LLDP message carrying the firmware upgrading information in the server cluster, so that other servers in the server cluster receive the LLDP message.
4. The method according to claim 1 or 3, wherein the upgrade reference parameter comprises an upgrade time, a firmware version number, a firmware name of a first server in the server cluster to be upgraded;
if the latest upgrade time recorded locally by the server is earlier than the upgrade time included by the upgrade reference parameter, and the current firmware version number of the firmware corresponding to the firmware name in the server is different from the firmware version number included by the upgrade reference parameter, determining to trigger the firmware upgrade, otherwise, determining not to trigger the firmware upgrade.
5. The method of claim 1 or 3, wherein the firmware upgrade information further comprises: a server identifier of a first server to be upgraded in the server cluster; the server identification is used for positioning a source when abnormality occurs in the upgrading process of a non-first server for upgrading in the server cluster.
6. The method of claim 1, further comprising:
the server obtains and stores structure data defined by the outside for each firmware upgraded after each firmware is upgraded, the structure data is used for determining the firmware version restored when the server restores the firmware version, and the structure data at least comprises: firmware version storage information, firmware version information, and description information of the firmware version.
7. A firmware upgrading device is applied to a server in a server cluster, and comprises:
the upgrading management unit is used for acquiring a firmware upgrading packet and sending a first upgrading message to the upgrading unit when an external upgrading command is detected when the server is used as the first server for upgrading in the server cluster, and after the upgrading unit successfully upgrades the firmware, if the upgrading of other servers in the server cluster is determined to be triggered according to the successfully upgraded firmware, the firmware upgrading information associated with the successfully upgraded firmware in the server is sent to other servers in the server cluster so as to control the other servers in the server cluster to carry out corresponding firmware upgrading according to the firmware upgrading information; the firmware upgrade information at least includes: the storage address of the firmware upgrade package, and the upgrade reference parameter for determining whether to trigger firmware upgrade; or, when the server is used as a non-first server in the server cluster for upgrading, and when firmware upgrading information sent by other servers in the server cluster is received, if firmware upgrading on the server is determined to be triggered according to upgrading reference parameters in the firmware upgrading information, acquiring a firmware upgrading packet according to a storage address of the firmware upgrading packet in the firmware upgrading information and sending a second upgrading message to an upgrading unit;
and the upgrading unit is used for upgrading the firmware corresponding to the firmware upgrading packet on the server when the first upgrading message or the second upgrading message is received.
8. The apparatus of claim 7, wherein the determining, by the upgrade management unit, to trigger the upgrade of other servers in the server cluster according to the firmware that is successfully upgraded includes:
receiving an upgrading controllable instruction sent by external equipment; the upgrade controllable instruction is used for representing a detection result of the external device, and the detection result includes: the new firmware version of the firmware which is successfully upgraded is compatible with the server, or the new firmware version of the firmware which is successfully upgraded is incompatible with the server;
and when the new firmware version of the firmware which is successfully upgraded and indicated by the upgrade controllable instruction is identified to be compatible with the server, determining to trigger the upgrade of other servers in the server cluster.
9. The apparatus of claim 7, wherein the upgrade management unit upgrade reference parameter comprises an upgrade time, a firmware version number, and a firmware name of a first server in the server cluster to be upgraded;
if the latest upgrade time recorded locally by the server is earlier than the upgrade time included by the upgrade reference parameter, and the current firmware version number of the firmware corresponding to the firmware name in the server is different from the firmware version number included by the upgrade reference parameter, determining to trigger the firmware upgrade, otherwise, determining not to trigger the firmware upgrade.
10. The apparatus of claim 7, further comprising:
an information storage unit: the method is used for the server to obtain and store the structure data which is customized for each firmware upgraded externally after each firmware is upgraded, the structure data is used for determining the firmware version to be restored when the server restores the firmware version, and the structure data at least comprises the following steps: firmware version storage information, firmware version information, and description information of the firmware version.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111109169.7A CN113872803A (en) | 2021-09-22 | 2021-09-22 | Firmware upgrading method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111109169.7A CN113872803A (en) | 2021-09-22 | 2021-09-22 | Firmware upgrading method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113872803A true CN113872803A (en) | 2021-12-31 |
Family
ID=78993104
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111109169.7A Withdrawn CN113872803A (en) | 2021-09-22 | 2021-09-22 | Firmware upgrading method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113872803A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180024842A1 (en) * | 2015-09-24 | 2018-01-25 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Power adapter and method for upgrading the power adapter |
CN108268266A (en) * | 2016-12-29 | 2018-07-10 | 中移(苏州)软件技术有限公司 | A kind of upgrade method and device |
-
2021
- 2021-09-22 CN CN202111109169.7A patent/CN113872803A/en not_active Withdrawn
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180024842A1 (en) * | 2015-09-24 | 2018-01-25 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Power adapter and method for upgrading the power adapter |
CN108268266A (en) * | 2016-12-29 | 2018-07-10 | 中移(苏州)软件技术有限公司 | A kind of upgrade method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106549789B (en) | Method and system for realizing server installation | |
CN108108255A (en) | The detection of virtual-machine fail and restoration methods and device | |
CN111026581A (en) | Application program repairing method, device, system, storage medium and electronic device | |
CN100583787C (en) | Data check method, device and system | |
CN111917588A (en) | Edge device management method, device, edge gateway device and storage medium | |
CN112732412B (en) | Service configuration file processing method and device, storage medium and electronic equipment | |
CN111342986B (en) | Distributed node management method and device, distributed system and storage medium | |
CN114697191A (en) | Resource migration method, device, equipment and storage medium | |
US12088509B2 (en) | Default gateway management method, gateway manager, server, and storage medium | |
CN112214413B (en) | Application program testing method, device, equipment and storage medium | |
CN114327536A (en) | Server operation and maintenance method, device, equipment and storage medium | |
CN113872803A (en) | Firmware upgrading method and device | |
CN114598604B (en) | Monitoring method, monitoring device and terminal for virtual network function instance information | |
CN115904773A (en) | Memory fault information collection method and device and storage medium | |
CN100484038C (en) | Network element version switching method and device | |
CN112394960B (en) | Control method and device for service flow, electronic equipment and computer storage medium | |
CN115473793B (en) | Automatic recovery method, device, terminal and medium for cluster EI host environment | |
CN116723075A (en) | Equipment management method, device and substrate management controller | |
CN117376194B (en) | Network detection method, system, electronic device and computer readable storage medium | |
CN117215859B (en) | Main and standby BIOS automatic switching method, automatic switching device and computer | |
CN112887118B (en) | VNF information acquisition and control method and device, NFVO, VNFM and storage medium | |
CN116010248A (en) | Test environment deployment method, system, device, electronic equipment and medium | |
CN109683924B (en) | Application software upgrading method, system, equipment and computer readable storage medium | |
CN116610379A (en) | Method and device for starting pcsd service | |
CN116048571A (en) | Software upgrading method, device, distributed equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20211231 |