Server hot standby method, device and equipment and readable storage medium
By enabling the hot standby function in the server cluster, intelligent mutual backup between BMC devices is achieved, and the problems of fault detection lag and manual repair inefficiency caused by BMC abnormal crashes are solved, and the stability and availability of the server cluster are improved.
Patent Information
- Application Number
- CN202510275566.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, the BMC equipment of the server node is prone to abnormal crashes due to network fluctuations, software defects or firmware version compatibility problems, resulting in lag in fault detection, low manual repair efficiency, and lack of a collaboration mechanism between nodes, affecting the stability and availability of the server cluster.
By enabling the hot standby function, the BMC devices in the server cluster send hot standby registration messages, record the device identification information, and automatically select the hot standby partner and request the hot standby recovery file when the failure event is triggered, achieving rapid self-repair.
It realizes intelligent mutual backup of BMC devices in the server cluster, improves the stability and availability of the server cluster, reduces manual intervention, and ensures business continuity.
Smart Images

Figure CN120263626A_ABST
Abstract
Description
Technical Field
[0001] The present specification relates to the field of communication technology, and in particular to a server hot standby method, device, equipment and readable storage medium. Background Art
[0002] In the current server architecture, the blade box server is a high-density computing solution that integrates multiple independent plug-in nodes into the same cabinet to achieve intensive management and flexible expansion of hardware resources. Each plug-in node is equipped with an independent baseboard management controller (BMC), which is responsible for real-time monitoring of hardware status (such as temperature, voltage, fan speed, etc.), reporting fault information, and communicating with upper-level management software (such as the operation and maintenance system OM) through the out-of-band management network to ensure that administrators can remotely maintain and respond to abnormalities in a timely manner.
[0003] However, with the increasing complexity of network applications and the expansion of server scale, the stability of BMC software faces severe challenges. In actual operation, due to network environment fluctuations, software defects or firmware version compatibility issues, the BMC of a single node may experience abnormal crashes, frequent restarts or communication interruptions with the OM.
[0004] The existing technology relies on the OM system to passively detect the node status. When the OM finds that a node is repeatedly disconnected, manual intervention is required to troubleshoot the faulty node and try to restore it by restarting it one by one, rolling back the version, or upgrading the firmware.
[0005] This process has significant defects. First, fault detection is delayed. There is a time difference from BMC abnormality to OM recognition of disconnection. During this period, the hardware status may have been out of control (such as overheating caused by heat dissipation failure, and power supply abnormalities not being recorded); second, manual repair is inefficient, especially in large data centers. Operation and maintenance personnel need to manually locate the faulty node and operate it, which is time-consuming. During this period, the faulty node is in an "unmonitored" state, which may trigger a chain reaction (such as overheated nodes that are not handled in time damaging adjacent hardware); finally, the existing technology lacks a coordination mechanism between nodes. Each BMC operates independently. The recovery of the faulty node depends entirely on external intervention, and it is impossible to use the resources of other normal nodes in the same blade box to achieve rapid self-healing.
[0006] For example, when a node's BMC crashes continuously due to a software defect, even if other nodes in the same cabinet are running normally, they cannot actively assist the failed node to recover, and the overall reliability of the system is limited by the single point of vulnerability. In addition, the existing multicast communication protocol does not design a dedicated field for BMC status coordination, and nodes cannot efficiently exchange backup information, further limiting the possibility of automated recovery. These problems are particularly prominent in scenarios that require high availability. Summary of the invention
[0007] In view of this, this specification provides a server hot standby method, apparatus, electronic device, and readable storage medium to improve the problem of slow recovery of the above-mentioned server nodes.
[0008] The specific technical solutions are as follows:
[0009] This specification provides a server hot standby method, which is applied to the BMC device of a server in a server cluster. The server cluster includes a management device and several servers. The method includes: enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device. The hot standby registration information includes device identification information and hot standby function enabling information; in response to a fault event triggered by a preset hot standby recovery condition, entering a recovery mode, selecting one piece of hot standby registration information according to a preset rule based on the hot standby registration information of other servers obtained from the management device, and sending a hot standby recovery request to the corresponding BMC device of the other server according to the device identification information included in the hot standby registration information; receiving a hot standby recovery file and hot standby recovering the local device according to the hot standby recovery file. The hot standby recovery file is a hot standby recovery file generated according to the firmware that can operate normally and sent by the BMC device of the other server that has received the hot standby recovery request in response to the hot standby recovery request.
[0010] As a technical solution, the enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device includes: enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the broadcast message sent by the management device according to the hot standby registration message and record it in the node communication table of the corresponding BMC device.
[0011] As a technical solution, the enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device includes: enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the management device of the server cluster records the hot standby registration information of the hot standby registration message in the node communication table. The node communication table includes the hot standby registration information recorded by several servers in the server cluster through the hot standby registration message. The node communication table is used to enable the servers in the server cluster to obtain the hot standby registration information of other servers in the server cluster.
[0012] As a technical solution, the device identification information includes the slot number and / or the MAC address and / or the IP address; the sending of the hot standby recovery request to the BMC device of the corresponding other server according to the device identification information included in the hot standby registration information includes: sending a hot standby recovery request to the corresponding BMC device according to the slot number and / or the MAC address and / or the IP address.
[0013] As a technical solution, the entering the recovery mode in response to a fault event triggered by a preset hot standby recovery condition includes: entering the recovery mode in response to a fault event, where the fault event is triggered by a preset number of restarts for non-specific reasons or triggered by several consecutive restarts with an interval less than a preset duration.
[0014] This specification also provides a server hot standby device, which is applied to the BMC device of a server in a server cluster. The server cluster includes a management device and several servers. The device includes: a first module for enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device. The hot standby registration information includes device identification information and hot standby function enabling information; a second module for entering the recovery mode in response to a fault event triggered by a preset hot standby recovery condition, selecting one piece of hot standby registration information according to a preset rule based on the hot standby registration information of other servers obtained from the management device, and sending a hot standby recovery request to the BMC device of the corresponding other server according to the device identification information included in the hot standby registration information; a third module for receiving a hot standby recovery file and hot standby recovering the local device according to the hot standby recovery file. The hot standby recovery file is a hot standby recovery file generated according to a firmware that can operate normally and sent by the BMC device of the other server that has received the hot standby recovery request in response to the hot standby recovery request.
[0015] As a technical solution, the enabling of the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device, includes: enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the broadcast message sent by the management device according to the hot standby registration message and record it in the node communication table of the corresponding BMC device.
[0016] As a technical solution, enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device, includes: enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the management device of the server cluster records the hot standby registration information of the hot standby registration message into the node communication table. The node communication table includes the hot standby registration information recorded by a number of servers in the server cluster through the hot standby registration message, and the node communication table is used for the servers in the server cluster to obtain the hot standby registration information of other servers in the server cluster.
[0017] As a technical solution, the device identification information includes a slot number and / or a MAC address and / or an IP address; sending a hot standby recovery request to the corresponding BMC device of the other server according to the device identification information included in the hot standby registration information includes: sending a hot standby recovery request to the corresponding BMC device according to the slot number and / or the MAC address and / or the IP address.
[0018] As a technical solution, responding to a fault event triggered by a preset hot standby recovery condition and entering a recovery mode includes: responding to a fault event and entering a recovery mode, where the fault event is triggered by a preset number of restarts for non-specific reasons or triggered by a continuous number of restarts with an interval less than a preset duration.
[0019] This specification also provides an electronic device, including a processor and a readable storage medium. The readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the foregoing server hot standby method.
[0020] This specification also provides a readable storage medium. The readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the foregoing server hot standby method.
[0021] The above technical solutions provided in this specification at least bring the following beneficial effects:
[0022] By enabling the hot standby function and sending a hot standby registration message containing device identification information and hot standby function enabling information, intelligent mutual backup of BMC devices between servers in the cluster is achieved. Once a preset fault condition is triggered, it automatically enters the recovery mode, requests a hot standby recovery file from the adapter server based on the obtained hot standby registration information, realizes fast self-repair, greatly improves the stability and availability of the server cluster, reduces manual intervention at the same time, and ensures business continuity. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] To more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following will briefly introduce the drawings required for describing the embodiments of this specification or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in this specification. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings of the embodiments of this specification.
[0024] Figure 1 is a flowchart of a server hot standby method in an embodiment of this specification;
[0025] Figure 2 is a structural diagram of a server hot standby device in an embodiment of this specification;
[0026] Figure 3 is a hardware structural diagram of an electronic device in an embodiment of this specification.
[0027] Reference numerals: first module 21, second module 22, third module 23. Detailed implementation manners
[0028] The terms used in the embodiments of this specification are only for the purpose of describing specific embodiments and do not limit this specification. The singular forms "a", "the" and "said" used in this specification and the claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to any or all possible combinations including one or more of the associated listed items.
[0029] It should be understood that although the terms first, second, third, etc. may be used in the embodiments of this specification to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" may be interpreted as "when" or "while" or "in response to a determination".
[0030] In actual application scenarios, especially in the blade box node architecture, a server cabinet may contain multiple independent plug-in nodes that work separately, and each node has its own BMC for management and monitoring. In a complex customer network environment or when there are bugs in the software itself, the BMC of a certain node may fail to work properly. In one technical solution, when the network management software in the cabinet, such as OM (Operation Manager), detects that a certain node frequently disconnects and then reconnects, it will determine that there is a problem with the device, and then solve the problem by checking one by one or manually upgrading the version. However, during this process, since the machine is in an unmonitored state, a series of risks such as insufficient heat dissipation and safety hazards may be brought about.
[0031] If only relying on manual intervention after the fact to repair the BMC problem, it is not only inefficient, but also during the repair period, the affected server nodes will lose effective monitoring and management, further increasing the risks at the system level. In addition, even in the best case, such a repair process may take a lot of time, thus affecting business continuity and user experience. Therefore, there is an urgent need for a more intelligent and efficient mechanism to solve this problem, so that when the BMC has a problem, it can quickly self-detect and self-repair, thus ensuring the high availability and stability of the server. This new mechanism should be able to automatically complete the whole process from fault detection to recovery without relying on manual intervention and minimize the impact on the business as much as possible.
[0032] In view of this, this specification provides a server hot standby method, device, electronic device, and readable storage medium.
[0033] The specific technical solution is as follows.
[0034] In one embodiment, this specification provides a server hot standby method, which is applied to the BMC device of a server in a server cluster. The server cluster includes a management device and several servers. The method includes: enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device. The hot standby registration information includes device identification information and hot standby function enabling information; in response to a fault event triggered by a preset hot standby recovery condition, entering a recovery mode, selecting one piece of hot standby registration information according to a preset rule based on the hot standby registration information of other servers obtained from the management device, and sending a hot standby recovery request to the corresponding BMC device of the other server according to the device identification information included in the hot standby registration information; receiving a hot standby recovery file and hot standby recovering the local device according to the hot standby recovery file. The hot standby recovery file is a hot standby recovery file generated according to a firmware that can operate normally and is sent by the BMC device of the other server that has received the hot standby recovery request in response to the hot standby recovery request.
[0035] Specifically, as Figure 1 , it includes the following steps:
[0036] Step S11: Enable the hot standby function and send a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device. The hot standby registration information includes device identification information and hot standby function enabling information.
[0037] The BMC device of the server enables the hot standby function and sends a hot standby registration message to the management device. This message contains important hot standby registration information. The device identification information is used to uniquely identify the server that sends this message, and the hot standby function enabling information clearly indicates that this server has activated the hot standby function and is willing to participate in the hot standby mechanism within the cluster.
[0038] The device identification information can be the unique identifier of the server, such as the IP address, MAC address, or a specific device serial number, etc., and the hot standby function enabling information can be a simple flag bit indicating the on - off state of the hot standby function.
[0039] In this way, the management device can record which servers have enabled the hot standby function and broadcast this information to other servers in the cluster. The BMC devices of other servers obtain this hot standby registration information through the management device and store it in the local communication table for subsequent use.
[0040] Step S12: In response to a fault event that triggers a preset hot standby recovery condition, enter the recovery mode. According to the hot standby registration information of other servers obtained from the management device, select one piece of hot standby registration information according to a preset rule, and send a hot standby recovery request to the BMC device of the corresponding other server according to the device identification information included in the hot standby registration information.
[0041] When the BMC device of the server detects a fault event that triggers a preset hot standby recovery condition, it will enter the recovery mode. The preset hot standby recovery condition can be set according to actual needs. For example, when the BMC device restarts multiple times within a short period, or detects abnormalities in some key hardware or software components during startup, this fault event can be triggered. After entering the recovery mode, the BMC device will select one piece of hot standby registration information from the hot standby registration information of other servers obtained from the management device before, according to a preset rule.
[0042] The preset rule can be to select the most suitable server as the hot standby source based on factors such as the priority, distance, and load of the server. For example, a server with a lower load and a closer distance can be selected to ensure the efficiency and reliability of the hot standby recovery process.
[0043] After selecting the hot standby registration information, the BMC device will send a hot standby recovery request to the BMC device of the corresponding other server according to the device identification information included in the hot standby registration information. This request will contain necessary information such as the requested file type, version number, etc., so that the other server can accurately provide the required hot standby recovery file.
[0044] Step S13: Receive the hot standby recovery file, and hot standby recover the local device according to the hot standby recovery file. The hot standby recovery file is a hot standby recovery file generated according to the normally operating firmware and sent by the BMC device of the other server that has received the hot standby recovery request in response to the hot standby recovery request.
[0045] The BMC device receives the hot standby recovery file. This file is sent by the BMC device of the other server that has received the hot standby recovery request in response to the request. The hot standby recovery file is generated according to the normally operating firmware and contains all necessary information and data to enable the local device to return to the normal operating state.
[0046] After receiving the hot standby recovery file, the BMC device will perform hot standby recovery operations according to the content of the file. This process may include operations such as updating the firmware, restoring the configuration file, and re-initializing the hardware.
[0047] If the hot standby recovery file is a firmware update package, the BMC device will gradually update the local firmware version according to the instructions in the package to ensure that all critical components can work properly. After the recovery is completed, the BMC device will restart and enter the normal operation state, effectively solving the fault problem and restoring the monitoring and management functions of the server.
[0048] In one implementation, the administrator or automated process enables the hot standby function through the HDM page. Once enabled, the BMC device will send a hot standby registration message containing specific fields to the management device (such as OM). This message includes information such as the Magic field, OpCode, FeedBack, and particularly includes device identification information and hot standby function enabling information. For example, a value of 1 in the Data TYPE TLV field indicates that this node needs to perform mutual hot standby with other nodes. This ensures that all server BMC devices within the cluster can obtain each other's hot standby registration information through the management device.
[0049] When a fault occurs in the BMC software of a certain node, for example, if it restarts continuously at least twice within a short period such as ten minutes due to unknown reasons, a preset hot standby recovery condition is triggered. At this time, it enters the recovery mode. In this mode, the BMC will select a suitable hot standby partner according to the hot standby registration information of other servers obtained from the management device before, according to preset rules. This selection process may be based on multiple factors, such as network latency, historical cooperation records, etc. Assuming that the server with slot number 3 is selected as the hot standby partner, a hot standby recovery request will be sent to it. During this process, the information carried in the request not only includes the device identification information of the initiator but also the specific request content so that the other party can respond accurately.
[0050] The BMC of the faulty node receives the hot standby recovery files from the selected hot standby partner. These files are generated by the normally operating BMC device according to the currently used and normally operating firmware. For example, if the server with slot number 3 receives a hot standby recovery request, it will check its table. After confirming that the request source is legal, it will prepare the corresponding TFTP request response and provide the latest BIN file version to the requester. In this way, the originally problematic BMC device can use these recovery files for self - repair and complete the hot standby recovery process. The entire process not only ensures the rapid recovery of a single node but also the high availability of the entire server cluster. In addition, the recovered logs will be reported to the OM for subsequent analysis and optimization, further enhancing the robustness and intelligent management level of the system.
[0051] In one embodiment, enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to a management device, so that BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device, includes: enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to a management device, so that BMC devices of other servers in the server cluster can obtain the hot standby registration information through a broadcast message sent by the management device according to the hot standby registration message, and record it in the node communication table of the corresponding BMC device.
[0052] In one embodiment, enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to a management device, so that BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device, includes: enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to a management device, so that the management device of the server cluster records the hot standby registration information of the hot standby registration message in the node communication table, where the node communication table includes hot standby registration information recorded by a plurality of servers in the server cluster through the hot standby registration message, and the node communication table is used for servers in the server cluster to obtain hot standby registration information of other servers in the server cluster.
[0053] In one embodiment, the device identification information includes a slot number and / or a MAC address and / or an IP address; sending a hot standby recovery request to the corresponding BMC device of the other server according to the device identification information included in the hot standby registration information includes: sending a hot standby recovery request to the corresponding BMC device according to the slot number and / or the MAC address and / or the IP address.
[0054] In one embodiment, responding to a fault event triggered by a preset hot standby recovery condition and entering a recovery mode includes: responding to a fault event and entering a recovery mode, where the fault event is triggered by a preset number of restarts for non-specific reasons or triggered by a continuous number of restarts with an interval less than a preset duration.
[0055] In one embodiment, the BMC device of each server in the server cluster needs to pre-configure the enabling state of the hot standby function.
[0056] When an administrator enables the hot standby function of a certain server BMC through a management interface or a command-line tool, the BMC will generate a hot standby registration message containing a device unique identifier (such as BMC MAC address, serial number), the current firmware version number, the hardware configuration hash value, and the hot standby function activation state.
[0057] For example, when the BMC device of a certain server detects that the hot standby function enable flag is true during startup, it immediately sends a registration message to the management device (such as an out-of-band management switch) via the UDP protocol. The device identification information is clearly marked in the message payload as "BMC-MAC:00:1A:2B:3C:4D:5E", the firmware version is "v2.1.5", and the hash value "a1b2c3…f0e9" of the configuration parameters of the current operating environment is calculated through the SHA-256 algorithm.
[0058] After receiving the message, the management device stores it in the distributed database and periodically broadcasts and synchronizes it to all online BMC devices in the cluster. During this process, if the BMC of a certain server fails to receive the broadcast in time due to network jitter, the management device will ensure eventual consistency through the retransmission mechanism. For example, it will retransmit at most 3 times within 10 seconds until all nodes in the cluster maintain the same latest hot standby registration table.
[0059] When a BMC device experiences a fault event (such as the watchdog timing out due to a firmware crash or the communication link with the upper management system being continuously interrupted for more than 30 seconds), its built-in exception detection module will trigger the preset hot standby recovery conditions.
[0060] In one scenario, after a certain node's BMC has restarted 3 times continuously due to a memory leak during operation, the self-check logic determines that it has entered an irrecoverable state and immediately activates the recovery mode. At this time, the faulty BMC queries the current hot standby registration table through the management device and extracts the information of other nodes that are all marked as "hot standby enabled" and have a compatible firmware version (such as the version difference is within the minor version number).
[0061] The preset rules can dynamically select the target node based on multi-dimensional priorities: for example, preferentially select the node with the lowest load (judged by the CPU utilization rate field of the most recent heartbeat message of each node in the registration table), the node with the closest physical location (calculate the topological distance based on the cabinet number and slot information), or the node with an exactly matching firmware version.
[0062] In specific implementation, if a faulty BMC detects that it is running version v2.1.5, and there are two nodes in the registration table running versions v2.1.5 and v2.1.6 respectively, then it will preferentially select the v2.1.5 node as the recovery source. If there is no exact match, it will select the closest node according to the hash value difference.
[0063] After selecting the target, the faulty BMC constructs an encrypted communication tunnel through the management device and sends a hot standby recovery request to the BMC of the target node. The request message carries its own device ID, the fault type code, and the required firmware feature parameters.
[0064] The target BMC device that receives the hot standby recovery request first verifies the legitimacy of the requester's identity (such as checking whether the MAC address is in the registry), and then calls the firmware snapshot generation module to package the currently normally running system partition, configuration file, and certificate key into a hot standby recovery file.
[0065] In a specific scenario, the target BMC executes the command "dd if= / dev / mmcblk0p2 of= / tmp / recovery.img" in the Linux environment to generate a system image, and encrypts this file using the AES-256 encryption algorithm with the device ID of the requester as the key to ensure the security of file transmission.
[0066] After the recovery file is generated, the target BMC shards and transmits it to the faulty BMC through the out-of-band management network, and attaches a digital signature to prevent tampering. After receiving and completing, the faulty BMC verifies the file integrity and signature validity, for example, ensuring the data is correct by comparing the SHA-512 hash value, and then triggers the local recovery process, writes the recovery file to the backup partition, updates the bootloader configuration, and completes the firmware switch under the protection of the transactional write mechanism.
[0067] A certain faulty BMC adopts a dual-partition alternating write strategy during the recovery process. First, it erases the content of the backup partition, writes the recovery file data block by block, and finally modifies the U-Boot environment variable to point the next startup to the backup partition, so as to achieve a business-unaware hot recovery without manual intervention.
[0068] Throughout the process, the management device records the status changes of each node in real time, and updates the hot standby registry after the recovery is successful, marking the faulty node as the "recovered" state, providing the latest topology information for possible subsequent collaborative recovery.
[0069] In one implementation, such as Figure 2, this specification also provides a server hot standby device, which is applied to the BMC device of a server in a server cluster. The server cluster includes a management device and several servers. The device includes: a first module, configured to enable the hot standby function and send a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device. The hot standby registration information includes device identification information and hot standby function enabling information; a second module, configured to enter the recovery mode in response to a fault event triggered by a preset hot standby recovery condition, obtain the hot standby registration information of other servers from the management device, select one piece of hot standby registration information according to a preset rule, and send a hot standby recovery request to the corresponding BMC device of the other server according to the device identification information included in the hot standby registration information; a third module, configured to receive a hot standby recovery file and hot standby recover the local device according to the hot standby recovery file. The hot standby recovery file is a hot standby recovery file generated according to the firmware that can operate normally and sent by the BMC device of the other server that has received the hot standby recovery request in response to the hot standby recovery request.
[0070] In one implementation, the enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device includes: enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the broadcast message sent by the management device according to the hot standby registration message and record it in the node communication table of the corresponding BMC device.
[0071] In one implementation, the enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device includes: enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the management device of the server cluster records the hot standby registration information of the hot standby registration message in the node communication table. The node communication table includes the hot standby registration information recorded by several servers in the server cluster through the hot standby registration message. The node communication table is used to enable the servers in the server cluster to obtain the hot standby registration information of other servers in the server cluster.
[0072] In one implementation, the device identification information includes a slot number and / or a MAC address and / or an IP address; the sending a hot standby recovery request to the corresponding BMC device of the other server according to the device identification information included in the hot standby registration information includes: sending a hot standby recovery request to the corresponding BMC device according to the slot number and / or the MAC address and / or the IP address.
[0073] In one embodiment, in response to a fault event triggered by a preset hot standby recovery condition, entering a recovery mode includes: in response to the fault event, entering the recovery mode, where the fault event is triggered by a preset number of restarts for unspecified reasons or triggered by several consecutive restarts with an interval less than a preset duration.
[0074] The device embodiments are the same as or similar to the corresponding method embodiments, and will not be elaborated here.
[0075] In one embodiment, this specification provides an electronic device, including a processor and a readable storage medium. The readable storage medium stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the aforementioned server hot standby method. In terms of hardware, a schematic diagram of the hardware architecture can be seen Figure 3 as shown.
[0076] In one embodiment, this specification provides a readable storage medium that stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the aforementioned server hot standby method.
[0077] Here, the readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, and so on. For example, the readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or a combination thereof.
[0078] The systems, devices, modules, or units described in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media player, navigation device, email transceiver device, game console, tablet computer, wearable device, or a combination of any several of these devices.
[0079] For the convenience of description, when describing the above devices, they are divided into various units according to functions for separate description. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0080] Those skilled in the art should understand that the embodiments of this specification can be provided as a method, a system, or a computer program product. Therefore, this specification can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0081] This specification is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of this specification. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0082] Moreover, these computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0083] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0084] Those skilled in the art should understand that the embodiments of this specification can be provided as a method, a system, or a computer program product. Therefore, this specification can take the form of a completely hardware implementation, a completely software implementation, or a form that combines software and hardware aspects. Moreover, this specification can take the form of a computer program product implemented on one or more computer-usable storage media (which may include, but are not limited to, disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0085] The above are only the embodiments of this specification and are not used to limit this specification. For those skilled in the art, various changes and modifications can be made to this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this specification shall be included within the scope of the claims of this specification.
Claims
1. A server hot standby method, characterized in that, A BMC device applied to a server in a server cluster, the server cluster including a management device and a plurality of servers, the method comprising: Enabling a hot standby function, and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device, the hot standby registration information including device identification information and hot standby function enabling information; In response to a fault event triggered by a preset hot standby recovery condition, entering a recovery mode, selecting one piece of hot standby registration information according to a preset rule based on the hot standby registration information of other servers obtained from the management device, and sending a hot standby recovery request to the corresponding BMC device of the other server according to the device identification information included in the hot standby registration information; Receiving a hot standby recovery file, and hot standby recovering a local device according to the hot standby recovery file, the hot standby recovery file being a hot standby recovery file generated according to a firmware that can operate normally and sent by the BMC device of the other server that has received the hot standby recovery request in response to the hot standby recovery request.
2. The method according to claim 1, wherein The enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device, includes: Enabling the hot standby function, and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through a broadcast message sent by the management device according to the hot standby registration message and record it in the node communication table of the corresponding BMC device.
3. The method according to claim 1, wherein The enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device, includes: Enabling the hot standby function, and sending a hot standby registration message containing hot standby registration information to the management device, so that the management device of the server cluster records the hot standby registration information of the hot standby registration message in the node communication table, the node communication table including the hot standby registration information recorded by a plurality of servers in the server cluster through the hot standby registration message, and the node communication table being used for the servers in the server cluster to obtain the hot standby registration information of other servers in the server cluster.
4. The method according to claim 1, characterized in that, The device identification information includes a slot number and / or a MAC address and / or an IP address; The sending a hot standby recovery request to the corresponding BMC device of the other server according to the device identification information included in the hot standby registration information includes: Sending a hot standby recovery request to the corresponding BMC device according to the slot number and / or the MAC address and / or the IP address.
5. The method according to claim 1, wherein The responding to a fault event triggered by a preset hot standby recovery condition and entering a recovery mode includes: In response to a fault event, entering a recovery mode, the fault event being triggered by a preset number of restarts for non-specific reasons or triggered by a continuous number of restarts with an interval less than a preset duration.
6. A server hot standby device, characterized in that, A BMC device applied to a server in a server cluster, the server cluster including a management device and a plurality of servers, the device comprising: The first module is used to enable the hot standby function and send a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device. The hot standby registration information includes device identification information and hot standby function enabling information; The second module is used to enter the recovery mode in response to a fault event triggered by a preset hot standby recovery condition, select one piece of hot standby registration information from the hot standby registration information of other servers obtained from the management device according to a preset rule, and send a hot standby recovery request to the BMC device of the corresponding other server according to the device identification information included in the hot standby registration information; The third module is used to receive the hot standby recovery file and hot standby recover the local device according to the hot standby recovery file. The hot standby recovery file is a hot standby recovery file generated according to the firmware that can operate normally and is sent by the BMC device of the other server that has received the hot standby recovery request in response to the hot standby recovery request.
7. The device according to claim 6, characterized in that, The enabling of the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device, includes: Enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the broadcast message sent by the management device according to the hot standby registration message and record it in the node communication table of the corresponding BMC device.
8. The device according to claim 6, characterized in that, The enabling of the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the BMC devices of other servers in the server cluster can obtain the hot standby registration information through the management device, includes: Enabling the hot standby function and sending a hot standby registration message containing hot standby registration information to the management device, so that the management device of the server cluster records the hot standby registration information of the hot standby registration message in the node communication table. The node communication table includes the hot standby registration information recorded by several servers in the server cluster through the hot standby registration message. The node communication table is used to enable the servers in the server cluster to obtain the hot standby registration information of other servers in the server cluster.
9. The device according to claim 6, characterized in that The device identification information includes slot number and / or MAC address and / or IP address; The sending of the hot standby recovery request to the BMC device of the corresponding other server according to the device identification information included in the hot standby registration information includes: Sending a hot standby recovery request to the corresponding BMC device according to the slot number and / or MAC address and / or IP address.
10. The device according to claim 6, characterized in that, The entering of the recovery mode in response to a fault event triggered by a preset hot standby recovery condition includes: Entering the recovery mode in response to a fault event, where the fault event is triggered by a preset number of restarts for non-specific reasons or triggered by several consecutive restarts with an interval less than a preset duration.
11. An electronic device, characterized in that, Includes: A processor and a readable storage medium. The readable storage medium stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the method according to any one of claims 1-5.
12. A readable storage medium, characterized in that, The readable storage medium stores machine-executable instructions that, when called and executed by a processor, cause the processor to implement the method according to any one of claims 1-5.