Concurrent software upgrade method and device
By simultaneously updating the debugging code before upgrading the concurrent software, it is consistent with the business code, and the problem of inconsistent output of the debugging code and the business code result after the upgrade is solved, and debugging efficiency is improved.
Patent Information
- Application Number
- CN202411812510.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-10
AI Technical Summary
After the concurrent software is upgraded, the debugging code and the result output of the business code is inconsistent, resulting in low debugging efficiency.
Before upgrading the concurrent software, update the debugging code synchronously to make it consistent with the result output corresponding to the business code that was updated, and then perform the software upgrade.
Ensure that when debugging after the concurrent software is upgraded, the debugging environment remains consistent with the actual operating environment, which improves debugging efficiency.
Smart Images

Figure CN119311296B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the computer field, and more specifically, to a concurrent software upgrade method and device. Background Art
[0002] In the prior art, when the concurrent software is upgraded by updating the business code, it is not detected whether the business code and the debugging code are consistent, which results in only modifying the business code but not the debugging code. Then, during the debugging process after the concurrent software is upgraded, the debugging environment and the actual operating environment output are inconsistent, which leads to the problem of low debugging efficiency of the concurrent software after the upgrade. Therefore, there is a problem of low debugging efficiency of the concurrent software after the upgrade.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a concurrent software upgrade method and device to at least solve the problem of low debugging efficiency of concurrent software after upgrade in the related art.
[0005] According to an embodiment of the present application, a concurrent software upgrade method is provided, comprising:
[0006] Obtaining updated business code in the concurrent software, wherein the business code is the code that actually executes the business logic, and the concurrent software is located in the environment of the storage cluster;
[0007] Obtaining a debugging code corresponding to the updated business code, wherein the debugging code is a code used to assist debugging during development or maintenance;
[0008] The corresponding debugging code is updated to obtain an updated debugging code, wherein the result output corresponding to the updated debugging code is consistent with the result output corresponding to the updated business code;
[0009] The concurrent software is upgraded through the updated business code and the updated debugging code.
[0010] According to another embodiment of the present application, a concurrent software upgrade device is provided, comprising:
[0011] A first acquisition unit is used to acquire updated business codes in concurrent software, wherein the business codes are codes that actually execute business logic, and the concurrent software is located in an environment of a storage cluster;
[0012] A second acquisition unit is used to acquire a debugging code corresponding to the updated business code, wherein the debugging code is a code used to assist debugging during development or maintenance;
[0013] An updating unit, used for updating the corresponding debugging code to obtain an updated debugging code, wherein the result output corresponding to the updated debugging code is consistent with the result output corresponding to the updated business code;
[0014] The upgrading unit is used to upgrade the concurrent software through the updated business code and the updated debugging code.
[0015] In an optional embodiment, the update unit includes: a first update module, used to update the corresponding debug code to obtain an updated debug code; a detection module, used to perform consistency detection on the updated debug code and the updated business code; a second update module, used to re-update the updated debug code if the consistency detection fails; and a determination module, used to determine the updated debug code as the updated debug code if the consistency detection passes.
[0016] In an optional embodiment, the above-mentioned first update module includes: an acquisition sub-module, used to obtain the mapping relationship between at least one first element in the above-mentioned updated business code and at least one second element in the above-mentioned corresponding debugging code; an update sub-module, used to use the above-mentioned mapping relationship to update the above-mentioned at least one second element according to the above-mentioned at least one first element to obtain the at least one second element that has been updated.
[0017] In an optional embodiment, the above-mentioned update submodule includes: a first update subunit, used to use the above-mentioned mapping relationship to update the above-mentioned second element of the first type according to the first element of the first type; a second update subunit, used to use the above-mentioned mapping relationship to update the above-mentioned second element of the second type according to the first element of the second type.
[0018] In an optional embodiment, the above-mentioned detection module includes: a mapping submodule, used to expand the above-mentioned at least one first element and the above-mentioned at least one second element that has been updated, and map them into a memory mapping file; a detection submodule, used to perform the above-mentioned consistency detection on the above-mentioned at least one first element and the above-mentioned at least one second element that has been updated through the above-mentioned memory mapping file.
[0019] In an optional embodiment, the upgrade unit includes: a first packaging module, used to package the first component corresponding to the updated business code to obtain a packaged business component; a second packaging module, used to package the second component corresponding to the updated debugging code to obtain a packaged debugging component; an integration module, used to integrate the packaged business component and the packaged debugging component into an ISO image; an upgrade module, used to respond to an upgrade request for the concurrent software and upgrade the concurrent software through the ISO image.
[0020] In an optional embodiment, the second packaging module includes: an encryption submodule, used to encrypt the second component using a key stored in the root file system.
[0021] In an optional embodiment, the encryption submodule includes: a packaging subunit, used to read the packaged business components and the packaged debugging components from the ISO image; a verification subunit, used to use the key to perform a security verification on the packaged debugging components; and an upgrade subunit, used to upgrade the concurrent software through the packaged business components and the packaged debugging components if the security verification passes.
[0022] In an optional embodiment, the second packaging module includes: a collecting submodule, which is used to use at least one filter to collect target files required to build the second component before packaging the second component corresponding to the updated debugging code to obtain the packaged debugging component, wherein the target files include the updated debugging code; and a building submodule, which is used to build the second component using the target files.
[0023] In an optional embodiment, the above-mentioned collection submodule includes: a first collection subunit, used to use a first filter to collect the first file under the target path, and add the above-mentioned first file to the dependency list of the above-mentioned target file, wherein the above-mentioned at least one filter includes the above-mentioned first filter, and the above-mentioned dependency list is a list for storing the above-mentioned target file; a second collection subunit, used to use a second filter to collect the second file under the target name, and add the above-mentioned second file to the above-mentioned dependency list, wherein the above-mentioned at least one filter includes the above-mentioned second filter; a third collection subunit, used to use a third filter to collect the third file under the target installation mode, and add the above-mentioned third file to the above-mentioned dependency list, wherein the above-mentioned at least one filter includes the above-mentioned third filter.
[0024] In an optional embodiment, the updating unit includes: a setting module, which is used to set the version number of the packaged debugging component as the version number of the packaged business component.
[0025] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.
[0026] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0027] Through this application, before the concurrent software is upgraded by updating the business code, the debugging code is updated at the same time, so that the result output corresponding to the debugging code is consistent with the result output corresponding to the updated business code, and the concurrent software is upgraded according to the updated business code and debugging code, so that when the concurrent software is debugged after the upgrade, the debugging environment is consistent with the actual operating environment. Therefore, the problem of low debugging efficiency of the concurrent software after the upgrade can be solved, thereby achieving the technical effect of improving the debugging efficiency of the upgraded concurrent software. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 is a schematic diagram of an application environment of a concurrent software upgrade method according to an embodiment of the present application;
[0029] Figure 2 is a flowchart of a concurrent software upgrade method according to an embodiment of the present application;
[0030] Figure 3 is a schematic diagram of a concurrent software upgrade method according to an embodiment of the present application;
[0031] Figure 4 is a schematic diagram of a concurrent software upgrade method according to an embodiment of the present application;
[0032] Figure 5 is a schematic diagram of a concurrent software upgrade method according to an embodiment of the present application;
[0033] Figure 6 It is a structural block diagram of a concurrent software upgrade device according to an embodiment of the present application. DETAILED DESCRIPTION
[0034] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0036] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a concurrent software upgrade method in an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0037] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the concurrent software upgrade method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0038] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0039] In this embodiment, a concurrent software upgrade method is provided. Figure 2 is a flowchart of a concurrent software upgrade method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0040] Step S202, obtaining updated business codes in the concurrent software, wherein the business codes are codes that actually execute business logic, and the concurrent software is located in an environment of a storage cluster;
[0041] In an optional embodiment, concurrent software may refer to, but is not limited to, a software system capable of executing multiple tasks or multiple requests simultaneously. In concurrent software, multiple tasks and / or requests may be executed in parallel or alternately. Concurrent software may refer to, but is not limited to, concurrent execution using threads or processes. A thread may refer to, but is not limited to, the smallest unit of program execution, and a process may refer to, but is not limited to, an instance of program execution.
[0042] It should be noted that since concurrently executed tasks may share resources in concurrent software, it is necessary to ensure mutual exclusion and synchronization between tasks. Mutual exclusion between tasks can be, but is not limited to, preventing multiple tasks from accessing and modifying shared resources at the same time, thereby protecting shared resources. Synchronization between tasks can be, but is not limited to, used to coordinate the execution order and communication between tasks.
[0043] In an optional embodiment, the business code may be, but is not limited to, program code for implementing specific business logic, and may be, but is not limited to, code written according to business requirements and business processes for processing business data, executing business rules, and completing pending business functions.
[0044] To further illustrate, when the service is used for user interaction, the service may, but is not limited to, include interactive functions with users and / or other systems, such as receiving commands input by users, processing commands input by users, displaying processing results, etc. The service code corresponding to the service should include codes such as receiving commands input by users, processing user commands, and displaying processing results.
[0045] In an optional embodiment, the storage cluster may be, but is not limited to, a distributed storage system composed of multiple storage nodes, and may have, but is not limited to, features such as high availability, scalability, and centralized management. High availability may be, but is not limited to, that when a storage node fails, other nodes are not affected and can continue to provide services; scalability may be, but is not limited to, that users can add new storage nodes at any time according to demand without affecting existing services; centralized management may be, but is not limited to, that storage resources in the storage cluster can be managed in a unified manner.
[0046] It should be noted that since storage clusters usually have data protection and fault-tolerance mechanisms, such as data backup, data redundancy, and failover mechanisms, storing concurrent software in a storage cluster environment can improve data reliability and recoverability, and protect business data in concurrent software from hardware failures or other unexpected situations.
[0047] To further illustrate, data backup can be, but is not limited to, regularly copying data in the storage cluster to other storage media, such as cloud storage and tapes, to ensure that in the event of data loss, it can be restored to an earlier state; data redundancy can be, but is not limited to, maintaining a complete copy of the data on multiple storage nodes, so that even if one node fails, other nodes can continue to provide services; failover can be, but is not limited to, automatically transferring other request nodes to other healthy storage nodes when the system detects that a storage node has failed.
[0048] Step S204, obtaining a debugging code corresponding to the updated business code, wherein the debugging code is a code used to assist debugging during development or maintenance;
[0049] In an optional embodiment, the debugging code may be, but is not limited to, code used to assist debugging during the development or maintenance process. Depending on the structure and logic of the business code, the debugging code may be, but is not limited to, used to help developers understand the program execution process, locate problems with the business code, and resolve problems with the business code.
[0050] Step S206, updating the corresponding debugging code to obtain an updated debugging code, wherein the result output corresponding to the updated debugging code is consistent with the result output corresponding to the updated business code;
[0051] It should be noted that when the business code is updated, the updated business code may introduce new logic or modify existing logic. In order to accurately debug the changes in the business code, it is necessary to synchronize the changes in the debug code to prevent the output results of the debug code from being inconsistent with the output results of the business code, thereby affecting the developers to draw wrong conclusions and make wrong operations.
[0052] Step S208, upgrading the concurrent software through the updated business code and the updated debugging code.
[0053] In an optional embodiment, updating the concurrent software may be, but is not limited to, updating, improving or repairing the existing concurrent software, and may be, but is not limited to, used to improve performance, functionality or stability.
[0054] Through the above steps, before the concurrent software is upgraded by updating the business code, the debugging code is updated at the same time, so that the result output corresponding to the debugging code is consistent with the result output corresponding to the updated business code, and the concurrent software is upgraded according to the updated business code and debugging code, so that when the concurrent software is debugged after the upgrade, the debugging environment is consistent with the actual operating environment. The problem of low debugging efficiency of concurrent software after the upgrade can be solved, thereby achieving the technical purpose of making full use of the multi-core processor and parallel computing capabilities of the server, and further achieving the technical effect of improving the debugging efficiency of the upgraded concurrent software.
[0055] The execution subject of the above steps may be a server, a terminal, etc., but is not limited thereto.
[0056] As an optional solution, the corresponding debugging code is updated to obtain the updated debugging code, including:
[0057] S1-1, update the corresponding debugging code to obtain the updated debugging code;
[0058] S1-2, performing consistency check on the updated debugging code and the updated business code;
[0059] S1-3, if the consistency check fails, re-update the updated debugging code;
[0060] S1-4, when the consistency check passes, the updated debugging code is determined as the updated debugging code.
[0061] In an optional embodiment, consistency detection may be, but is not limited to, a process of verifying the consistency and integrity of data in concurrent software, and may include, but is not limited to: code comparison, logic consistency verification, functional consistency verification, data consistency verification, etc. Among them, code comparison may be, but is not limited to, comparing updated debug code and business code to check the differences and changes between them; logic consistency verification may be, but is not limited to, checking whether the logic of the debug code is consistent with the logic of the updated business code; functional consistency verification may be, but is not limited to, verifying whether the function of the debug code is consistent with the function of the updated business code; data consistency verification may be, but is not limited to, verifying whether the debug code and the business code process data consistently, and whether the processed data is consistent.
[0062] It should be noted that after the consistency check is passed, it is determined that the updated debug code is the updated debug code, which means that the debug code is consistent with the updated business code, and the logic and functions are correct. If the consistency check fails, it means that there is a flaw in some aspect when updating the debug code. At this time, the debug code needs to be updated again, otherwise errors may occur due to the inconsistency between the debug code and the business code.
[0063] Through the embodiments of the present application, after the business code is updated, the corresponding debug code of the response is updated. If the updated debug code is inconsistent with the business code, the debug code is updated again until it passes the consistency test, thereby avoiding potential risks caused by the inconsistency between the debug code and the business code.
[0064] As an optional solution, the corresponding debugging code is updated to obtain the updated debugging code, including:
[0065] S2-1, obtaining a mapping relationship between at least one first element in the updated service code and at least one second element in the corresponding debugging code;
[0066] S2-2, using the mapping relationship, update at least one second element according to at least one first element to obtain at least one updated second element.
[0067] When upgrading concurrent software by updating the business code, it is often not necessary to change all the codes in the business code. Instead, new business code is obtained by modifying, deleting, and adding elements in the business code. Therefore, when changing the debug code in accordance with the business code, it is only necessary to modify, delete, and add elements in accordance with the business code, and then perform the same operations on the elements in the debug code to update the debug code.
[0068] In an optional embodiment, the element may include but is not limited to at least one of the following: a structure variable, an array variable, a macro definition, a function structure, a timer, etc.
[0069] In an optional embodiment, the mapping relationship may be, but is not limited to, a corresponding relationship, may be, but is not limited to, an association or relationship between elements in one set and elements in another set, may be, but is not limited to, being used to describe a one-to-one correspondence between sets, and may be, but is not limited to, being used to describe a one-to-one correspondence between different data structures.
[0070] In an optional embodiment, obtaining a mapping relationship between at least one first element in the updated business code and at least one second element in the corresponding debug code may be, but is not limited to, obtaining an element in the business code and associating it with a corresponding element type obtained from the debug code.
[0071] It should be noted that establishing a mapping relationship between the elements of the business code and the elements of the debug code can ensure that the elements of the business code and the debug code remain consistent. When updating or modifying the business code, the mapping relationship with the debug code can ensure that the corresponding elements in the debug code can be found immediately and updated or modified.
[0072] Through the embodiments of the present application, by establishing a mapping relationship between business code and debug code, after the business code is modified, the elements corresponding to the debug code can be modified at the same time according to the mapping relationship, thereby ensuring the consistency of the business code and the debug code and improving the maintainability of the code.
[0073] As an optional solution, using a mapping relationship, updating at least one second element according to at least one first element to obtain at least one updated second element includes:
[0074] Using the mapping relationship, according to the first element of the first type, the second element of the first type is updated;
[0075] The second element of the second type is updated according to the first element of the second type by using the mapping relationship.
[0076] It should be noted that the behavior of business code and debug code should be consistent to facilitate accurate debugging and analysis. If mappings are established between different types of elements, it may lead to behavioral differences during code execution, thus affecting the accuracy of debugging and analysis.
[0077] Through the embodiments of the present application, the second element of the first type is updated according to the first element of the first type by utilizing the mapping relationship; and the second element of the second type is updated according to the first element of the second type by utilizing the mapping relationship. This ensures that when the elements of the business code are updated, the corresponding element type can be found in the debugging code for update according to the mapping relationship.
[0078] As an optional solution, the updated debugging code is checked for consistency with the updated business code, including:
[0079] S3-1, expand at least one first element and at least one updated second element, and map them into a memory-mapped file;
[0080] S3-2, performing consistency check on at least one first element and at least one updated second element through a memory mapping file.
[0081] In an optional embodiment, a memory mapped file may be, but is not limited to, a technology for mapping file contents into the virtual memory space of a process, and may be, but is not limited to, mapping the contents of a file or code into the memory of a process so that the file or code can be read and written like memory.
[0082] It should be noted that the memory-mapped file allows the code content to be manipulated directly in memory, so that consistency checks can be performed quickly, improving the timeliness of consistency checks. During code compilation, the compiler expands the first element of all business codes and the second element of the debug code, and maps them to a memory-mapped file, and then performs a consistency check to check whether the first element is consistent with the updated second element. If they are inconsistent, it means that the debug code has not been updated or the update has failed, which has hidden debugging risks and will output error information during compilation.
[0083] Through the embodiments of the present application, at least one first element and at least one second element that is updated are expanded and mapped into a memory mapping file. Through the memory mapping file, consistency check is performed on at least one first element and at least one second element that is updated, thereby ensuring data consistency.
[0084] As an optional solution, the concurrent software is upgraded through the updated business code and the updated debugging code, including:
[0085] S4-1, packaging the first component corresponding to the updated business code to obtain a packaged business component;
[0086] S4-2, packaging the second component corresponding to the updated debugging code to obtain a packaged debugging component;
[0087] S4-3, integrating the packaged business components and the packaged debugging components into the ISO image;
[0088] S4-4, in response to the upgrade request for the concurrent software, the concurrent software is upgraded through the ISO image.
[0089] In an optional embodiment, the first component corresponding to the updated business code is packaged, which may include but is not limited to integrating all related business logic codes, components, modules and dependencies together to form a complete and deployable unit.
[0090] A business component may be, but is not limited to, a module or unit that encapsulates specific business logic, functions, and data processing capabilities, and may be, but is not limited to, used to implement specific functions or business logic.
[0091] In an optional embodiment, the first component corresponding to the updated business code is packaged, which may include but is not limited to integrating all related debugging logic codes, components, modules and dependencies together to form a complete and deployable unit.
[0092] The debugging component may be, but is not limited to, a module or unit that detects, diagnoses, tracks, and repairs problems of concurrent software after upgrading, and may include, but is not limited to, functions such as logging, exception handling, and assertion verification.
[0093] In an optional embodiment, log records may include, but are not limited to, information such as the operation status, errors, and exceptions of concurrent software; exception handling may include, but is not limited to, starting an exception repair program to locate and repair the exception of the concurrent software after an exception occurs in the concurrent software; assertion authentication may include, but is not limited to, emphasizing conditions that must be met before executing business or code.
[0094] In an optional embodiment, the ISO image may be, but is not limited to, a disc image file, including all data and file system information on the disc, and may be, but is not limited to, have an extension of ".iso".
[0095] The ISO image may also include, but is not limited to, boot files and isoLinux files. The boot file may be, but is not limited to, a file used to start the operating system in the ISO image. The isoLinux file may be, but is not limited to, a boot loader for an optical disc, and may be, but is not limited to, used to boot or operate a Linux operating system from the ISO image.
[0096] Integrating the packaged business components and debugging components into an ISO image can ensure that the components related to the concurrent software upgrade are concentrated together. When the concurrent software is upgraded, it is convenient to call the business components for upgrade and the debugging components for debugging.
[0097] Through the embodiments of the present application, the packaged business components and debugging components are uniformly integrated into the ISO image, so that the business components and debugging components can be easily called during the concurrent software process.
[0098] As an optional solution, in the process of packaging the second component corresponding to the updated debugging code to obtain a packaged debugging component, the method further includes:
[0099] The second component is encrypted using a key stored in the root file system.
[0100] In an optional embodiment, the root file system may be, but is not limited to, the top level of the file system, and may include, but is not limited to, all core files, components, and directories required for system startup and operation.
[0101] In an optional embodiment, the key may be, but is not limited to, a key file for user encryption and decryption data stored in the root file system, and may be, but is not limited to, stored in a specific file directory, such as / etc / ssl / , / etc / ssh / , etc. The key may also be, but is not limited to, SSH keys, GPC keys, and other keys, which are not limited here.
[0102] To further illustrate, in the encryption process, a pair of keys may be generated, including but not limited to a private key and a public key. The private key may be used for signing, and the public key may be used for verifying the signature. The second component after packaging is hashed to generate a unique hash value, which may reflect the content of the component, and then the calculated hash value is encrypted using the private key to generate a digital signature.
[0103] It should be noted that the debugging components often contain information that needs to be protected, such as user data, passwords, business data, etc. After being encrypted with a key, the data can be prevented from being leaked or accessed by unauthorized users during the debugging process, thereby ensuring the security of the data during the debugging process.
[0104] Through the embodiments of the present application, the second component is encrypted using a key stored in the root file system, thereby ensuring data security during subsequent debugging.
[0105] As an optional solution, concurrent software can be upgraded through ISO images, including:
[0106] S5-1, read the packaged business components and the packaged debugging components from the ISO image;
[0107] S5-2, using the key to perform security verification on the packaged debugging component;
[0108] S5-3, when the security check passes, the concurrent software is upgraded through the packaged business components and the packaged debugging components.
[0109] In an optional embodiment, the security check may be, but is not limited to, used to verify the security of the debugging component, and may also be, but is not limited to, verifying the security of the business component, and may include, but is not limited to, at least one of the following: integrity check, identity check, input check, security test, and fault recovery check.
[0110] In an optional embodiment, integrity verification can be, but is not limited to, verifying the integrity of the component to ensure that the component is complete and prevent errors in the process of upgrading concurrent software; identity verification can be, but is not limited to, verifying the identity of the creator of the component to ensure that the source of the component is safe and reliable, and prevent some abnormal components from bringing security risks to concurrent software; input verification can be, but is not limited to, verifying all inputs received by the component; security verification can be, but is not limited to, using security verification tools to scan the component to identify potential security risks in the component; fault recovery verification can be, but is not limited to, verifying whether the fault can be found within a certain period of time after the component fails, and starting the fault recovery capability to eliminate the fault, thereby recovering the component.
[0111] Through the embodiments of the present application, packaged business components and packaged debugging components are read from the ISO image; the packaged debugging components are security-verified using a key; and when the security verification passes, the concurrent software is upgraded using the packaged business components and the packaged debugging components, thereby ensuring that the business components and debugging components read from the ISO image are safe, and preventing security hazards to the concurrent software caused by unsafe files during subsequent concurrent software upgrades.
[0112] As an optional solution, before packaging the second component corresponding to the updated debugging code to obtain a packaged debugging component, the method further includes:
[0113] S6-1, using at least one filter, collecting target files required for building the second component, wherein the target files include updated debugging codes;
[0114] S6-2, construct the second component using the target file.
[0115] In an optional embodiment, the target file may include but is not limited to updated debugging code and dependencies required for building debugging components. The dependencies required for building debugging components may be but are not limited to at least one of the following: configuration files, dependency management files, script files, etc.
[0116] In an optional embodiment, the configuration file may include but is not limited to JSON files, YAML files, XML files, etc., and may be used but is not limited to storing configuration information of an application or code, so that the program or code can be adjusted according to the configuration information during operation; the dependency management file may include but is not limited to package.json files, requirements.txt files, pom.xml files, build.gradle files, etc., and may be used but is not limited to managing dependency files; the script file may include but is not limited to Makefile scripts, Shell scripts, etc., and may be used but is not limited to performing specific tasks.
[0117] It should be noted that the time required for finding dependencies is reduced. The file paths that meet the packaging rules are automatically identified and extracted through filters, so as to identify all the dependencies required to build the second component, and use the dependencies as target files. The target files are then used as dependencies of the second component. In this process, there is no need to manually track and manage all the dependent files, which improves the efficiency of building the second component.
[0118] In an optional embodiment, the filter can be but is not limited to being used to identify all files in a specific path that matches the file path of the files or codes that need to be packaged based on the packaging rules of the business components and the debugging code. The specific path can be but is not limited to a path starting with / path / dumps or / path / home.
[0119] In an optional embodiment, the filter can also be used, but is not limited to, in the scenario of concurrent software upgrades to intercept and manage all upgrade requests, ensuring that only verified requests can be processed, thereby avoiding unauthorized upgrade requests that may cause data inconsistencies in concurrent software.
[0120] In an optional embodiment, the filter may also be used, but is not limited to, to check the compatibility between the current version of the concurrent software and the version to be upgraded, to ensure that the new concurrent software version can interact normally with the existing programs or components.
[0121] In an optional embodiment, the filter may also filter out files that meet specific version requirements, thereby ensuring compatibility between components.
[0122] Through the embodiments of the present application, at least one filter is used to collect target files required for building the second component, wherein the target files include updated debugging code; the second component is built using the target files, and the target files are automatically collected through the filter, thereby improving the efficiency of building the second component.
[0123] As an optional solution, at least one filter is used to collect target files required for building the second component, including at least one of the following:
[0124] Using a first filter, collecting a first file under a target path, and adding the first file to a dependency list of the target file, wherein at least one filter includes the first filter, and the dependency list is a list for storing files to be used as the target;
[0125] using a second filter, collecting a second file under the target name, and adding the second file to a dependency list, wherein at least one filter includes the second filter;
[0126] Using a third filter, collecting a third file in the target installation mode, and adding the third file to the dependency list, wherein at least one filter includes the third filter.
[0127] In an optional embodiment, the dependency list may include, but is not limited to, debugging code, dependencies, and / or install files required to build the second component, and may be, but is not limited to, a list for storing files to be used as targets.
[0128] In an optional embodiment, the first filter may, but is not limited to, identify all files in the file path that matches the path starting with / path / home or / path / dumps in the file path to be packaged according to a given packaging rule, and store them as the first files in the dependency list of the target file.
[0129] In an optional embodiment, the second filter may, but is not limited to, identify all files matching the target name in the file to be packaged according to a given packaging rule, and store them as second files in the dependency list.
[0130] In an optional embodiment, the third filter may, but is not limited to, collect files that meet the target installation mode according to a given packaging rule, and add them as the third file to the dependency list. The third file may, but is not limited to, include an install file, and the install file may, but is not limited to, include the installation mode and installation location of the first file and / or the second file collected by the first filter and the second filter.
[0131] It should be noted that by collecting different files required to build the second component through different filters, different filters can be used according to different conditions to accurately locate and collect the different files required to build the second component, and because different filters collect different conditions, the mutual influence between filters can be reduced, thereby quickly locating and collecting specific files.
[0132] Through the embodiments of the present application, a first filter is used to collect the first file under the target path, and the first file is added to the dependency list of the target file, wherein at least one filter includes the first filter, and the dependency list is a list for storing files to be used as target files; a second filter is used to collect the second file under the target name, and the second file is added to the dependency list, wherein at least one filter includes the second filter; a third filter is used to collect the third file under the target installation mode, and the third file is added to the dependency list, wherein at least one filter includes the third filter. By collecting different files through different filters, it can be ensured that the filters work directly and independently without interfering with each other, thereby improving the accuracy of collecting files.
[0133] As an optional solution, after updating the corresponding debugging code and obtaining the updated debugging code, the method further includes:
[0134] Set the version number of the packaged debugging component to the version number of the packaged business component.
[0135] It should be noted that the version number of a component may affect the version number of its dependencies. If the versions of the business component and the debugging component used for the upgrade are inconsistent after concurrent software upgrades, which may cause the versions of their dependencies to be inconsistent, version number conflicts may occur during debugging, increasing the complexity of debugging or directly causing debugging failures. To avoid problems caused by inconsistent version numbers, after updating the business code and the debugging code, the version number of the debugging component packaged with the debugging code needs to be updated to be consistent with the version number of the business component, thereby avoiding problems caused by inconsistent version numbers.
[0136] Through the embodiments of the present application, the version number of the packaged debugging component is set to the version number of the packaged business component, ensuring that the version number of the debugging component is consistent with the version number of the business component, thereby avoiding problems caused by inconsistent version numbers.
[0137] As an optional solution, for ease of understanding, the concurrent software upgrade method is applied to the upgrade of centralized storage concurrent software.
[0138] Currently, when compiling the centralized storage concurrent software, it does not check whether the business code and the debugging code are consistent. It is common to modify only the business code without modifying the corresponding debugging code. After the storage cluster concurrent software is upgraded in the existing storage cluster environment, when the system operation fails and needs debugging, sometimes the debugging environment and the actual operating environment output are inconsistent. The reason is that the storage cluster concurrent software upgrade can only upgrade the system runtime library file, but does not replace the corresponding debugging file, resulting in the debugging information output being old information when debugging using the debugging tool, and the correct debugging information cannot be obtained.
[0139] In an optional embodiment, when performing a concurrent software upgrade of the storage cluster after updating the functional code, the debugging component can be upgraded synchronously, and in order to avoid differences between the business code and the debugging component, a consistency check process is added to the upgrade process to ensure that the debug information viewed by the updated system is consistent with the normal business code.
[0140] In an optional embodiment, when a vulnerability occurs in the system, the business code needs to be modified and the code debugging code segment is modified synchronously to synchronize the modification of the debugging code. The usage scenarios of the two are different, but the content needs to be consistent. The structure variables, array variables, and macro definitions of the debugging code segment and the business code should be consistent. To avoid inconsistencies, a new consistency check for the debugging code and business code is added. Each variable definition of the business code has a corresponding variable in the debugging code.
[0141] To further illustrate, assume that int in the business code and mapint in the debug code, there is a one-to-one correspondence between all business code variables and debug code variables. During code compilation, the compiler expands all business code variables and structures, and maps debug code variables and structures to a map file, such as Figure 3 As shown, then compare them one by one, and completely compare the definition and value of each variable in the business code and the debugging code to see if they are consistent. If they are inconsistent, it means that the corresponding debugging code has not been modified. This code has hidden debugging risks, and an error message is output during compilation and compilation is stopped.
[0142] In an optional embodiment, an ISO image is generated after the code is submitted, and the image consists of multiple parts: (1) boot file, (2) initfiles, and (3) isolinux file, wherein the business code exists in initfiles.
[0143] In an optional embodiment, to verify consistency, the business code component and the debugging component are packaged separately, the files are encrypted during the packaging process, the key is saved in the keyring of the root file system, and the key file is synchronously printed into the ISO image.
[0144] In an optional embodiment, the generation rule of the debugging component is as follows:
[0145] S7-1, create a target, specify the generated file, and determine the file name after the debug component is packaged;
[0146] S7-2, create a filter, identify all the path files under / path / home that match the file path to be packaged according to the given packaging rules, and split them into the dependency list of the target file as dependencies;
[0147] S7-3, at the same time, create a second filter, according to the given packaging rules, identify all files in the path beginning with / path / dumps that need to be packaged, and list them as dependencies in the dependency list of the target file;
[0148] S7-4, create the third filter, and according to the given packaging rules, find the install file in the package file, which contains the installation method and location of the files matched by the first and second filters, and also put this file into the dependency list of the target file;
[0149] S7-5, read the version number information of the business component. During the debugging component packaging process, read the version number of the debugging component and set the version number as the version number of the debugging component to keep the versions consistent during the upgrade process;
[0150] S7-6, generate the target file, create a packaging directory and enter it, use the tar command to package all the files in the target file dependency list, and set the owner and group to the root user. After this series of operations, the preliminary target file can be generated.
[0151] It should be noted that in order to ensure that the business code component and the debugging component code are equally available and to prevent the debugging component code version from being lower than the business code, the debugging component is encrypted according to the keyring file in the root file system during the packaging process, and the encrypted file is packaged.
[0152] In an optional embodiment, if Figure 4 As shown, after the files are packaged, an installation image is generated, wherein the ISO image contains boot files and initfiles files, wherein the initfiles file contains a key, which can encrypt business components and debugging files, and the debugging files can include but are not limited to ldbe files, beplmm.so files, beecdm.so files and other files.
[0153] In an optional embodiment, if Figure 5As shown, during the concurrent software upgrade of the storage cluster, when the business component package and the debugging component package are read, the key file will be searched from the root file system, and the business component package and the debugging component package will be verified according to the key file. The subsequent upgrade can only be carried out after the verification passes, otherwise the upgrade will be stopped.
[0154] In an optional embodiment, the business component package and the debugging component package will be decompressed during the upgrade process, and the library files, debugging tools, and business code executable files in the business components and debugging components will be installed and replaced according to the installation method in install.me. After the replacement is completed, the main service will be started and the new business will be run.
[0155] In an optional embodiment, install.me (install file) specifies the installation location of the executable files and library files in all debugging components. The installation location information comes from the packaging rules in the fourth step. Various files in the packaging rules will be installed according to the preset location, thereby replacing the old debugging files.
[0156] Through the dual guarantee of the compilation stage and the installation stage, it is ensured that the business components and debugging components can remain consistent after the upgrade.
[0157] To further illustrate, by upgrading the central control unit as a way to upgrade the system, the system can be upgraded without resetting the cluster. Since the upgrade process will maintain the cluster status, the entire system will not be completely updated and replaced, and components that do not affect the cluster function will be upgraded;
[0158] After updating the functional code, developers need to modify the corresponding debugging code simultaneously. The usage scenarios of the two are different, but the corresponding output results should be consistent. The so-called debugging code is a debugging language under the storage framework. When a problem occurs in the system, you can view the debugging information through the debugging tool. This information can display more information than the log. You can see the function stack when the code is running, and print the backtrace in the debugging environment without worrying about system crashes. Added consistency detection of debugging code and business code. Each variable definition in the business code has a corresponding variable in the debugging code. For example, int in the business code is map-int in the debugging code. There is a one-to-one correspondence between all business code variables and debugging code variables. During the code compilation process, the compiler expands all business code variables and structures, and maps the debugging code variables and structures to a map file, and then compares them one by one to completely compare the definitions and values of each variable in the business code and the debugging code to see if they are consistent. If they are inconsistent, it means that the corresponding debugging code has not been modified. This code has hidden debugging risks. Error information is output during compilation and compilation stops.
[0159] When compiling and packaging the new code, adjust the files during packaging, package the debugging components and business components into different packages as part of initfiles. initfiles are part of the entire ISO image. This ISO image can be used for multiple upgrade methods, including full upgrade and concurrent software upgrade of the storage cluster. Full upgrade will destroy the status of the cluster. Update the entire system to the latest image system. The ISO image also includes boot files and isolinux files.
[0160] S8-1, create a target, specify the generated file, and determine the file name after the debug component is packaged;
[0161] S8-2, create a filter, identify all the path files under / path / home that match the file path to be packaged according to the given packaging rules, and split them into the dependency list of the target file as dependencies.
[0162] S8-3, at the same time, create a second filter, according to the given packaging rules, identify all files in the path beginning with / path / dumps that need to be packaged, and list them as dependencies in the dependency list of the target file;
[0163] S8-4, create the third filter, and according to the given packaging rules, find the install file in the package file, which contains the installation method and installation location of the files matched by the first and second filters, and also put this file into the dependency list of the target file;
[0164] S8-5, read the version number information of the business component. During the debugging component packaging process, read the version number of the debugging component and set the version number as the version number of the debugging component to keep the versions consistent during the upgrade process;
[0165] S8-6, generate the target file, create a packaging directory and enter it, use the tar command to package all the files in the target file dependency list, and set the owner and group to the root user. After this series of operations, the preliminary target file can be generated;
[0166] The packaging rules of business components are existing and will not be described here. After the business components and debugging components are packaged, in order to ensure that the two components can be upgraded at the same time during the upgrade process, a key will be generated in the root file system during the packaging process. The business component and debugging component packages are encrypted by the key respectively. The encrypted files are packaged and the key is saved in the root file system of the ISO image. During the image packaging process, a boot script is added;
[0167] When the cluster environment performs a concurrent storage cluster software upgrade, the system automatically parses the boot script, searches for the key in the root file system, and decompresses the business component package and the debugging component package according to the key. If the two components can be successfully decrypted, it means that the integrity of the components has not changed, and the debugging output of the debugging component and the function of the business component are consistent, and the upgrade can be performed. If decryption fails, it means that the code level of the business component and the debugging component is inconsistent, and the upgrade will be stopped.
[0168] After the upgrade is successful, the cluster environment is automatically restored according to the previous logic. When the cluster environment fails and debugging is required, use the debugging tool for debugging. At this time, the information output by the debugging tool and the function call stack can be consistent with the business code.
[0169] Through the embodiments of the present application, the code levels of business components and debugging components can be ensured to be consistent. When a problem occurs in the business environment, the debugging component can be used to more conveniently find the function call relationship and more accurately find the problematic business code segment, thereby improving the efficiency of problem solving; the data consistency of the business code and the debugging code is ensured during the compilation stage, and the code consistency of the business components and the debugging components is ensured during the compilation process; when the storage cluster concurrent software is upgraded, the debugging component can be upgraded synchronously, and the code levels of the debugging component and the business component can be ensured to be consistent.
[0170] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0171] In the present embodiment, a concurrent software upgrade device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0172] Figure 6 is a structural block diagram of a concurrent software upgrade device according to an embodiment of the present application, such as Figure 6 As shown, the device comprises:
[0173] According to another embodiment of the present application, a concurrent software upgrade device is provided, comprising:
[0174] A first acquisition unit 602 is used to acquire updated business codes in the concurrent software, wherein the business codes are codes that actually execute business logic, and the concurrent software is located in an environment of a storage cluster;
[0175] The second acquisition unit 604 is used to acquire the debugging code corresponding to the updated business code, wherein the debugging code is a code used to assist debugging during development or maintenance;
[0176] An updating unit 606 is used to update the corresponding debugging code to obtain an updated debugging code, wherein the result output corresponding to the updated debugging code is consistent with the result output corresponding to the updated business code;
[0177] The upgrading unit 608 is used to upgrade the concurrent software through the updated business code and the updated debugging code.
[0178] For specific embodiments, reference may be made to the examples shown in the above-mentioned concurrent software upgrade method, which will not be described in detail in this example.
[0179] In an optional embodiment, the update unit 606 includes: a first update module, used to update the corresponding debugging code to obtain an updated debugging code; a detection module, used to perform consistency detection on the updated debugging code and the updated business code; a second update module, used to re-update the updated debugging code if the consistency detection fails; and a determination module, used to determine the updated debugging code as the updated debugging code if the consistency detection passes.
[0180] For specific embodiments, reference may be made to the examples shown in the above-mentioned concurrent software upgrade method, which will not be described in detail in this example.
[0181] In an optional embodiment, the above-mentioned first update module includes: an acquisition sub-module, used to obtain the mapping relationship between at least one first element in the above-mentioned updated business code and at least one second element in the above-mentioned corresponding debugging code; an update sub-module, used to use the above-mentioned mapping relationship to update the above-mentioned at least one second element according to the above-mentioned at least one first element to obtain the at least one second element that has been updated.
[0182] For specific embodiments, reference may be made to the examples shown in the above-mentioned concurrent software upgrade method, which will not be described in detail in this example.
[0183] In an optional embodiment, the above-mentioned update submodule includes: a first update subunit, used to use the above-mentioned mapping relationship to update the above-mentioned second element of the first type according to the first element of the first type; a second update subunit, used to use the above-mentioned mapping relationship to update the above-mentioned second element of the second type according to the first element of the second type.
[0184] For specific embodiments, reference may be made to the examples shown in the above-mentioned concurrent software upgrade method, which will not be described in detail in this example.
[0185] In an optional embodiment, the above-mentioned detection module includes: a mapping submodule, used to expand the above-mentioned at least one first element and the above-mentioned at least one second element that has been updated, and map them into a memory mapping file; a detection submodule, used to perform the above-mentioned consistency detection on the above-mentioned at least one first element and the above-mentioned at least one second element that has been updated through the above-mentioned memory mapping file.
[0186] For specific embodiments, reference may be made to the examples shown in the above-mentioned concurrent software upgrade method, which will not be described in detail in this example.
[0187] In an optional embodiment, the upgrade unit 608 includes: a first packaging module, used to package the first component corresponding to the updated business code to obtain a packaged business component; a second packaging module, used to package the second component corresponding to the updated debugging code to obtain a packaged debugging component; an integration module, used to integrate the packaged business component and the packaged debugging component into an ISO image; an upgrade module, used to respond to an upgrade request for the concurrent software and upgrade the concurrent software through the ISO image.
[0188] For specific embodiments, reference may be made to the examples shown in the above-mentioned concurrent software upgrade method, which will not be described in detail in this example.
[0189] In an optional embodiment, the second packaging module includes: an encryption submodule, used to encrypt the second component using a key stored in the root file system.
[0190] For specific embodiments, reference may be made to the examples shown in the above-mentioned concurrent software upgrade method, which will not be described in detail in this example.
[0191] In an optional embodiment, the encryption submodule includes: a packaging subunit, used to read the packaged business components and the packaged debugging components from the ISO image; a verification subunit, used to use the key to perform a security verification on the packaged debugging components; and an upgrade subunit, used to upgrade the concurrent software through the packaged business components and the packaged debugging components if the security verification passes.
[0192] For specific embodiments, reference may be made to the examples shown in the above-mentioned concurrent software upgrade method, which will not be described in detail in this example.
[0193] In an optional embodiment, the second packaging module includes: a collecting submodule, which is used to use at least one filter to collect target files required to build the second component before packaging the second component corresponding to the updated debugging code to obtain the packaged debugging component, wherein the target files include the updated debugging code; and a building submodule, which is used to build the second component using the target files.
[0194] For specific embodiments, reference may be made to the examples shown in the above-mentioned concurrent software upgrade method, which will not be described in detail in this example.
[0195] In an optional embodiment, the above-mentioned collection submodule includes: a first collection subunit, used to use a first filter to collect the first file under the target path, and add the above-mentioned first file to the dependency list of the above-mentioned target file, wherein the above-mentioned at least one filter includes the above-mentioned first filter, and the above-mentioned dependency list is a list for storing the above-mentioned target file; a second collection subunit, used to use a second filter to collect the second file under the target name, and add the above-mentioned second file to the above-mentioned dependency list, wherein the above-mentioned at least one filter includes the above-mentioned second filter; a third collection subunit, used to use a third filter to collect the third file under the target installation mode, and add the above-mentioned third file to the above-mentioned dependency list, wherein the above-mentioned at least one filter includes the above-mentioned third filter.
[0196] For specific embodiments, reference may be made to the examples shown in the above-mentioned concurrent software upgrade method, which will not be described in detail in this example.
[0197] In an optional embodiment, the updating unit 606 includes: a setting module, configured to set the version number of the packaged debugging component as the version number of the packaged business component.
[0198] For specific embodiments, reference may be made to the examples shown in the above-mentioned concurrent software upgrade method, which will not be described in detail in this example.
[0199] It should be noted that the above-mentioned virtual devices (modules, units, sub-modules, sub-units, components, etc.) can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: the above-mentioned virtual devices are all located in the same processor; or, the above-mentioned virtual devices are located in different processors in any combination.
[0200] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0201] In an optional embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0202] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0203] In an optional embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0204] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0205] Obviously, those skilled in the art should understand that the above-mentioned virtual devices or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0206] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A concurrent software upgrade method, characterized in that: include: Acquire updated business code in concurrent software, wherein the business code is code that actually executes business logic, and the concurrent software is located in an environment of a storage cluster; Acquire a debugging code corresponding to the updated business code, wherein the debugging code is a code used to assist debugging during development or maintenance; Updating the corresponding debugging code to obtain an updated debugging code, wherein the result output corresponding to the updated debugging code is consistent with the result output corresponding to the updated business code; Upgrading the concurrent software by using the updated business code and the updated debugging code; The step of upgrading the concurrent software by using the updated business code and the updated debugging code includes: Packaging the first component corresponding to the updated business code to obtain a packaged business component; Packaging the second component corresponding to the updated debugging code to obtain a packaged debugging component; Integrate the packaged business components and the packaged debugging components into the ISO image; In response to an upgrade request for the concurrent software, the concurrent software is upgraded through the ISO image.
2. The method according to claim 1, characterized in that The updating of the corresponding debugging code to obtain an updated debugging code includes: Updating the corresponding debugging code to obtain the updated debugging code; Performing consistency check on the updated debugging code and the updated business code; If the consistency check fails, re-updating the updated debugging code; When the consistency check passes, the updated debugging code is determined as the updated debugging code.
3. The method according to claim 2, characterized in that The updating of the corresponding debugging code to obtain the updated debugging code includes: Acquire a mapping relationship between at least one first element in the updated business code and at least one second element in the corresponding debugging code; The at least one second element is updated according to the at least one first element by using the mapping relationship to obtain the at least one updated second element.
4. The method according to claim 3, characterized in that The using the mapping relationship to update the at least one second element according to the at least one first element to obtain the at least one updated second element includes: Using the mapping relationship, according to the first element of the first type, the second element of the first type is updated; The second element of the second type is updated according to the first element of the second type by using the mapping relationship.
5. The method according to claim 3, characterized in that: The performing consistency detection on the updated debugging code and the updated business code includes: Expanding the at least one first element and the at least one second element that is updated, and mapping them into a memory-mapped file; The consistency check is performed on the at least one first element and the at least one second element that is updated through the memory mapping file.
6. The method according to claim 1, characterized in that In the process of packaging the second component corresponding to the updated debugging code to obtain a packaged debugging component, the method further includes: The second component is encrypted using a key stored in the root file system.
7. The method according to claim 6, characterized in that The step of upgrading the concurrent software through the ISO image includes: Read the packaged business components and the packaged debugging components from the ISO image; Using the key to perform security verification on the packaged debugging component; When the security check passes, the concurrent software is upgraded through the packaged business components and the packaged debugging components.
8. The method according to claim 1, characterized in that Before packaging the second component corresponding to the updated debugging code to obtain a packaged debugging component, the method further includes: Using at least one filter, collecting target files required to build the second component, wherein the target files include the updated debugging code; The second component is constructed using the target file.
9. The method according to claim 8, characterized in that The using at least one filter to collect target files required for building the second component includes at least one of the following: Using a first filter, collecting a first file under a target path, and adding the first file to a dependency list of the target file, wherein the at least one filter includes the first filter, and the dependency list is a list for storing files to be used as the target file; using a second filter, collecting a second file under the target name, and adding the second file to the dependency list, wherein the at least one filter includes the second filter; Using a third filter, collecting a third file in the target installation mode, and adding the third file to the dependency list, wherein the at least one filter includes the third filter.
10. The method according to claim 1, characterized in that After the corresponding debugging code is updated to obtain an updated debugging code, the method further includes: The version number of the packaged debugging component is set as the version number of the packaged business component.
11. A concurrent software upgrade device, characterized in that: include: A first acquisition unit is configured to acquire updated business codes in concurrent software, wherein the business codes are codes that actually execute business logic, and the concurrent software is located in an environment of a storage cluster; A second acquisition unit is configured to acquire a debugging code corresponding to the updated business code, wherein the debugging code is a code used to assist debugging during development or maintenance; An updating unit, which updates the corresponding debugging code to obtain an updated debugging code, wherein a result output corresponding to the updated debugging code is consistent with a result output corresponding to the updated business code; An upgrading unit, which upgrades the concurrent software through the updated business code and the updated debugging code; The upgrading unit comprises: A first packaging module, used to package the first component corresponding to the updated business code to obtain a packaged business component; A second packaging module is used to package the second component corresponding to the updated debugging code to obtain a packaged debugging component; An integration module, used to integrate the packaged business components and the packaged debugging components into the ISO image; The upgrade module is used to upgrade the concurrent software through the ISO image in response to an upgrade request for the concurrent software.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 10 when executed by a processor.
13. An electronic device comprising 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 of the method described in any one of claims 1 to 10 are implemented.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Multi-concurrent firmware upgrading method and system, computer equipment and storage medium
CN116466973A
Service upgrading method and device, electronic equipment and storage medium
CN118151970A