BMC customization method and system
The BMC customization method automates the retrieval and verification of configuration data through a customization server, addressing inefficiencies in manual BMC updates and enhancing customization efficiency and accuracy.
Patent Information
- Application Number
- CN202411287902.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-12-31
AI Technical Summary
Current server BMC customization is labor-intensive, time-consuming, and prone to errors due to manual operation and inefficient firmware/script updates, leading to prolonged production cycles and potential missed customization requirements.
A BMC customization method and system that utilizes a customization server to automatically retrieve and verify customized configuration data via a network module, reducing the need for manual intervention and ensuring accurate, efficient BMC updates across different server models.
The method enhances BMC customization efficiency by automating the process, reducing labor costs, and ensuring data integrity and accuracy, thereby speeding up production and improving user experience.
Smart Images

Figure CN119225762A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a BMC customization method and system. Background Art
[0002] BMC (Baseboard Management Controller) is a server management software embedded in the server motherboard, used to monitor the physical status of the server and perform remote operations. BMC's functions include remote control, monitoring, configuration, and troubleshooting. It manages and maintains server hardware through operating systems and software independent of the server to ensure stable operation of the server. The role of BMC is to improve the reliability and manageability of the server, reduce maintenance costs and downtime, and improve the operational efficiency of the data center. Administrators can use BMC to remotely access and manage servers at any location and at any time, and can quickly diagnose and recover faults, thereby improving server availability and performance.
[0003] In the current server industry, different customers or enterprises need to customize the purchased server products to adapt to their own business, which involves the customization of the BMC in the server. Suppliers need to customize dedicated BMC software or firmware according to the specific needs of customers. BMC customization can be to adjust the parameter settings of BMC according to the hardware configuration and working environment of the server, or to optimize the remote control, monitoring, configuration and troubleshooting functions of BMC. For example, support for BMC-specific hardware can be added to improve the speed and security of remote access; monitoring indicators for server status can be added to BMC to improve the accuracy of fault diagnosis, etc. Dedicated management software and tools can also be deployed in BMC, such as automated operation and maintenance tools to achieve batch management and automated deployment of servers; intelligent monitoring tools to achieve real-time monitoring and early warning of server status; fault diagnosis tools to achieve rapid location and recovery of server faults, etc.
[0004] In the current server production process, server BMC customization is usually achieved by flashing new firmware versions or scripts for specific batches of server products that need to be customized. When flashing a customized firmware version, the data needs to be configured in advance, and the customized version needs to be switched in the form of commands or scripts. The process requires manual operation, which is time-consuming and labor-intensive. When the customization requirements change, the firmware or script needs to be remade, which greatly increases the workload of R&D personnel and slows down the production cycle. In addition, due to the large number of servers, some requirements are easily missed or lost during the customization process, and it is necessary to repeatedly check for missing items and rewrite the firmware or script, which is inefficient and affects the user experience. Summary of the invention
[0005] In view of this, the present application aims to propose a BMC customization method and system to reduce the difficulty of server BMC customization, improve customization efficiency and ensure the accuracy of customization information.
[0006] To achieve the above purpose, the technical solution of this application is as follows:
[0007] A first aspect of an embodiment of the present application provides a BMC customization method, which is applied to a BMC, wherein the BMC is connected to a customization server via a network module; the method comprises:
[0008] Generate a customization request based on the current version number of the BMC, the server model, and the target version number that needs to be customized;
[0009] Sending the customization request to a customization server; the customization server is used to store customized configuration data of at least one version corresponding to the BMC; the customized configuration data includes at least one of the following: a script file, a configuration parameter or a function switch instruction;
[0010] Receiving the customized configuration data returned by the customization server, and verifying the customized configuration data;
[0011] In the case where the customized configuration data passes verification, the customized configuration data is applied.
[0012] Optionally, sending the customization request to a customization server includes:
[0013] Sending a ping command to the customized server through the network module to check connectivity with the customized server;
[0014] When the customization server is connected, the customization request is sent to the target port of the customization server based on the HTTPS protocol.
[0015] Optionally, receiving the customized configuration data returned by the customization server and verifying the customized configuration data includes:
[0016] Receiving response data sent by the customization server, and obtaining customized configuration data from a response body of the response data;
[0017] Obtain the version number and server model of the customized configuration data, and compare them with the target version number and the server model to which the BMC belongs;
[0018] When the version number of the customized configuration data is consistent with the target version number, and the server model of the customized configuration data is consistent with the server model to which the BMC belongs, a hash check algorithm or a digital signature algorithm is used to perform integrity check on the customized configuration data;
[0019] If the integrity check passes, the customized configuration data is subjected to a legality check, including: checking whether the string length and complexity of the parameters in the customized configuration data meet the requirements of the setting format, and whether the parameter settings are within the parameter range of the configuration item;
[0020] In the case where the legality check passes, it is determined that the customized configuration data passes the check, and the customized configuration data is stored in the memory.
[0021] Optionally, the BMC customization method further includes:
[0022] When the version number of the customized configuration data is inconsistent with the target version number, or the server model of the customized configuration data is inconsistent with the server model to which the BMC belongs, determining that a version error occurs in the customized configuration data;
[0023] Stop integrity checking of the customized configuration data, and record first log data; the first log data is used to indicate that the currently acquired customized configuration data does not match the requested version.
[0024] Optionally, the BMC customization method further includes:
[0025] In the case where the integrity check fails, the legality check of the customized configuration data is stopped, and second log data is recorded; the second log data is used to indicate that data loss occurs in the currently acquired customized configuration data;
[0026] In the case where the legality check fails, the customized configuration data is not stored, and third log data is recorded; the third log data is used to indicate that a parameter error occurs in the currently acquired customized configuration data.
[0027] Optionally, the BMC customization method further includes:
[0028] generating a first instruction based on the second log data or the third log data;
[0029] Based on the first instruction, the customization request is sent to the customization server again at a first interval.
[0030] Optionally, the BMC customization method further includes:
[0031] After sending the customization request to the customization server, recording the sending time;
[0032] Comparing the sending duration with a first threshold, and determining that the request has timed out when the sending duration reaches the first threshold and the customized configuration data returned by the customized server is not received;
[0033] Stop receiving the data sent by the customized server and generate fourth log data; the fourth log data is used to indicate that the customized configuration data is not obtained within a specified time.
[0034] Optionally, the BMC customization method further includes:
[0035] When the sending duration does not reach the first threshold and an error status code returned by the customization server is received, fifth log data is generated; the fifth log data is used to indicate that customized configuration data of the target version does not exist.
[0036] Optionally, applying the customized configuration data includes:
[0037] Reading the customized configuration data from the memory;
[0038] Based on the customized configuration data, adjust the configuration of the BMC, including: modifying network parameters, modifying default values of function parameters, adjusting the layout of the Web user interface, modifying the user default password, and replacing the user customized Logo;
[0039] After the configuration adjustment is completed, the BMC is restarted to apply the new configuration.
[0040] According to a second aspect of an embodiment of the present application, a BMC customization method is provided, which is applied to a customized server, wherein the customized server is connected to the BMC via a network module; the method comprises:
[0041] Receive a customization request sent by at least one BMC, parse each customization request, and obtain corresponding request parameters; the request parameters include: the current version number of the BMC, the server model to which the BMC belongs, and the target version number of the request;
[0042] Retrieving a configuration database according to each request parameter to obtain corresponding customized configuration data; the customized configuration data includes at least one of the following: a script file, a configuration parameter, or a function switch instruction;
[0043] Corresponding response data is generated based on each customized configuration data and returned to the corresponding BMC.
[0044] Optionally, before receiving the customization request sent by at least one BMC, the method further includes:
[0045] Deploy a Web service on the customized server, and the customized server communicates with each BMC based on the HTTPS protocol through the Web service;
[0046] Set the target port and the corresponding routing path to receive and route the customization requests sent by each BMC;
[0047] Create a configuration database to store different versions of customized configuration data.
[0048] Optionally, corresponding response data is generated based on each customized configuration data, including:
[0049] Encapsulate each customized configuration data into a JSON response body, and generate corresponding response data based on each JSON response body;
[0050] Through the GET method, each response data is returned to the corresponding BMC.
[0051] Optionally, the BMC customization method further includes:
[0052] If the customized configuration data corresponding to the request parameter is not retrieved in the configuration database, an error status code is generated;
[0053] The error status code is returned to the corresponding BMC.
[0054] According to a third aspect of an embodiment of the present application, a BMC customization system is provided, including:
[0055] The customized server in the method as described in the first aspect or the second aspect of the embodiment of the present application; the customized server stores customized configuration data of at least one version of the BMC adapted to servers of different models;
[0056] At least one BMC in the method described in the first aspect or the second aspect of the embodiment of the present application; wherein at least two BMCs belong to servers of different models; and any BMC communicates with the customized server through a wireless network module.
[0057] The BMC customization method provided in this application sends a customization request to the customization server through the network module when the BMC needs to be customized. The customization request contains the version number of the current BMC, the version number to be customized (target version number), and the model of the server to which the BMC belongs. The customization server retrieves the customized configuration data corresponding to the target version number in the configuration database according to the customization request and returns it to the modified BMC. The BMC verifies the received customized configuration data, and automatically applies the customized configuration data (including modifying parameters, default values, enabling specific functions, changing interface layout, etc.) after the verification passes, so as to realize the automatic customization of the BMC version.
[0058] By adopting the BMC customization method provided by the present application, there is no need to develop dedicated firmware separately. It is only necessary to store customized configuration data applicable to different models of servers and different versions in the customized server. By retrieving the customized configuration data of the corresponding version requested by each BMC through the customized server and returning it to the BMC, the BMC can be quickly customized to meet the needs of users, reduce the complexity of BMC customization, and save labor costs. Through a customized server, the required different configuration versions can be provided for multiple BMCs belonging to different models of servers at the same time. The BMC can realize automatic verification and application customized configuration, which greatly improves the efficiency of BMC customization and speeds up production progress. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0060] Figure 1 This is one of the flow charts of the BMC customization method proposed in one embodiment of the present application;
[0061] Figure 2 This is the second flowchart of the BMC customization method proposed in one embodiment of the present application;
[0062] Figure 3 It is a schematic diagram of a process for verifying customized configuration data in one embodiment of the present application;
[0063] Figure 4 It is a schematic diagram of the architecture of the BMC customization system in one embodiment of the present application. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0065] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0066] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0067] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects as detailed in the present application.
[0068] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application may be combined with each other.
[0069] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments.
[0070] Figure 1 This is one of the flowcharts of the BMC customization method proposed in one embodiment of the present application. The method is applied to the BMC, and the BMC is connected to the customization server via a network module. Figure 1 As shown, the method includes:
[0071] S11: Generate a customization request based on the current version number of the BMC, the server model and the target version number to be customized;
[0072] S12: Sending the customization request to a customization server; the customization server is used to store customized configuration data of at least one version corresponding to the BMC; the customized configuration data includes at least one of the following: a script file, a configuration parameter, or a function switch instruction;
[0073] S13: receiving the customized configuration data returned by the customization server, and verifying the customized configuration data;
[0074] S14: When the customized configuration data passes verification, applying the customized configuration data.
[0075] In this embodiment, when the BMC needs to switch the customized version, it sends a customization request to the customization server. The BMC and the customization server are connected through a network module, and the communication between the two follows the HTTP / HTTPS protocol. The BMC sends the customization request to the customization server in the form of a POST request. The customization request contains request parameters, including: the version number of the current BMC, the model of the server to which the BMC belongs, and the target version number that needs to be customized. After receiving the customization request, the customization server parses the customization request to obtain the request parameters, and based on the request parameters, searches the configuration database to obtain the customized configuration data corresponding to the target version number. In the request parameters, the server model is used to verify the retrieved customized configuration data to ensure that the customized configuration data can be applied on the server currently deployed by the BMC. During the retrieval, the retrieved customized configuration data is screened according to the current version number of the BMC to ensure that the customized configuration data finally returned to the BMC can be applied based on the current version of the BMC.
[0076] After retrieving the corresponding customized configuration data, the customized server returns the customized configuration data to the BMC, and the BMC verifies the customized configuration data. If the verification passes, the BMC automatically applies the customized configuration data to implement version switching.
[0077] In this embodiment, by configuring a customized server to store the customized configuration data of the BMC, when the BMC needs to switch the customized version, the BMC directly connects to the customized server, obtains the customized configuration information from the configuration database, and automatically verifies the integrity of the customized configuration data and applies it (for example, turning on the switch of a specified function, replacing the web page layout), thereby realizing the switching of the customized version. There is no need to develop a separate BMC firmware, which greatly improves the speed of BMC customization. Moreover, when the customized configuration data needs to be modified, only the customized configuration data in the memory of the customized server needs to be modified, and each BMC automatically downloads and updates the configuration. Compared with the method of flashing the firmware of each server one by one, the complexity of the operation is greatly reduced, and data security can be guaranteed.
[0078] Based on the same inventive concept, an embodiment of the present application provides a BMC customization method. Figure 2 , Figure 2This is the second flowchart of the BMC customization method proposed in one embodiment of the present application. The method is applied to a customized server, and the customized server is connected to the BMC via a network module. Figure 2 As shown, the method includes:
[0079] S21: receiving a customization request sent by at least one BMC, parsing each customization request, and obtaining corresponding request parameters; the request parameters include: the current version number of the BMC, the server model to which the BMC belongs, and the target version number of the request;
[0080] S22: searching a configuration database according to each request parameter to obtain corresponding customized configuration data; the customized configuration data includes at least one of the following: a script file, a configuration parameter, or a function switch instruction;
[0081] S23: Generate corresponding response data based on each customized configuration data, and return it to the corresponding BMC.
[0082] In this embodiment, a Web service for customized information management is run on the customized server, which has the functions of receiving, storing and managing customized configuration data of various versions of BMC, and responding to the customization request of BMC through the API interface. In response to the customization request sent by BMC, the Web service uses the corresponding SQL statement to retrieve the configuration database to obtain the customized configuration data required by BMC, and returns it to BMC.
[0083] Customized configuration data can be a script file consisting of a series of commands, which is used to deploy specified functional modules and change the user interface layout; it can also be configuration parameters, which are used to modify the default values of certain parameters, monitor warning values, or replace the customer-specified LOGO; it can also be function switch instructions, which are used to enable functions that are not enabled on the general BMC version.
[0084] A configuration database is maintained through a customized server to centrally manage and maintain the customized configuration data of all BMCs. When BMCs in the same batch need to switch to the same customized version, they all obtain the same customized configuration data through the customized server, thereby ensuring the version consistency and data security of BMCs that switch customized versions in the same batch. When the customized configuration data needs to be updated, only the relevant customized configuration data needs to be updated in the configuration database of the customized server, or a new version of customized configuration data needs to be created, so that multiple BMCs can be updated uniformly.
[0085] In one embodiment, the configuration database also stores customized configuration data of historical versions, which are provided to server BMCs of different models to meet the requirements of rollback versions, so as to ensure that the BMC can run stably.
[0086] In one embodiment, when the customized configuration data stored in the configuration database is updated, or a new version of the customized configuration data is stored, the customized server searches for the IP addresses of all BMCs that have sent customization requests to it within the most recent preset time period based on the version of the customized configuration data and the model of the adapted server. Generate the first update information and push it to all IP addresses via a POST request, prompting the BMC to update the version. In actual application, the preset time period can be set as needed. In this embodiment, the preset time period can be set to 30 days. Based on the received first update information, the BMC parses and obtains the version corresponding to the currently updated customized configuration data, regenerates the customization request and sends it to the customized server.
[0087] The customized server actively pushes the update information of customized configuration data to the BMC, so that the BMC can timely update the configuration of the current application, or switch to the new version of the configuration, to achieve automatic maintenance and update of the unattended server BMC and improve the user experience.
[0088] Optionally, after receiving the first update information, the BMC may also generate an update prompt and display it on the user interface, so that the user can manually trigger the download and update of current configuration data and application processes to ensure the stability of the BMC during operation.
[0089] As an implementation manner of the present application, before receiving the customization request sent by at least one BMC, the method further includes:
[0090] Deploy a Web service on the customized server, and the customized server communicates with each BMC based on the HTTPS protocol through the Web service;
[0091] Set the target port and the corresponding routing path to receive and route the customization requests sent by each BMC;
[0092] Create a configuration database to store different versions of customized configuration data.
[0093] In this embodiment, before the customized server receives the customization request, a Web service application must first be deployed. In this embodiment, Apache Tomcat or Nginx is used as the HTTP server. The server is configured with SSL / TLS encryption and supports the HTTPS protocol to ensure the security of data transmission. The Web service provides a Redfish interface to the outside world, allowing the BMC to obtain the latest customized configuration data through a POST request based on the HTTP / HTTPS protocol, and configures the POST request to listen on a specific port (such as port 443 of HTTPS). When the BMC sends a request to this interface via HTTPS, the Web server receives the request and routes it to the corresponding processing logic according to the URI. In addition, the customized server maintains a configuration database or file system internally for storing and indexing customized configuration data. When the API interface of the customized server receives the request, it queries the configuration database to match the corresponding customized configuration data by parsing the request parameters.
[0094] As an implementation manner of the present application, sending the customization request to the customization server includes:
[0095] Sending a ping command to the customized server through the network module to check connectivity with the customized server;
[0096] When the customization server is connected, the customization request is sent to the target port of the customization server based on the HTTPS protocol.
[0097] In one embodiment, the BMC communicates with the customized server through a wired network module or a wireless network module. In practical applications, a wired network module or a wireless network module may be used as required, such as a network card, a switch, a wifi module, etc. Optionally, a suitable network module may be selected based on the physical distance between the customized server and the server where the BMC is located and the network complexity. When the customized server is customized for the BMC of a large server cluster, a switch may be selected as a network module for communication.
[0098] Before sending a customization request, the BMC first needs to confirm the network connectivity with the customization server. Specifically, the BMC sends a ping command to the customization server through the network module to check the connectivity with the customization server. When the network connectivity is confirmed, the BMC sends a POST request (customization request) to the Redfish interface of the customization server based on the HTTP / HTTPS protocol.
[0099] As an implementation mode of the present application, corresponding response data is generated based on each customized configuration data, including:
[0100] Encapsulate each customized configuration data into a JSON response body, and generate corresponding response data based on each JSON response body;
[0101] Through the GET method, each response data is returned to the corresponding BMC.
[0102] In one embodiment, the customization server generates response data based on the retrieved customized configuration data, and returns the response data to the BMC via a GET response. Specifically, the customized configuration data is encapsulated into the JSON format required by the Redfish specification as the response body. The response data includes an HTTP status code, a response header, and the response body. After the response data is generated, the response data is returned to the BMC via the Web service HTTP / HTTPS protocol.
[0103] As an implementation manner of the present application, receiving the customized configuration data returned by the customization server and verifying the customized configuration data includes:
[0104] Receiving response data sent by the customization server, and obtaining customized configuration data from a response body of the response data;
[0105] Obtain the version number and server model of the customized configuration data, and compare them with the target version number and the server model to which the BMC belongs;
[0106] When the version number of the customized configuration data is consistent with the target version number, and the server model of the customized configuration data is consistent with the server model to which the BMC belongs, a hash check algorithm or a digital signature algorithm is used to perform integrity check on the customized configuration data;
[0107] If the integrity check passes, the customized configuration data is subjected to a legality check, including: checking whether the string length and complexity of the parameters in the customized configuration data meet the requirements of the setting format, and whether the parameter settings are within the parameter range of the configuration item;
[0108] In the case where the legality check passes, it is determined that the customized configuration data passes the check, and the customized configuration data is stored in the memory.
[0109] In one embodiment, after the BMC receives the response data returned by the customization server, it parses the response data to obtain the customized configuration data, and before applying the customized configuration data to implement version switching, it also verifies the customized configuration data. Figure 3 1 is a flow chart of verifying customized configuration data in one embodiment of the present application. Figure 3 As shown, in this embodiment, the process of verifying the customized configuration data is as follows:
[0110] (1) Parse the response data, obtain the data in JSON format from the response body, and further process it to obtain customized configuration data;
[0111] (2) Compare the version number of the customized configuration data with the requested target version number to see if they are consistent; compare the server model to which the customized configuration data is adapted with the server model where the BMC is located to see if they are consistent; if the comparison results are consistent, perform integrity check on the customized configuration data;
[0112] (3) The integrity check uses a hash check algorithm or a digital signature algorithm. After the integrity check passes, the legality of the customized configuration data is further checked;
[0113] (4) Check the legality of the customized configuration data, including but not limited to: whether the length and complexity of the string meet the requirements of the setting format, whether the parameter settings are within the parameter range of the configuration item, etc.;
[0114] (5) If the legality check passes, determine that the customized configuration data has passed the check and store the customized configuration data in the local memory.
[0115] In this embodiment, multiple checks are performed on the customized configuration data returned by the customization server to ensure the integrity and security of the data, avoid failures during BMC operation caused by missing or illegal data, and ensure that the BMC provides stable services to users before and after switching versions.
[0116] As an implementation manner of the present application, the BMC customization method further includes:
[0117] When the version number of the customized configuration data is inconsistent with the target version number, or the server model of the customized configuration data is inconsistent with the server model to which the BMC belongs, determining that a version error occurs in the customized configuration data;
[0118] Stop integrity checking of the customized configuration data, and record first log data; the first log data is used to indicate that the currently acquired customized configuration data does not match the requested version.
[0119] In one embodiment, if Figure 3As shown, if the version number of the customized configuration data is inconsistent with the requested target version number during verification, or the customized configuration data cannot be adapted to the server where the BMC is located, it means that the customized server has returned incorrect customized configuration data. Based on this, the BMC records the first log data indicating that the customized configuration data does not match the requested version, and stops the integrity check and legality check of the customized configuration data, and discards the customized configuration data.
[0120] As an implementation manner of the present application, the BMC customization method further includes:
[0121] In the case where the integrity check fails, the legality check of the customized configuration data is stopped, and second log data is recorded; the second log data is used to indicate that data loss occurs in the currently acquired customized configuration data;
[0122] In the case where the legality check fails, the customized configuration data is not stored, and third log data is recorded; the third log data is used to indicate that a parameter error occurs in the currently acquired customized configuration data.
[0123] In one embodiment, if Figure 3 As shown, if the integrity check of the customized configuration data fails, it means that the customized configuration data has data loss during transmission, and the subsequent legality check of the customized configuration data is stopped, and the customized configuration data is discarded. The second log data is recorded to indicate that the customized configuration data has data loss.
[0124] like Figure 3 As shown, if the legality check of the customized configuration data fails, it means that a parameter error occurs in the customized configuration data, that is, there are parameter settings that do not meet the requirements, so the customized configuration data cannot be used and is discarded. The third log data is recorded to indicate that a parameter error occurs in the customized configuration data.
[0125] In this embodiment, the log data corresponding to the fault record in the verification process is convenient for engineers to perform statistical tracing and maintain the normal operation of the BMC. Optionally, based on the first log data, the second log data or the third log data generated in the above verification process, corresponding prompt information is generated and displayed on the user interface, so that engineers can troubleshoot the fault in time and resend the customization request to complete the customized version switch of the BMC.
[0126] As an implementation manner of the present application, the BMC customization method further includes:
[0127] generating a first instruction based on the second log data or the third log data;
[0128] Based on the first instruction, the customization request is sent to the customization server again at a first interval.
[0129] In one embodiment, the integrity check failure and the legality check failure may be due to data loss or parameter errors caused by some reasons (such as network factors) during data transmission. After generating the second log data or the third log data, the BMC generates a first instruction for regenerating the customization request and sending it to the customization server.
[0130] According to the first instruction, the customization request is resent to the customization server at the first interval, and the customization configuration data returned by the customization server is rechecked, so as to automatically repair some fault problems in the process of switching versions by multiple requests and verifying data.
[0131] Optionally, a repetition threshold for repeatedly sending customization requests is set (for example, the repetition threshold is set to 5). When the number of times the customization request is repeatedly generated and sent reaches the repetition threshold, a prompt message is generated and displayed on the user interface, instructing the user to manually troubleshoot to complete the version switch.
[0132] As an implementation manner of the present application, the BMC customization method further includes:
[0133] After sending the customization request to the customization server, recording the sending time;
[0134] Comparing the sending duration with a first threshold, and determining that the request has timed out when the sending duration reaches the first threshold and the customized configuration data returned by the customized server is not received;
[0135] Stop receiving the data sent by the customized server and generate fourth log data; the fourth log data is used to indicate that the customized configuration data is not obtained within a specified time.
[0136] In one embodiment, the BMC determines whether a request timeout occurs based on a set first threshold. In this embodiment, after the BMC sends a customization request to the customization server, it starts to record the sending time. When the sending time reaches the first threshold (for example, 30s) and no response data (customized configuration data) is received from the customization server, it is determined that the currently sent request has timed out. The request timeout may be caused by factors such as network delay. In this embodiment, when a request timeout occurs, the customization request is stopped from being received or repeatedly sent, and a fourth log data is generated, indicating that the customization plan configuration data has not been obtained within the specified time (first threshold). Optionally, a prompt message is generated and displayed on the user interface, prompting the user that there may be a network delay and manual troubleshooting is required. By setting the first threshold, the length of time that the BMC waits for the customization server to respond is limited, so as to avoid the version switching process taking too long and reducing the user experience.
[0137] As an implementation manner of the present application, the BMC customization method further includes:
[0138] If the customized configuration data corresponding to the request parameter is not retrieved in the configuration database, an error status code is generated;
[0139] The error status code is returned to the corresponding BMC.
[0140] As an implementation manner of the present application, the BMC customization method further includes:
[0141] When the sending duration does not reach the first threshold and an error status code returned by the customization server is received, fifth log data is generated; the fifth log data is used to indicate that customized configuration data of the target version does not exist.
[0142] In one embodiment, if the customization server cannot retrieve the relevant customized configuration data in the configuration database, it returns an error status code, such as 404, to the BMC that sent the customization request. When the BMC receives the error status code, it generates fifth log data indicating that the customized configuration data of the target version does not exist.
[0143] Optionally, prompt information is generated based on the fifth log data, prompting the user to manually modify the target version number to regenerate the customization request.
[0144] As an implementation manner of the present application, applying the customized configuration data includes:
[0145] Reading the customized configuration data from the memory;
[0146] Based on the customized configuration data, adjust the configuration of the BMC, including: modifying network parameters, modifying default values of function parameters, adjusting the layout of the Web user interface, modifying the user default password, and replacing the user customized Logo;
[0147] After the configuration adjustment is completed, the BMC is restarted to apply the new configuration.
[0148] In one embodiment, after the verification is passed, the BMC reads the stored customized configuration data from the memory, and adjusts the BMC configuration based on the script file, configuration parameters or function switch instructions in the customized configuration data, for example, modifying the network parameters, default settings of knee function parameters, changing the layout of the BMC user interface, modifying the factory default password of the BMC, changing the user's new logo, etc.
[0149] After the configuration adjustment is completed, the BMC performs a restart to make the configuration adjustment take effect and complete the BMC version switch.
[0150] Based on the same inventive concept, an embodiment of the present application provides a BMC customization system. Figure 4 , Figure 4 Schematic diagram of the architecture of the BMC customization system in one embodiment of the present application. Figure 4 As shown, the system includes:
[0151] A customized server as provided in the above embodiment; the customized server stores customized configuration data of at least one version of BMC adapted to different models of servers;
[0152] At least one BMC as provided in the above embodiment; wherein at least two BMCs belong to servers of different models; any BMC communicates with the customized server via a wireless network module.
[0153] Based on the same inventive concept, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps in the BMC customization method described in any of the above embodiments of the present application are implemented.
[0154] Based on the same inventive concept, an embodiment of the present application provides a readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the BMC customization method described in any of the above embodiments of the present application are implemented.
[0155] Based on the same inventive concept, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the computer program, the steps in the BMC customization method described in any of the above embodiments of the present application are implemented.
[0156] Regarding the system in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0157] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
[0158] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and components involved are not necessarily required by the present application.
[0159] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt 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.) containing computer-usable program codes.
[0160] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0161] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0163] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the present application is interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0164] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0165] The BMC customization method and system provided by the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. At the same time, for those skilled in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present application.
Claims
1. A BMC customization method, characterized in that: Applied to BMC, the BMC is connected to the customized server via a network module; the method includes: Generate a customization request based on the current version number of the BMC, the server model, and the target version number that needs to be customized; Sending the customization request to a customization server; the customization server is used to store customized configuration data of at least one version corresponding to the BMC; the customized configuration data includes at least one of the following: a script file, a configuration parameter or a function switch instruction; Receiving the customized configuration data returned by the customization server, and verifying the customized configuration data; In the case where the customized configuration data passes verification, the customized configuration data is applied.
2. The BMC customization method according to claim 1, characterized in that: Sending the customization request to the customization server includes: Sending a ping command to the customized server through the network module to check connectivity with the customized server; When the customization server is connected, the customization request is sent to the target port of the customization server based on the HTTPS protocol.
3. The BMC customization method according to claim 1, characterized in that: Receiving the customized configuration data returned by the customization server and verifying the customized configuration data includes: Receiving response data sent by the customization server, and obtaining customized configuration data from a response body of the response data; Obtain the version number and server model of the customized configuration data, and compare them with the target version number and the server model to which the BMC belongs; When the version number of the customized configuration data is consistent with the target version number, and the server model of the customized configuration data is consistent with the server model to which the BMC belongs, a hash check algorithm or a digital signature algorithm is used to perform integrity check on the customized configuration data; If the integrity check passes, the customized configuration data is subjected to a legality check, including: checking whether the string length and complexity of the parameters in the customized configuration data meet the requirements of the setting format, and whether the parameter settings are within the parameter range of the configuration item; In the case where the legality check passes, it is determined that the customized configuration data passes the check, and the customized configuration data is stored in the memory.
4. The BMC customization method according to claim 3, characterized in that: Also includes: When the version number of the customized configuration data is inconsistent with the target version number, or the server model of the customized configuration data is inconsistent with the server model to which the BMC belongs, determining that a version error occurs in the customized configuration data; Stop integrity checking of the customized configuration data, and record first log data; the first log data is used to indicate that the currently acquired customized configuration data does not match the requested version.
5. The BMC customization method according to claim 3, characterized in that: Also includes: If the integrity check fails, stop checking the legality of the customized configuration data and record the second log data; The second log data is used to indicate that data loss occurs in the currently acquired customized configuration data; In the case where the legality check fails, the customized configuration data is not stored, and third log data is recorded; the third log data is used to indicate that a parameter error occurs in the currently acquired customized configuration data.
6. The BMC customization method according to claim 5, characterized in that: Also includes: generating a first instruction based on the second log data or the third log data; Based on the first instruction, the customization request is sent to the customization server again at a first interval.
7. The BMC customization method according to claim 1, characterized in that: Also includes: After sending the customization request to the customization server, recording the sending time; Comparing the sending duration with a first threshold, and determining that the request has timed out when the sending duration reaches the first threshold and the customized configuration data returned by the customized server is not received; Stop receiving the data sent by the customized server and generate fourth log data; the fourth log data is used to indicate that the customized configuration data is not obtained within a specified time.
8. The BMC customization method according to claim 7, characterized in that: Also includes: When the sending duration does not reach the first threshold and an error status code returned by the customized server is received, generating fifth log data; The fifth log data is used to indicate that the customized configuration data of the target version does not exist.
9. The BMC customization method according to claim 1, characterized in that: Applying the customized configuration data includes: Reading the customized configuration data from the memory; Based on the customized configuration data, adjust the configuration of the BMC, including: modifying network parameters, modifying default values of function parameters, adjusting the layout of the Web user interface, modifying the user default password, and replacing the user customized Logo; After the configuration adjustment is completed, the BMC is restarted to apply the new configuration.
10. A BMC customization method, characterized in that: Applied to a customized server, the customized server is connected to the BMC via a network module; the method comprises: Receive at least one customization request sent by a BMC, parse each customization request, and obtain corresponding request parameters; the request parameters include: the current version number of the BMC, the server model to which the BMC belongs, and the target version number of the request; Retrieving a configuration database according to each request parameter to obtain corresponding customized configuration data; the customized configuration data includes at least one of the following: a script file, a configuration parameter, or a function switch instruction; Corresponding response data is generated based on each customized configuration data and returned to the corresponding BMC.
11. The BMC customization method according to claim 10, characterized in that: Before receiving the customization request sent by at least one BMC, the method further includes: Deploy a Web service on the customized server, and the customized server communicates with each BMC based on the HTTPS protocol through the Web service; Set the target port and the corresponding routing path to receive and route the customization requests sent by each BMC; Create a configuration database to store different versions of customized configuration data.
12. The BMC customization method according to claim 10, characterized in that: Generate corresponding response data based on each customized configuration data, including: Encapsulate each customized configuration data into a JSON response body, and generate corresponding response data based on each JSON response body; Through the GET method, each response data is returned to the corresponding BMC.
13. The BMC customization method according to claim 10, characterized in that: Also includes: If the customized configuration data corresponding to the request parameter is not retrieved in the configuration database, an error status code is generated; The error status code is returned to the corresponding BMC.
14. A BMC customization system, characterized in that: include: The customized server according to any one of the methods of claims 1 to 9 or claims 10 to 13; The customized server stores customized configuration data of at least one version of the BMC adapted to different models of servers; At least one BMC according to any one of claims 1-9 or claims 10-13; wherein at least two BMCs belong to servers of different models; and any BMC communicates with the customized server via a wireless network module.
