Protection method, system and storage medium during BMC upgrade

文档序号:1687259 发布日期:2020-01-03 浏览:18次 中文

阅读说明:本技术 一种bmc升级时的保护方法、系统及存储介质 (Protection method, system and storage medium during BMC upgrade ) 是由 江博 陈洪鑫 于 2019-09-20 设计创作,主要内容包括:本发明公开了一种BMC升级时的保护方法,应用于与BMC连接的控制器中,包括:接收BMC在收到升级指令之后发送的第一信号;在接收第一信号之后,关闭市电模块为BMC的供电,并控制预设的电池模块为BMC供电,以使BMC在电池模块供电下进行升级;在接收到BMC升级完成后发送的第二信号之后,关闭电池模块为BMC的供电,并控制市电模块为BMC供电。应用本申请的方案,有利于避免BMC升级时出现的BMC故障而导致BMC无法使用的情况。本申请还提供了一种BMC升级时的保护系统及存储介质,具有相应技术效果。(The invention discloses a protection method during BMC upgrade, which is applied to a controller connected with BMC and comprises the following steps: receiving a first signal sent by the BMC after receiving the upgrading instruction; after receiving the first signal, closing the mains supply module to supply power to the BMC, and controlling a preset battery module to supply power to the BMC so that the BMC is upgraded under the power supply of the battery module; and after receiving a second signal sent after upgrading of the BMC, turning off the power supply of the battery module to the BMC, and controlling the commercial power module to supply power to the BMC. By applying the scheme, the condition that the BMC cannot be used due to BMC fault during upgrading of the BMC is avoided. The application also provides a protection system and a storage medium during BMC upgrading, and the protection system and the storage medium have corresponding technical effects.)

1. A protection method for upgrading BMC is applied to a controller connected with BMC and comprises the following steps:

receiving a first signal sent by the BMC after receiving an upgrading instruction;

after receiving the first signal, closing a mains supply module to supply power to the BMC, and controlling a preset battery module to supply power to the BMC so that the BMC is upgraded under the power supply of the battery module;

after receiving a second signal sent after the BMC is upgraded, the battery module is turned off to supply power to the BMC, and the commercial power module is controlled to supply power to the BMC.

2. The method for protecting BMC during upgrading according to claim 1, wherein the battery module is a BBU (standby power supply unit) in a server.

3. The method for protecting BMC during upgrading according to claim 1, wherein the controller is a Complex Programmable Logic Device (CPLD).

4. The method for protecting BMC during upgrading according to claim 1, further comprising:

in the BMC operation process, when the electric quantity of the battery module is detected to be lower than a preset threshold value and the commercial power module normally operates, the battery module is charged.

5. A protection system during BMC upgrade, comprising:

the BMC is used for sending a first signal after receiving the upgrading instruction and sending a second signal after upgrading is finished;

the controller is connected with the BMC and is used for turning off a mains supply module to supply power to the BMC after receiving the first signal and controlling a preset battery module to supply power to the BMC so that the BMC is upgraded under the power supply of the battery module; after the second signal sent after upgrading of the BMC is received, the battery module is turned off to supply power to the BMC, and the commercial power module is controlled to supply power to the BMC;

the commercial power module is connected with the controller;

the battery module is connected with the controller.

6. The system for protecting when upgrading BMC according to claim 5, wherein the battery module is a BBU (backup power unit) in a server.

7. The system for protecting when upgrading a BMC according to claim 5, wherein the controller is a Complex Programmable Logic Device (CPLD).

8. The system for BMC upgrade time protection according to claim 5, wherein the controller is further configured to:

in the BMC operation process, when the electric quantity of the battery module is detected to be lower than a preset threshold value and the commercial power module normally operates, the battery module is charged.

9. A computer-readable storage medium for use in a controller connected to a BMC, the computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, performing the steps of the method for protecting a BMC during upgrade of a BMC according to any of claims 1-4.

Technical Field

The invention relates to the technical field of computers, in particular to a protection method, a protection system and a storage medium for BMC (baseboard management controller) upgrading.

Background

In the field of servers and storage controllers, BMC (Baseboard Management Controller) is an indispensable component. The BMC needs to handle a number of services such as IPMI functions, control management of temperature sensors, sensing voltage, fan control, etc.

The BMC may perform online upgrades over, for example, Centos-like systems, or firmware upgrades over the external network itself. When the BMC is upgraded, no exception usually occurs, even if the update fails due to signal quality and operation errors, the BMC can sense the errors and perform secondary update or report the errors after the errors are found.

However, in a few occasions, a BMC fault occurs during BMC upgrade, and the BMC cannot be used after the fault, and although the occurrence probability is low, in occasions with high stability requirements, such as a storage controller, the service may be seriously affected.

In summary, how to avoid the situation that BMC cannot be used due to BMC failure occurring during BMC upgrade is a technical problem that needs to be solved urgently by those skilled in the art at present.

Disclosure of Invention

The invention aims to provide a protection method, a system and a storage medium during BMC upgrading so as to avoid the condition that BMC cannot be used due to BMC faults during BMC upgrading.

In order to solve the technical problems, the invention provides the following technical scheme:

a protection method for upgrading BMC is applied to a controller connected with BMC and comprises the following steps:

receiving a first signal sent by the BMC after receiving an upgrading instruction;

after receiving the first signal, closing a mains supply module to supply power to the BMC, and controlling a preset battery module to supply power to the BMC so that the BMC is upgraded under the power supply of the battery module;

after receiving a second signal sent after the BMC is upgraded, the battery module is turned off to supply power to the BMC, and the commercial power module is controlled to supply power to the BMC.

Preferably, the battery module is a spare power supply unit BBU in the server.

Preferably, the controller is a complex programmable logic device CPLD.

Preferably, the method further comprises the following steps:

in the BMC operation process, when the electric quantity of the battery module is detected to be lower than a preset threshold value and the commercial power module normally operates, the battery module is charged.

A protection system during BMC upgrade, comprising:

the BMC is used for sending a first signal after receiving the upgrading instruction and sending a second signal after upgrading is finished;

the controller is connected with the BMC and is used for turning off a mains supply module to supply power to the BMC after receiving the first signal and controlling a preset battery module to supply power to the BMC so that the BMC is upgraded under the power supply of the battery module; after the second signal sent after upgrading of the BMC is received, the battery module is turned off to supply power to the BMC, and the commercial power module is controlled to supply power to the BMC;

the commercial power module is connected with the controller;

the battery module is connected with the controller.

Preferably, the battery module is a spare power supply unit BBU in the server.

Preferably, the controller is a complex programmable logic device CPLD.

Preferably, the controller is further configured to:

in the BMC operation process, when the electric quantity of the battery module is detected to be lower than a preset threshold value and the commercial power module normally operates, the battery module is charged.

A computer-readable storage medium, which is applied to a controller connected to a BMC, and on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of the BMC upgrade protection method described in any one of the above.

The applicant finds that when the BMC is upgraded, one or two image files are generally stored in the Flash storing the BMC firmware in order to ensure the upgrade reliability. When upgrading the BMC fails, the BMC can be upgraded again by loading the image file in the Flash after being restarted. However, considering the Flash characteristics of the BMC code, that is, if a certain bit in Flash is to be written, the Block where the bit is located needs to be erased. Therefore, if upgrading of the BMC is to be performed, the original code in the Flash is damaged, and the new code can be flushed after the damage. If the power supply is powered off or unstable in the process of flushing the new code, the old code is damaged, and the new code is loaded incompletely, the fault of the BMC can be caused, and the BMC can not be used any more. Therefore, the scheme of the application improves the power supply stability during upgrading of the BMC.

By applying the technical scheme provided by the embodiment of the invention, after the BMC receives the upgrading instruction, the BMC sends a first signal to the controller connected with the BMC. After receiving the first signal, the controller shuts down the power supply of the mains supply module to the BMC and controls the preset battery module to supply power to the BMC, so that the BMC is upgraded under the power supply of the battery module. Compared with a mains supply module, the probability of power failure or unstable power supply of the battery module is very low, so that the normal completion of upgrading of the BMC is guaranteed, and the condition that the BMC cannot be used due to BMC faults during upgrading of the BMC is avoided.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings 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 of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

FIG. 1 is a flowchart illustrating an embodiment of a protection method for upgrading BMC according to the present invention;

fig. 2 is a schematic structural diagram of a protection system during BMC upgrade according to the present invention.

Detailed Description

The core of the invention is to provide a protection method for upgrading BMC, which is beneficial to avoiding the condition that BMC cannot be used due to BMC fault during upgrading.

In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

The applicant finds that when the BMC is upgraded, one or two image files are generally stored in the Flash storing the BMC firmware in order to ensure the upgrade reliability. When upgrading the BMC fails, the BMC can be upgraded again by loading the image file in the Flash after being restarted. However, considering the Flash characteristics of the BMC code, that is, if a certain bit in Flash is to be written, the Block where the bit is located needs to be erased. Therefore, if upgrading of the BMC is to be performed, the original code in the Flash is damaged, and the new code can be flushed after the damage. If the power supply is powered off or unstable in the process of flushing the new code, the old code is damaged, and the new code is loaded incompletely, the fault of the BMC can be caused, and the BMC can not be used any more. Therefore, the scheme of the application improves the power supply stability during upgrading of the BMC.

Referring to fig. 1, fig. 1 is a flowchart illustrating an implementation of a BMC upgrade protection method according to the present invention, where the BMC upgrade protection method is applied to a controller connected to a BMC, and may include the following steps:

step S101: and receiving a first signal sent by the BMC after the upgrading instruction is received.

No matter the BMC is upgraded online through a system such as a centros system or an external network, the BMC can sense that the BMC receives an upgrade instruction. Of course, for different types of upgrade trigger modes, the types of the upgrade instructions received by the BMC may be correspondingly different, and the implementation of the present invention is not affected.

The BMC is in communication connection with the controller, and after receiving the upgrading instruction, the BMC sends a first signal to the controller, namely, the BMC plays a role in upgrading notification. The specific content of the first signal can be set and adjusted according to actual needs.

The controller described in the application can adopt the existing relevant controller on the board card, thereby saving the cost. For example, considering that most servers or storage controllers have CPLDs (Complex Programmable Logic devices), in one embodiment, the controller of the present application may be selected to be a CPLD. Of course, in some cases, a controller may be configured to implement the solution of the present application.

Step S102: after the first signal is received, the mains supply module is turned off to supply power to the BMC, and the preset battery module is controlled to supply power to the BMC, so that the BMC is upgraded under the power supply of the battery module.

After receiving the first signal, the controller turns off the power supply of the utility power module to the BMC. Specifically, a certain pin on the controller may be connected to an enable terminal of the battery module, and the power supply of the utility power module to the BMC may be turned off through the enable terminal.

Meanwhile, the controller needs to control a preset battery module to supply power to the BMC, so that the BMC is upgraded under the power supply of the battery module. Specifically, the controller may connect a certain pin with the enable terminal of the battery module, so as to control the battery module to supply power to the BMC. Of course, in other specific situations, other control modes may be adopted according to the actual circuit, for example, when the battery module is not provided with an enable terminal, a corresponding switch circuit may be provided on the power supply line of the battery module, and the controller may control the power supply state of the battery module by controlling the on and off of the switch circuit.

The battery module may employ a secondary battery having high stability. Further, in a specific embodiment of the present invention, considering that a BBU (Battery Backup Unit) is usually provided in a server, the stability is high, and only ten seconds are usually required for BMC upgrade, the BBU may provide a power support for storing memory data to a hard disk for a few minutes when the complete machine is powered off, that is, the BBU is enough to supply power for BMC upgrade, and does not affect the original task of the BBU. Therefore, in the implementation mode, the battery module is selected as the spare power supply group BBU in the server, so that the implementation cost of the scheme is reduced, and meanwhile, the stability of the BBU is very high, and the condition of abnormal power supply is not easy to occur.

After the controller shuts down the power supply of the mains supply module to the BMC and controls the preset battery module to supply power to the BMC, the BMC can be upgraded under the power supply of the battery module. Specifically, the controller may send the related instruction to the BMC after controlling the preset battery module to supply power to the BMC and when detecting that the battery module is successfully discharged, so that the BMC knows that the battery module has successfully started to supply power to the BMC, and of course, other triggering manners may also be adopted, for example, after the controller controls the preset battery module to supply power to the BMC, after a preset time, for example, after 2 seconds, the controller automatically sends the related instruction to the BMC, so that the BMC starts to upgrade.

Step S103: and after receiving a second signal sent after upgrading of the BMC, turning off the power supply of the battery module to the BMC, and controlling the commercial power module to supply power to the BMC.

After the BMC upgrade is completed, a second signal is sent to the controller. After receiving a second signal sent after upgrading of the BMC, the controller can turn off the power supply of the battery module to the BMC and control the commercial power module to supply power to the BMC.

By applying the technical scheme provided by the embodiment of the invention, after the BMC receives the upgrading instruction, the BMC sends a first signal to the controller connected with the BMC. After receiving the first signal, the controller shuts down the power supply of the mains supply module to the BMC and controls the preset battery module to supply power to the BMC, so that the BMC is upgraded under the power supply of the battery module. Compared with a mains supply module, the probability of power failure or unstable power supply of the battery module is very low, so that the normal completion of upgrading of the BMC is guaranteed, and the condition that the BMC cannot be used due to BMC faults during upgrading of the BMC is avoided.

In an embodiment of the present invention, the method may further include:

in the BMC operation process, when the electric quantity of the battery module is detected to be lower than a preset threshold value and the commercial power module normally operates, the battery module is charged.

In view of the fact that the battery module needs to be used for supplying power for BMC upgrade, in this embodiment, in order to ensure that the battery module has sufficient power, the power of the battery module is detected during the operation of the BMC. The specific value of the preset threshold can be set and adjusted according to the requirement. When the detected electric quantity of the battery module is lower than a preset threshold value, the electric quantity is low, and if the commercial power module normally operates at the moment, the battery module can be charged.

It should be noted that, in this embodiment, the battery module is charged only when the utility power module is in normal operation, and it is considered that when the utility power module is abnormal, the battery module can be used to supply power to the server and the BMC, that is, to assist the BBU, so as to be beneficial to ensuring the system stability. Of course, in some cases, BBU may be used as it is as the battery module of the present application. Because the battery module may be used when the utility power module is abnormal, the battery module is charged when the utility power module operates normally.

Corresponding to the above method embodiment, the embodiment of the present invention further provides a protection system for BMC upgrade, which can be referred to in correspondence with the above.

Referring to fig. 2, a schematic structural diagram of a protection system when the BMC10 is upgraded in the present invention includes:

the BMC10 is used for sending a first signal after receiving the upgrading instruction and sending a second signal after upgrading is finished;

the controller 20 is connected with the BMC10 and configured to turn off the power supply of the utility power module 30 to the BMC10 and control the preset battery module 40 to supply power to the BMC10 after receiving the first signal, so that the BMC10 is upgraded under the power supply of the battery module 40; after receiving a second signal sent after the upgrade of the BMC10 is completed, turning off the power supply of the battery module 40 to the BMC10, and controlling the utility power module 30 to supply power to the BMC 10;

a commercial power module 30 connected to the controller 20;

and a battery module 40 connected to the controller 20.

In one embodiment of the present invention, the battery module 40 is a spare power set BBU in the server.

In one embodiment of the present invention, the controller 20 is a complex programmable logic device, CPLD.

In one embodiment of the present invention, the controller 20 is further configured to:

in the operating process of the BMC10, when it is detected that the electric quantity of the battery module 40 is lower than the preset threshold and the utility power module 30 operates normally, the battery module 40 is charged.

Corresponding to the above method and system embodiments, the embodiment of the present invention further provides a computer-readable storage medium, which is applied in a controller connected to a BMC, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of any one of the above protection methods when the BMC is upgraded, and a description thereof is not repeated here. A computer-readable storage medium as referred to herein may include Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

The principle and the implementation of the present invention are explained in the present application by using specific examples, and the above description of the embodiments is only used to help understanding the technical solution and the core idea of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:条烟智能识别处理方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类