CN116795423A - Firmware version compatibility management method and device, computer equipment and storage medium - Google Patents

Firmware version compatibility management method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN116795423A
CN116795423A CN202310841110.XA CN202310841110A CN116795423A CN 116795423 A CN116795423 A CN 116795423A CN 202310841110 A CN202310841110 A CN 202310841110A CN 116795423 A CN116795423 A CN 116795423A
Authority
CN
China
Prior art keywords
firmware
target
line card
version
firmware version
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.)
Pending
Application number
CN202310841110.XA
Other languages
Chinese (zh)
Inventor
张锡鑫
陈翔
张连聘
李昭星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310841110.XA priority Critical patent/CN116795423A/en
Publication of CN116795423A publication Critical patent/CN116795423A/en
Pending legal-status Critical Current

Links

Classifications

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

Abstract

The present disclosure relates to firmware version compatibility management methods, apparatuses, computer devices, and storage media. The method comprises the following steps: acquiring a line card type of a target line card and a reference firmware version of a logic device of the target line card, wherein the target line card comprises first firmware corresponding to the reference firmware version; matching the reference firmware version with a preset compatibility list in the machine frame, and determining whether the reference firmware version exists in the preset compatibility list, wherein the preset compatibility list comprises a plurality of target firmware versions which can be compatible with the machine frame; according to the matching result, determining a target channel for loading the first firmware or according to the matching result and the line card type, determining a target channel for loading the first firmware; and initializing the target line card based on the target channel to realize version management of the reference firmware version. The problem that the conventional frame type switch cannot flexibly adjust the firmware compatibility version when managing the firmware compatibility of the line card and the machine frame is solved.

Description

Firmware version compatibility management method and device, computer equipment and storage medium
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a firmware version compatibility management method, a device, computer equipment and a storage medium.
Background
The frame switch refers to a switch that combines a plurality of interface modules within a chassis. The number of ports and different types of interface modules can be selected according to the needs, the expansibility is good, and the number of ports is large. These interface modules may be collectively referred to as line cards.
For a frame switch in a data center, service backup or migration can be performed by plugging a line card, in a normal service scene, because of different equipment deployment batches, requirements and states, the plugging of the line card is likely to be different from an original frame due to the fact that the plugged line card is different from the original frame, and therefore, the frame reference firmware version is different from the line card reference firmware version, and if the reference firmware version is different and cannot be normally compatible, service is likely to be interrupted for a long time, and the operation stability of the data center is likely to be affected. The firmware here refers generally to firmware of an underlying logic device such as a CPLD (Complex Programmable Logic Device, programmable logic device) or an FPGA (Field Programmable Gate Array, programmable gate array), and their compatibility affects the operation of the whole machine.
Therefore, when the conventional frame switch manages the firmware compatibility of the line card and the machine frame, the firmware compatibility version cannot be flexibly adjusted, the service operation is affected, and the data loss risk of the data center is increased.
Disclosure of Invention
In view of this, the present disclosure provides a method, an apparatus, a computer device, and a storage medium for managing firmware version compatibility, so as to solve the problem that when a conventional frame switch manages firmware compatibility between a line card and a machine frame, the firmware compatibility version cannot be flexibly adjusted, service operation is affected, and a data loss risk of a data center is increased.
In a first aspect, the present disclosure provides a firmware version compatibility management method, the method including:
acquiring a line card type of a target line card and a reference firmware version of a logic device of the target line card, wherein the target line card comprises first firmware corresponding to the reference firmware version;
matching the reference firmware version with a preset compatibility list in the machine frame, and determining whether the reference firmware version exists in the preset compatibility list, wherein the preset compatibility list comprises a plurality of target firmware versions which can be compatible with the machine frame;
according to the matching result, determining a target channel for loading the first firmware or according to the matching result and the line card type, determining a target channel for loading the first firmware;
and initializing the target line card based on the target channel to realize version management of the reference firmware version.
In the embodiment of the disclosure, a preset compatibility list containing a plurality of target firmware versions compatible with a machine frame is arranged in the machine frame, the preset compatibility list is used for matching the reference firmware version of a logic device of a target line card, and a target channel for initializing and loading the target line card is determined according to a matching result or a line card type of the target line card, so that version management of the reference firmware version of the target line card is realized, the situation that the line card is not available due to incompatibility of the reference firmware version of the target line card is prevented, flexible management of the reference firmware version of the target line card is realized, the running reliability and stability of the whole data center network are improved, the risk of service loss caused by initializing the target line card is prevented, and the problems that the conventional frame switch cannot flexibly adjust the firmware compatibility version, influence service operation and increase the data loss risk of a data center when managing the firmware compatibility of the line card and the machine frame are solved.
In an alternative embodiment, determining a target channel for loading the first firmware according to the matching result includes:
if the reference firmware version is matched with any target firmware version, determining that the reference firmware version exists in a preset compatibility list;
and taking the first channel as a target channel, and loading the first firmware, wherein the first channel is an original channel when the logic device of the target line card supports loading the firmware.
In the embodiment of the disclosure, if the reference firmware version exists in the preset compatibility list, it is indicated that the firmware version between the target line card and the machine frame has compatibility, and then the first firmware is loaded by using the original channel when the firmware is loaded, so that the data processing process is saved.
In an alternative embodiment, determining a target channel for loading the first firmware according to the matching result and the line card type includes:
if the reference firmware version is not matched with any target firmware version, determining that the reference firmware version does not exist in the preset compatibility list;
and determining a target channel for loading the first firmware according to the existing version of the local storage of the frame and the type of the line card.
In the embodiment of the disclosure, if the reference firmware version does not exist in the preset compatibility list, it is indicated that the firmware version between the target line card and the machine frame does not have compatibility, and the loaded target channel is obtained according to the existing version stored locally in the machine frame and the line card type, so that the service interruption time is reduced.
In an alternative embodiment, determining a target channel for loading the first firmware according to an existing version of the local storage of the frame and the line card type includes:
acquiring an applicable relation between an existing version locally stored in a machine frame and a line card type;
and under the condition that the existing version is suitable for the line card type, loading the first firmware by taking the second channel as a target channel, wherein the second channel is a channel for supporting loading of the second firmware for a logic device on the machine frame, and the second firmware is the firmware with the firmware version contained in the machine frame being the target firmware version.
In the embodiment of the disclosure, when an incompatible target line card is encountered, the method can adapt to the type of the line card according to the existing version stored locally in the machine frame, and under the condition of adaptation, the logic device on the machine frame supports loading the second firmware to load the first firmware through the channel for loading the second firmware, so that the normal operation of the subsequent service can be realized.
In an alternative embodiment, after obtaining the correspondence between the existing version stored locally in the subrack and the line card type, the method further includes:
acquiring user configuration information under the condition that the existing version is not suitable for the type of the line card;
and loading the first firmware by taking the second channel as a target channel according to the user configuration information, or stopping initializing the target line card according to the user configuration information.
In the embodiment of the disclosure, when an incompatible target line card is encountered, the method can adapt to the type of the line card according to the existing version stored locally in the machine frame, and under the condition of the incompatibility, the configuration information set by the user is acquired to further determine the loading target channel, and if the reference firmware version is completely unusable or compatible, the target line card can be prevented from entering an initialization flow, and service loss caused by initialization of the target line card is prevented.
In an alternative embodiment, loading the first firmware by taking the second channel as a target channel according to the user configuration information includes:
determining whether the reference firmware version of the target line card is allowed to be automatically adjusted to the target firmware version according to the user configuration information;
if so, judging whether the existing version in the machine frame contains the target firmware version or not;
the method comprises the steps that if an existing version in a machine frame does not contain a target firmware version, the target firmware version is obtained from a version server through a network;
and switching the target channel to the second channel, and loading the first firmware based on the second channel.
In the embodiment of the disclosure, if the user configuration information sets that the reference firmware version is allowed to be automatically adjusted to the target firmware version, the firmware version of the logic device on the storage medium of the machine frame can be updated more quickly, so that the service interruption time caused by updating is reduced.
In an alternative embodiment, stopping initializing the target line card according to the user configuration information includes:
determining whether the reference firmware version of the target line card is allowed to be automatically adjusted to the target firmware version according to the user configuration information;
if not, stopping initializing the target line card.
In the embodiment of the disclosure, if the user configuration information sets that the reference firmware version is not allowed to be automatically adjusted, the reference firmware version which cannot be used or is compatible is present, so that the target line card can be prevented from entering an initialization flow, and service loss caused by initializing the target line card is prevented.
In a second aspect, the present disclosure provides a firmware version compatibility management apparatus, the apparatus comprising:
the first acquisition module is used for acquiring the line card type of the target line card and the reference firmware version of the logic device of the target line card, wherein the target line card comprises first firmware corresponding to the reference firmware version;
the matching module is used for matching the reference firmware version with a preset compatibility list in the machine frame to determine whether the reference firmware version exists in the preset compatibility list, wherein the preset compatibility list comprises a plurality of target firmware versions which can be compatible with the machine frame;
the determining module is used for determining a target channel for loading the first firmware according to the matching result or determining the first firmware according to the matching result and the line card type;
and the initialization module is used for initializing the target line card based on the target channel and realizing version management of the reference firmware version.
In a third aspect, the present disclosure provides a computer device comprising: the memory and the processor are in communication connection with each other, the memory stores computer instructions, and the processor executes the computer instructions, thereby executing the firmware version compatibility management method according to the first aspect or any implementation manner corresponding to the first aspect.
In a fourth aspect, the present disclosure provides a computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the firmware version compatibility management method of the first aspect or any of the embodiments corresponding thereto.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the prior art, the drawings that are required in the detailed description or the prior art will be briefly described, it will be apparent that the drawings in the following description are some embodiments of the present disclosure, and other drawings may be obtained according to the drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a flow diagram of a firmware version compatibility management method according to an embodiment of the present disclosure;
FIG. 2 is a hardware configuration diagram of firmware version compatibility management according to an embodiment of the present disclosure;
FIG. 3 is an overall flow diagram of firmware version compatibility management according to an embodiment of the present disclosure;
FIG. 4 is a block diagram of a firmware version compatibility management apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person skilled in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
When the conventional frame switch manages the firmware compatibility of the line card and the machine frame, if the firmware versions are different and cannot be normally compatible, the firmware compatibility versions cannot be flexibly adjusted to adapt to the compatibility between the firmware versions, and finally, the service is interrupted for a long time, so that the operation stability of the data center is affected. In order to solve the above-described problems, according to an embodiment of the present disclosure, there is provided a firmware version compatibility management method embodiment, it is to be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different from that herein.
In this embodiment, a firmware version compatibility management method is provided, fig. 1 is a flowchart of a firmware version compatibility management method according to an embodiment of the present disclosure, and as shown in fig. 1, the method may be applied to a white box frame switch side, for example, a compatibility management process of the white box frame switch is taken as an execution main body, where the white box frame switch is a device that combines a white box switch and a frame switch, where the white box switch is a flexible and efficient network device, and a user may deploy different applications and services with personalized features on the same hardware system as required. The method has the function of decoupling software, can reduce cost and improve use flexibility, builds different components and modules for special requirements of manufacturers, and is widely applied to large-scale data centers. The biggest bright spot of the white box switch is the strong openness, so the white box switch has richer choices in terms of operating systems, software and the like compared with the traditional switch.
SONIC is one of the currently popular white-box switches NOS, SONIC can be regarded as a software set for constructing functions required by network equipment (such as switches), and a large amount of existing open source projects, open source technologies, automatic configuration tools and the like are used, so that the method has the advantages of extremely strong expansibility and network operation and maintenance, and can be very conveniently used for realizing non-stop deployment or upgrading application in a production environment.
Specifically, in fig. 1, the flow of the method includes the following steps:
step S101, obtaining a line card type of a target line card and a reference firmware version of a logic device of the target line card, where the target line card includes a first firmware corresponding to the reference firmware version.
Optionally, in the white box-frame switch, linux is used as an operating system, and a monitoring program in the system is written in a language C or python, and is monitored and processed by using process management software commonly used in Linux.
As shown in fig. 2, fig. 2 is a schematic diagram of a hardware configuration of firmware version compatibility management according to an embodiment of the present disclosure, a line card uses a CPLD of a common model as a logic device, a reference firmware version on a target line card is stored in a storage medium inside the CPLD itself, and a firmware version provided for loading and starting of the CPLD of the target line card is stored in an SPI Flash on a board of the machine frame on the machine frame, and is connected with the CPLD of the line card through an SPI bus. In addition, a preset compatibility list (all stored in the machine frame are target firmware versions compatible with the machine frame, and fig. 2 is called a standby version) is stored in a nonvolatile storage medium used by the machine frame NOS.
Therefore, when the compatibility management process of the white box switch detects that a new line card, such as a target line card, is inserted, the line card type of the target line card and the firmware version of the logic device of the target line card are acquired, which is referred to herein as a reference firmware version. Meanwhile, a first firmware is arranged in the target line card, the firmware version of the first firmware is a reference firmware version, and the firmware version of the first firmware is actually upgraded or downgraded in subsequent firmware version management.
Step S102, matching the reference firmware version with a preset compatibility list in the machine frame, and determining whether the reference firmware version exists in the preset compatibility list, wherein the preset compatibility list comprises a plurality of target firmware versions which can be compatible with the machine frame.
Optionally, after the reference firmware version is read by the compatibility management process, the reference firmware version is matched with a plurality of target firmware versions which are stored in a preset compatibility list in the machine frame and can be compatible with the machine frame, and then whether the reference firmware version exists in the preset compatibility list is determined.
It will be appreciated that the criteria for determining whether the reference firmware version exists in the predetermined compatibility list is to check whether the reference firmware version is any target firmware version.
Step S103, determining a target channel for loading the first firmware according to the matching result or determining the target channel for loading the first firmware according to the matching result and the line card type.
Optionally, as can be seen from the above, the criterion for determining whether the reference firmware version exists in the preset compatibility list is to check whether the reference firmware version is any target firmware version, and a matching result is obtained. And then obtaining a loading target channel of the first firmware according to the matching result. In addition, when the loading target channel cannot be obtained only through the matching result, the loading target channel is obtained by combining the matching result with the line card type of the target line card.
Step S104, initializing the target line card based on the target channel to realize the version management of the reference firmware version.
Optionally, after the loaded target channel is obtained, the target line card can be initialized, so that upgrade or downgrade management of the first firmware is realized, and compatibility of the upgraded or downgraded reference firmware version is adapted to the frame.
In the embodiment of the disclosure, a preset compatibility list containing a plurality of target firmware versions compatible with a machine frame is arranged in the machine frame, the preset compatibility list is used for matching the reference firmware version of a logic device of a target line card, and a target channel for initializing and loading the target line card is determined according to a matching result or a line card type of the target line card, so that version management of the reference firmware version of the target line card is realized, the situation that the line card is not available due to incompatibility of the reference firmware version of the target line card is prevented, flexible management of the reference firmware version of the target line card is realized, the running reliability and stability of the whole data center network are improved, the risk of service loss caused by initializing the target line card is prevented, and the problems that the conventional frame switch cannot flexibly adjust the firmware compatibility version, influence service operation and increase the data loss risk of a data center when managing the firmware compatibility of the line card and the machine frame are solved.
In some alternative embodiments, determining a target channel for loading the first firmware according to the matching result includes:
if the reference firmware version is matched with any target firmware version, determining that the reference firmware version exists in a preset compatibility list;
and taking the first channel as a target channel, and loading the first firmware, wherein the first channel is an original channel when the logic device of the target line card supports loading the firmware.
Optionally, if the reference firmware version is matched with the target firmware version and the reference firmware version is matched with the target firmware version, it is indicated that the reference firmware version exists in the preset compatibility list, and then the logic device of the target line card is utilized to support the original channel when loading the firmware, and the target line card is directly transferred to the line card initialization process, and initialization is started.
In the embodiment of the disclosure, if the reference firmware version exists in the preset compatibility list, it is indicated that the firmware version between the target line card and the machine frame has compatibility, and then the first firmware is loaded by using the original channel when the firmware is loaded, so that the data processing process is saved.
In some optional embodiments, determining a target channel for loading the first firmware according to the matching result and the line card type includes:
if the reference firmware version is not matched with any target firmware version, determining that the reference firmware version does not exist in the preset compatibility list;
and determining a target channel for loading the first firmware according to the existing version of the local storage of the frame and the type of the line card.
Optionally, if the reference firmware version matches the target firmware version, when the reference firmware version is not matched with the target firmware version, the reference firmware version is not in the preset compatibility list, and the line card type of the target line card is checked, that is, the CPLD firmware version of the target line card is checked, whether the existing SPI Flash version in the self frame can be provided for the line card of the type or not is determined, and then a target channel for loading the first firmware is determined.
In the embodiment of the disclosure, if the reference firmware version does not exist in the preset compatibility list, it is indicated that the firmware version between the target line card and the machine frame does not have compatibility, and the loaded target channel is obtained according to the existing version stored locally in the machine frame and the line card type, so that the service interruption time is reduced.
In some alternative embodiments, determining a target channel for loading the first firmware based on the existing version of the local storage of the subrack and the line card type includes:
acquiring an applicable relation between an existing version locally stored in a machine frame and a line card type;
and under the condition that the existing version is suitable for the line card type, loading the first firmware by taking the second channel as a target channel, wherein the second channel is a channel for supporting loading of the second firmware for a logic device on the machine frame, and the second firmware is the firmware with the firmware version contained in the machine frame being the target firmware version.
Optionally, determining the application relation between the existing SPI Flash version in the machine frame and the line card type, writing the SPI Flash version into a CPLD register generally managed by the machine frame when the existing SPI Flash version is applicable to the line card type, switching the reference version of the target line card, namely the CPLD firmware loading source, to a second channel for supporting loading the second firmware by a logic device on the machine frame, and then transferring the line card initialization process to initialize the target line card.
In the embodiment of the disclosure, when an incompatible target line card is encountered, the method can adapt to the type of the line card according to the existing version stored locally in the machine frame, and under the condition of adaptation, the logic device on the machine frame supports loading the second firmware to load the first firmware through the channel for loading the second firmware, so that the normal operation of the subsequent service can be realized.
In some optional embodiments, after obtaining the correspondence between the existing version stored locally by the subrack and the line card type, the method further includes:
acquiring user configuration information under the condition that the existing version is not suitable for the type of the line card;
and loading the first firmware by taking the second channel as a target channel according to the user configuration information, or stopping initializing the target line card according to the user configuration information.
Optionally, when the existing SPI Flash version of the machine frame is suitable for the line card type, a compatibility management process is required to check the user configuration to see whether the user configuration allows the target line card to automatically upgrade the firmware to the compatible version when the target line card is inserted, so as to obtain a target channel for loading the first firmware, or to stop initializing the target line card according to the user configuration information.
In the embodiment of the disclosure, when an incompatible target line card is encountered, the method can adapt to the type of the line card according to the existing version stored locally in the machine frame, and under the condition of the incompatibility, the configuration information set by the user is acquired to further determine the loading target channel, and if the reference firmware version is completely unusable or compatible, the target line card can be prevented from entering an initialization flow, and service loss caused by initialization of the target line card is prevented.
In some alternative embodiments, loading the first firmware with the second channel as the target channel according to the user configuration information includes:
determining whether the reference firmware version of the target line card is allowed to be automatically adjusted to the target firmware version according to the user configuration information;
if so, judging whether the existing version in the machine frame contains the target firmware version or not;
the method comprises the steps that if an existing version in a machine frame does not contain a target firmware version, the target firmware version is obtained from a version server through a network;
and switching the target channel to the second channel, and loading the first firmware based on the second channel.
Optionally, if the user configuration allows the target line card to automatically upgrade the reference firmware version to the compatible target firmware version when inserting, the compatibility management process first checks whether the CPLD firmware version available for the type of line card exists on the machine frame itself, if not, it can request downloading from the version server with the IP address stored in advance through the network (as in fig. 2, the machine frame is connected with an external server, and a standby version capable of realizing compatibility exists in the external server), after the target firmware version is obtained from the version server, upgrades the version in the SPI Flash in the machine frame by using the lossless switching transmission mode, upgrades the version to the target firmware version, then switches the first firmware loading source to the second channel on the machine frame for loading the second firmware, and enters the initialization flow.
The above is an upgrade procedure with reference to firmware versions. The degradation process also requires that the target firmware version is first obtained from the version server through the network, and the reason for incompatibility of the version of the reference firmware version with the target firmware version is that the version is too high, so that the reference firmware version needs to be degraded. And then degrading the version in the SPI Flash in the machine frame by using a lossless switching transmission mode, degrading the version to a target firmware version, switching a second channel for loading second firmware from a first firmware loading source to the machine frame, and entering a line card initialization flow.
It should be noted that, when the CPLD firmware version of the subrack is upgraded or downgraded, both the standby version in the preset compatibility list of the subrack in fig. 2 and the version stored in the SPI Flash in the subrack are upgraded or downgraded together. Meanwhile, a register is arranged in the overall management CPLD on the machine frame, so that the CPLD firmware of the target line card can be selected from which target channel to execute loading, and then an initialization flow is entered, and management of the CPLD firmware version of the target line card is realized.
In the embodiment of the disclosure, if the user configuration information sets that the reference firmware version is allowed to be automatically adjusted to the target firmware version, the firmware version of the logic device on the storage medium of the machine frame can be updated more quickly, so that the service interruption time caused by updating is reduced.
In some optional embodiments, stopping initializing the target line card according to the user configuration information includes:
determining whether the reference firmware version of the target line card is allowed to be automatically adjusted to the target firmware version according to the user configuration information;
if not, stopping initializing the target line card.
Optionally, if the user configuration does not allow the target line card to automatically upgrade the reference firmware version to the compatible target firmware version during insertion, the target line card is prevented from entering the initialization process, and the target line card error indicator light may be turned on to prompt the user to replace the target line card, and meanwhile, the information that the insertion of the target line card is refused is recorded in the NOS.
In the embodiment of the disclosure, if the user configuration information sets that the reference firmware version is not allowed to be automatically adjusted, the reference firmware version which cannot be used or is compatible is present, so that the target line card can be prevented from entering an initialization flow, and service loss caused by initializing the target line card is prevented.
In some alternative implementations, as shown in fig. 3, fig. 3 is an overall flow diagram of firmware version compatibility management according to an embodiment of the disclosure, and the specific flow is as follows:
starting;
checking the firmware version of the machine frame logic device, and recording the version;
checking a preset compatibility list stored in a machine frame, and recording supported versions;
judging whether a new line card is inserted;
if yes, determining whether the new line card firmware version is compatible with the machine frame version; if no new line card is inserted, continuing to judge whether the new line card is inserted;
directly initializing the line card when the new line card firmware version is determined to be compatible with the machine frame version; if the new line card firmware version is not compatible with the machine frame version, judging whether the line card version of the machine frame is available or not;
when the line card version of the machine frame is available, switching the firmware loading source to be the machine frame and initializing the line card; when the line card version of the machine frame is unavailable, judging whether the line card is allowed to be automatically upgraded;
when the line card cannot be automatically upgraded, prompting that the line card is unavailable and recording the line card to a log; when the line card can be automatically upgraded, judging whether a standby version exists in the machine frame;
if the machine frame memory has a standby version, upgrading the firmware version of the line card logic device on the machine frame; if the standby version does not exist in the machine frame, the standby firmware version is obtained from the local area network remote server, then the firmware version of the line card logic device on the machine frame is updated, the loading source of the firmware is switched to be the machine frame, and the line card is initialized.
The embodiment also provides a firmware version compatibility management device, which is used for implementing the above embodiment and the preferred implementation, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a firmware version compatibility management apparatus, as shown in fig. 4, including:
a first obtaining module 401, configured to obtain a line card type of a target line card and a reference firmware version of a logic device of the target line card, where the target line card includes first firmware corresponding to the reference firmware version;
the matching module 402 is configured to match the reference firmware version with a preset compatibility list in the machine frame, and determine whether the reference firmware version exists in the preset compatibility list, where the preset compatibility list includes a plurality of target firmware versions that are compatible with the machine frame;
a determining module 403, configured to determine, according to the matching result, a target channel for loading the first firmware or determine, according to the matching result and the line card type, a target channel for loading the first firmware;
and the initialization module 404 is configured to initialize the target line card based on the target channel, and implement version management of the reference firmware version.
In some alternative embodiments, the determining module 403 includes:
the first determining unit is used for determining that the reference firmware version exists in the preset compatibility list if the reference firmware version is matched with any target firmware version;
the first loading unit is used for taking the first channel as a target channel and loading the first firmware, wherein the first channel is an original channel when the logic device of the target line card supports loading the firmware.
In some alternative embodiments, the determining module 403 includes:
the second determining unit is used for determining that the reference firmware version does not exist in the preset compatibility list if the reference firmware version is not matched with any target firmware version;
and the second loading unit is used for determining a target channel for loading the first firmware according to the existing version locally stored in the machine frame and the type of the line card.
In some alternative embodiments, the second loading unit includes:
the acquisition submodule is used for acquiring the applicable relation between the existing version locally stored in the machine frame and the line card type;
and the loading sub-module is used for loading the first firmware by taking the second channel as a target channel under the condition that the existing version is suitable for the line card type, wherein the second channel supports the channel for loading the second firmware for a logic device on the machine frame, and the second firmware is the firmware with the firmware version contained in the machine frame being the target firmware version.
In some alternative embodiments, the apparatus further comprises:
the second acquisition module is used for acquiring the user configuration information under the condition that the existing version and the line card type are not applicable after acquiring the corresponding relation between the existing version stored locally by the machine frame and the line card type;
and the processing module is used for loading the first firmware by taking the second channel as a target channel according to the user configuration information or stopping initializing the target line card according to the user configuration information.
In some alternative embodiments, the processing module includes:
the third determining unit is used for determining whether the reference firmware version of the target line card is allowed to be automatically adjusted to the target firmware version according to the user configuration information;
the judging unit is used for judging whether the existing version in the machine frame contains the target firmware version if the version is allowed;
the obtaining unit is used for obtaining the target firmware version from the version server through the network if the target firmware version is not contained in the existing version in the machine frame;
the replacing unit is used for replacing the firmware version in the machine frame based on the target firmware version;
and the switching unit is used for switching the target channel to the second channel and loading the first firmware based on the second channel.
In some alternative embodiments, the processing module includes:
a fourth determining unit, configured to determine, according to the user configuration information, whether the reference firmware version of the target line card allows automatic adjustment to the target firmware version;
and the stopping unit is used for stopping initializing the target line card if the target line card is not allowed.
The firmware version compatibility management means in this embodiment are presented in the form of functional units, where the units refer to ASIC circuits, processors and memories executing one or more software or firmware programs, and/or other devices that can provide the functionality described above.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The embodiment of the disclosure also provides a computer device, which is provided with the firmware version compatibility management device shown in the figure 4.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a computer device according to an alternative embodiment of the disclosure, as shown in fig. 5, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 5.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods shown in implementing the above embodiments.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created from the use of the computer device of the presentation of a sort of applet landing page, and the like. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The presently disclosed embodiments also provide a computer readable storage medium, and the methods described above according to the presently disclosed embodiments may be implemented in hardware, firmware, or as recordable storage medium, or as computer code downloaded over a network that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and is to be stored in a local storage medium, such that the methods described herein may be stored on such software processes on a storage medium using a general purpose computer, special purpose processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present disclosure have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the disclosure, and such modifications and variations are within the scope defined by the appended claims.

Claims (10)

1. A method for firmware version compatibility management, the method comprising:
acquiring a line card type of a target line card and a reference firmware version of a logic device of the target line card, wherein the target line card comprises first firmware corresponding to the reference firmware version;
matching the reference firmware version with a preset compatibility list in a machine frame, and determining whether the reference firmware version exists in the preset compatibility list, wherein the preset compatibility list comprises a plurality of target firmware versions which can be compatible with the machine frame;
according to the matching result, determining a target channel for loading the first firmware or according to the matching result and the line card type, determining a target channel for loading the first firmware;
and initializing the target line card based on the target channel to realize version management of the reference firmware version.
2. The method of claim 1, wherein the determining a target channel for loading the first firmware based on the matching result comprises:
if the reference firmware version is matched with any target firmware version, determining that the reference firmware version exists in the preset compatibility list;
and loading the first firmware by taking the first channel as the target channel, wherein the first channel is an original channel when the logic device of the target line card supports loading the firmware.
3. The method of claim 1, wherein the determining a target channel for loading the first firmware according to the matching result and the line card type comprises:
if the reference firmware version is not matched with any target firmware version, determining that the reference firmware version does not exist in the preset compatibility list;
and determining the target channel for loading the first firmware according to the existing version locally stored in the machine frame and the type of the line card.
4. The method of claim 3, wherein the determining the target channel to load the first firmware based on an existing version of a frame local store and the line card type comprises:
acquiring an applicable relation between an existing version locally stored in a machine frame and the line card type;
and under the condition that the existing version is suitable for the line card type, taking a second channel as the target channel, and loading the first firmware, wherein the second channel supports a channel for loading the second firmware for a logic device on a machine frame, and the second firmware is the firmware of which the firmware version contained in the machine frame is the target firmware version.
5. The method of claim 4, wherein after the obtaining the correspondence between the existing version stored locally by the subrack and the line card type, the method further comprises:
acquiring user configuration information under the condition that the existing version is not applicable to the line card type;
and loading the first firmware by taking the second channel as the target channel according to the user configuration information, or stopping initializing the target line card according to the user configuration information.
6. The method of claim 5, wherein loading the first firmware with the second channel as the target channel according to the user configuration information comprises:
determining whether the reference firmware version of the target line card allows automatic adjustment to the target firmware version according to the user configuration information;
if so, judging whether the existing version in the machine frame contains the target firmware version or not;
the target firmware version is obtained from a version server through a network if the target firmware version is not contained in the existing version in the machine frame;
based on the target firmware version, realizing replacement of the firmware version in the machine frame;
and switching the target channel to the second channel, and loading the first firmware based on the second channel.
7. The method of claim 5, wherein the ceasing initializing the target line card based on the user configuration information comprises:
determining whether the reference firmware version of the target line card allows automatic adjustment to the target firmware version according to the user configuration information;
and if not, stopping initializing the target line card.
8. A firmware version compatibility management apparatus, the apparatus comprising:
the first acquisition module is used for acquiring the line card type of a target line card and a reference firmware version of a logic device of the target line card, wherein the target line card comprises first firmware corresponding to the reference firmware version;
the matching module is used for matching the reference firmware version with a preset compatibility list in the machine frame and determining whether the reference firmware version exists in the preset compatibility list, wherein the preset compatibility list comprises a plurality of target firmware versions which can be compatible with the machine frame;
the determining module is used for determining a target channel for loading the first firmware according to a matching result or determining a target channel for loading the first firmware according to the matching result and the line card type;
and the initialization module is used for initializing the target line card based on the target channel and realizing version management of the reference firmware version.
9. A computer device, comprising:
a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the firmware version compatibility management method of any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the firmware version compatibility management method of any one of claims 1 to 7.
CN202310841110.XA 2023-07-10 2023-07-10 Firmware version compatibility management method and device, computer equipment and storage medium Pending CN116795423A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310841110.XA CN116795423A (en) 2023-07-10 2023-07-10 Firmware version compatibility management method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310841110.XA CN116795423A (en) 2023-07-10 2023-07-10 Firmware version compatibility management method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116795423A true CN116795423A (en) 2023-09-22

Family

ID=88049609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310841110.XA Pending CN116795423A (en) 2023-07-10 2023-07-10 Firmware version compatibility management method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116795423A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117579679A (en) * 2024-01-15 2024-02-20 海马云(天津)信息技术有限公司 Signaling interaction method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117579679A (en) * 2024-01-15 2024-02-20 海马云(天津)信息技术有限公司 Signaling interaction method and device, electronic equipment and storage medium
CN117579679B (en) * 2024-01-15 2024-04-19 海马云(天津)信息技术有限公司 Signaling interaction method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US6836859B2 (en) Method and system for version control in a fault tolerant system
CN110347414A (en) Firmware update, device, equipment and computer readable storage medium
US8640118B2 (en) Managing firmware on a system board
US20070094489A1 (en) Embedded system that boots from USB flash drive
EP3518097B1 (en) Firmware updating method and electronic device using the same
US20030221092A1 (en) Method and system of switching between two or more images of firmware on a host device
CN104915226A (en) Network device software starting method, device and network device
US20030182411A1 (en) Method for updating and restoring operating software in an active region of a network element
US20120117557A1 (en) Method and system for upgrading wireless data card
CN104834575A (en) Firmware recovery method and device
CA2701491A1 (en) Firmware image update and management
US8117434B2 (en) Component configuration mechanism for rebooting
RU2602378C9 (en) Rack with plurality of rack control modules and method of updating firmware used for rack
CN116795423A (en) Firmware version compatibility management method and device, computer equipment and storage medium
CN110647333A (en) Firmware upgrading method and equipment configured to upgrade firmware therein
WO2011088701A1 (en) Method and device for online upgrading cross-platform version
CN101593120A (en) Be with outer upgrade method and system
CN110865831B (en) Method for improved automatic software update in deploying networked devices
CN112612524A (en) Method, device and equipment for starting Linux system and storage medium
CN110569053A (en) method for upgrading application chip in electronic equipment and electronic equipment
US8418163B2 (en) Stacked hardware abstraction layer methods for maintaining software/hardware backward compatibility
CN113190256B (en) Upgrading method, device and equipment
CN107844312A (en) A kind of software upgrading monitoring method and system
CN112015587B (en) Method and device for enhancing reliability of operating system
CN112162794A (en) Single board starting method, device, single board and network equipment

Legal Events

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