CN114780137A - Software version management method and device, storage medium and electronic equipment - Google Patents

Software version management method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114780137A
CN114780137A CN202210544885.6A CN202210544885A CN114780137A CN 114780137 A CN114780137 A CN 114780137A CN 202210544885 A CN202210544885 A CN 202210544885A CN 114780137 A CN114780137 A CN 114780137A
Authority
CN
China
Prior art keywords
storage
storage module
software version
abnormal
version
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210544885.6A
Other languages
Chinese (zh)
Inventor
刘鹤煜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202210544885.6A priority Critical patent/CN114780137A/en
Publication of CN114780137A publication Critical patent/CN114780137A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a software version management method and device, a storage medium and an electronic device, comprising: acquiring a software version information set of each storage module in an object storage; for each storage module, judging whether a storage node with an abnormal software version exists in the storage module or not based on the software version information of each storage node, and if so, determining the storage module as an abnormal storage module; and for each abnormal storage module, sending the module version information of the abnormal storage module to operation and maintenance personnel, and performing version synchronization operation based on the version synchronization information fed back by the operation and maintenance personnel to make the software versions of the storage nodes in the abnormal storage module consistent. And determining whether a storage node with an abnormal software version exists in the storage module or not by using the software version information of each storage node, feeding back the software version information to operation and maintenance personnel when the storage node with the abnormal software version exists, and synchronizing the versions according to the version synchronization information fed back by the operation and maintenance personnel, so that the software versions of the storage modules are consistent, and production accidents are avoided.

Description

Software version management method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a software version management method and apparatus, a storage medium, and an electronic device.
Background
The existing cloud platform is usually deployed in an object storage mode, the object storage product is large in scale and complex in structure, the number of storage modules applied to object storage is large, and after bug repair or upgrading is carried out on software of each storage node in the storage modules, the version of the software of each storage node in a storage template changes.
At present, when object storage of a cloud platform is managed, software versions of storage nodes in a storage module are generally not managed, so that operation and maintenance personnel cannot timely synchronize the versions of software in the storage nodes when the versions of the software in the storage nodes are different, and production accidents of the storage module are prone to occurring due to different software versions.
Disclosure of Invention
In view of the above, the present invention provides a software version management method and apparatus, a storage medium, and an electronic device, by which information of storage modules with different versions can be fed back to operation and maintenance personnel in time, and the storage modules with different versions can be subjected to version synchronization processing in time, so as to avoid production accidents.
In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:
the first aspect of the invention discloses a software version management method, which comprises the following steps:
acquiring a software version information set of each storage module in an object storage, wherein the software version information set comprises software version information of each storage node in the storage module;
for each storage module, judging whether a storage node with an abnormal software version exists in the storage module or not based on the software version information of each storage node in the storage module, and determining the storage module as an abnormal storage module when the storage node with the abnormal software version exists in the storage module;
and for each abnormal storage module, sending the module version information of the abnormal storage module to operation and maintenance personnel, acquiring version synchronization information fed back by the operation and maintenance personnel based on the module version information, and performing version synchronization operation on the abnormal storage module based on the version synchronization information so that the software versions of all storage nodes in the abnormal storage module are consistent.
Optionally, the above method, where the determining, based on the software version information of each storage node in the storage module, whether a storage node with an abnormal software version exists in the storage module includes:
acquiring an MD5 value of each storage node based on the software version information of each storage node;
judging whether the MD5 values of the storage nodes are consistent;
when the MD5 values of the storage nodes are consistent, determining that no storage node with abnormal software version exists in the storage module; otherwise, determining the storage node with the abnormal software version in the storage module.
Optionally, the method for determining whether a storage node with an abnormal software version exists in the storage module based on the software version information of each storage node in the storage module includes:
acquiring historical software version information of each storage node in the storage module;
judging whether the historical software version information and the software version information of each storage node are the same or not;
when the historical software version information and the software version information of each storage node are the same, determining that no storage node with abnormal software version exists in the storage module; otherwise, determining the storage nodes with abnormal software versions in the storage module.
Optionally, in the foregoing method, performing version synchronization operation on the abnormal storage module based on the version synchronization information includes:
acquiring synchronous node information in the version synchronous information;
determining each storage node to be synchronized in the abnormal storage module based on the synchronization node information;
acquiring a version data packet in the version synchronization information, wherein the software version of the version data packet is the same as the software version of a storage node which does not need to be synchronized in the abnormal storage template;
and sending the version data packet to each storage node to be synchronized, so that each storage node to be synchronized updates the software version based on the version data packet.
The foregoing method, optionally, after determining the storage module as an abnormal storage module, further includes:
and generating a data record representing that the storage module is an abnormal storage module, and storing the data record into a preset record database.
The above method, optionally, further includes:
and when determining that no storage node with abnormal software version exists in the storage module, generating a data record representing that the storage module is a non-abnormal storage module, and storing the data record into the record database.
The method described above, optionally, further includes:
receiving a query instruction;
determining each data record corresponding to the query instruction in the historical result database;
and displaying each data record corresponding to the query instruction on a preset front end page.
A second aspect of the present invention discloses a software version management apparatus, including:
the system comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring a software version information set of each storage module in an object storage, and the software version information set comprises software version information of each storage node in the storage module;
the judging unit is used for judging whether a storage node with an abnormal software version exists in the storage module or not based on the software version information of each storage node in the storage module for each storage module, and when the storage node with the abnormal software version exists in the storage module, the storage module is determined to be an abnormal storage module;
and the synchronization unit is used for sending the module version information of the abnormal storage modules to operation and maintenance personnel for each abnormal storage module, acquiring the version synchronization information fed back by the operation and maintenance personnel based on the module version information, and performing version synchronization operation on the abnormal storage modules based on the version synchronization information so that the software versions of the storage nodes in the abnormal storage modules are consistent.
The above apparatus, optionally, the determining unit includes:
a first obtaining subunit, configured to obtain an MD5 value of each storage node based on the software version information of each storage node;
the first judgment subunit is used for judging whether the MD5 values of the storage nodes are consistent;
the first determining subunit is configured to determine, when MD5 values of the storage nodes are consistent, a storage node in the storage module that is not abnormal in software version; otherwise, determining the storage nodes with abnormal software versions in the storage module.
The foregoing apparatus, optionally, the determining unit includes:
the second acquiring subunit is used for acquiring historical software version information of each storage node in the storage module;
the second judging subunit is used for judging whether the historical software version information and the software version information of each storage node are the same;
the second determining subunit is used for determining a storage node with no software version exception in the storage module when the historical software version information and the software version information of each storage node are the same; otherwise, determining the storage node with the abnormal software version in the storage module.
The above apparatus, optionally, the synchronization unit includes:
a third obtaining subunit, configured to obtain synchronization node information in the version synchronization information;
a third determining subunit, configured to determine, in the exception storage module, each storage node to be synchronized based on the synchronization node information;
a fourth obtaining subunit, configured to obtain a version data packet in the version synchronization information, where a software version of the version data packet is the same as a software version of a storage node that does not need to be synchronized in the abnormal storage template;
and the sending subunit is configured to send the version data packet to each storage node to be synchronized, so that each storage node to be synchronized updates the software version based on the version data packet.
The above apparatus, optionally, further comprises:
and the first generation unit is used for generating a data record representing that the storage module is an abnormal storage module and storing the data record into a preset record database.
The above apparatus, optionally, further comprises:
and the second generation unit is used for generating a data record representing that the storage module is a non-abnormal storage module when the storage module is determined to have no storage node with an abnormal software version, and storing the data record into the record database.
The above apparatus, optionally, further comprises:
the receiving unit is used for receiving the query instruction;
the determining unit is used for determining each data record corresponding to the query instruction in the historical result database;
and the display unit is used for displaying each data record corresponding to the query instruction on a preset front end page.
A third aspect of the present invention discloses a storage medium, where the storage medium includes stored instructions, and when the instructions are executed, a device on which the storage medium is located is controlled to execute the software version management method described above.
In a fourth aspect, the present invention discloses an electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform the software version management method as described above.
Compared with the prior art, the invention has the following advantages:
the invention provides a software version management method and device, a storage medium and an electronic medium, wherein the method comprises the steps of acquiring a software version information set of each storage module in an object storage, wherein the software version information set comprises software version information of each storage node in the storage module; for each storage module, judging whether a storage node with an abnormal software version exists in the storage module or not based on the software version information of each storage node in the storage module, and determining the storage module as an abnormal storage module when the storage node with the abnormal software version exists in the storage module; and for each abnormal storage module, sending the module version information of the abnormal storage module to operation and maintenance personnel, acquiring the version synchronization information fed back by the operation and maintenance personnel based on the module version information, and performing version synchronization operation on the abnormal storage module based on the version synchronization information so that the software versions of the storage nodes in the abnormal storage module are consistent. The invention can quickly determine whether the storage nodes with abnormal software versions exist in the storage module by using the software version information of each storage node, timely feeds back the software version information to operation and maintenance personnel when the storage nodes with abnormal software versions exist, and carries out version synchronization according to the version synchronization information fed back by the operation and maintenance personnel, so that the software versions of the storage modules are the same, thereby avoiding production accidents.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for managing software versions according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for determining whether a storage node with an abnormal software version exists in a storage module according to an embodiment of the present invention;
fig. 3 is a flowchart of another method for determining whether a storage node with an abnormal software version exists in a storage module according to an embodiment of the present invention;
fig. 4 is a flowchart of a method for performing version synchronization operation on an abnormal storage module based on version synchronization information according to an embodiment of the present invention;
fig. 5 is a flowchart of acquiring MD5 values of storage nodes in a storage module according to an embodiment of the present invention;
FIG. 6 is a flowchart of querying information of a storage node according to an embodiment of the present invention;
FIG. 7 is a flowchart of a method for autonomously recording version changes of a node according to the present invention;
FIG. 8 is a flow chart of version synchronization provided by the present invention;
fig. 9 is a schematic structural diagram of a software version management apparatus according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The Object Storage (COS) is a distributed Storage service for storing massive files, and users can store and view data at any time through a network. COS enables all users to use data storage services with high scalability, low cost, reliability and security. Users can simply and quickly access through diversified modes such as a control console, an API (application program interface), an SDK (software development kit) and the like, and the storage and management of mass data are realized. The COS can upload, download and manage files and provide an intuitive Web management interface.
Object storage is a non-hierarchical data storage method in cloud storage, which does not use a directory tree structure, and individual data (object) units exist at the same level in a storage pool. Each object has a unique identification name that can be used to list the search operation, and each object may also contain metadata. Compared with the traditional file storage mode, the file storage method has the following characteristics: storing the data as separate objects; data is not placed in the directory hierarchy, but exists within a flat address space; the application identifies each individual data object by a unique address; designed specifically for access at the application level using the HTTP RESTful API.
When controlling the software version in the object storage, the version control software can be generally used for managing the software version in the object storage. The version control software provides a complete version management function for storing and tracking the modification history of directories (folders) and files, is a necessary tool for software developers, and is an infrastructure of a software company. The highest goal of version control software is to support the configuration management activities of software companies, track the development and maintenance activities of multiple versions, and release the software in time. The version control tools comprise SVN, VSS, GIT, Hg, CVS and the like, and the SVN and the GIT are mainly used.
Advantages of SVN include: 1) centralized management, the management mode is well configured at the server, the client only needs to synchronously submit, and the method is convenient to use, simple to operate and easy to operate. 2) And the access authority is uniformly controlled at the server side, so that the security management of the codes is facilitated. 3) All codes are subject to the server side, and the code consistency is high.
SVN also has the following disadvantages: 1) all operations need to be synchronized by the server, which results in a high performance requirement of the server. If the server is down, the code cannot be submitted. 2) The branch management is not flexible, the SVN branch is a complete directory, the directory has complete actual files, the operations are synchronized at a server side and are not local operations, and if the branch is deleted, the remote branch is also required to be deleted, and all clients are required to be synchronized. 3) Networking is required. If the SVN server cannot be connected, the SVN server cannot submit the own code, and operations such as restoration, comparison and the like cannot be performed. The internal network environment has stable network speed and relatively fast synchronization, and if the synchronization is performed through the external network, the time is longer.
git is an open source version control software. The most different from the SVN is distributed management.
Advantages of git include: 1) during distributed development, a local version can be cloned by a git clone, then operation submission is carried out locally, and a complete version control can be completed locally. When the client is released, the client can push the client to a remote place by using git push. 2) The essence of the git branch is a pointer pointing to the submitted snapshot, the speed is high, the flexibility is high, and the branches can be switched at will. May be operating locally and may not be synchronized to remote. 3) Conflict resolution, conflict can easily appear in many people's development, can put long-range to local earlier, then merge branch at local, solve the conflict well, can to long-range at push. 4) And (4) working off line, if the git server has a problem, switching the branches locally, and submitting, merging and the like after networking.
git has the following disadvantages: 1) git has no strict authority control, and the authority control is generally performed by setting the read-write authority of the file through the system. 2) The working directory can only be the whole directory, and the SVN can individually check out a certain directory with authority.
Common software version control tools are more biased to the requirements of developers, and the risk of the file synchronization function on object storage, operation and maintenance is high, so that unexpected changes of key files in a production environment can be caused, a production node cannot normally process a service request, and a production accident is caused.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multi-processor appliances, distributed computing environments that include any of the above devices or equipment, and the like. The present invention can be applied to a manager or a processor of a cloud platform, and referring to fig. 1, is a method flowchart of a software version management method provided in an embodiment of the present invention, and the following details are described:
s101: and acquiring a software version information set of each storage module in the object storage, wherein the software version information set comprises software version information of each storage node in the storage module.
The object storage comprises a plurality of storage modules, each storage module comprises a plurality of storage nodes, and each storage node.
The software version information of each storage node includes, but is not limited to, an MD5 value of a key file of a storage module to which the storage node belongs, a module name of the storage module to which the storage node belongs, a node IP, time for acquiring the software version information, and the like, where the key file of the storage node is a binary file for implementing a main function of the storage module.
Preferably, when acquiring the software version information set of each storage module in the object storage, the software version information set of each storage module in the object storage may be acquired when receiving the query command, or the software version information set of each storage module in the object storage may be acquired when the timing task is triggered to be executed, where the timing task may be triggered to be executed according to a set time, for example, executed once every 1 hour, or executed according to a set execution time, for example, 7 o 'clock, 8 o' clock, 10 o 'clock, and 12 o' clock are all set execution times, and the timing task is executed after the time reaches the execution time.
S102: and for each storage module, judging whether the storage module has a storage node with an abnormal software version or not based on the software version information of each storage node in the storage module, and determining the storage module as an abnormal storage module when the storage module has the storage node with the abnormal software version.
For each storage module, judging whether a storage node with an abnormal software version exists in the storage module, and determining the storage module as an abnormal storage module when the storage node with the abnormal software version exists in the storage module; and when determining that no storage node with abnormal software version exists in the storage module, generating a data record representing that the storage module is a non-abnormal storage module, and storing the data record into a preset record database.
Preferably, after the storage module determines the abnormal storage module, a data record representing that the storage module is the abnormal storage module can be generated, and the data record is stored in a preset record database, so that the software version change record is realized.
Preferably, the present invention provides two methods for determining whether there is a storage node with an abnormal software version in a storage module, which are described in the following.
Referring to fig. 2, a flowchart of a method for determining whether a storage node with an abnormal software version exists in a storage module according to an embodiment of the present invention is specifically described as follows:
s201: and acquiring the MD5 value of each storage node based on the software version information of each storage node.
It should be noted that the MD5 value is the MD5 value of the key file of the storage module in which the storage node is located.
S202: judging whether the MD5 values of all storage nodes are consistent; when the MD5 values of the respective storage nodes are uniform, S203 is executed; otherwise, S204 is executed.
Comparing the MD5 values of the storage nodes to judge whether the MD5 values are the same values, and executing S203 when the MD5 values are the same values; otherwise, S204 is performed. Preferably, when two or more values appear in each MD5 value, the storage node with the software version exception in the storage module can be determined.
S203: and determining the storage nodes without the software version exception in the storage module.
S204: and determining the storage nodes with software version exception in the storage module.
Referring to fig. 3, a flowchart of another method for determining whether a storage node with an abnormal software version exists in a storage module according to an embodiment of the present invention is specifically described as follows:
s301: and acquiring historical software version information of each storage node in the storage module.
Preferably, the historical software version information includes multiple historical data of the storage node, for example, it is assumed that the current is No. 4/month 21, and the historical software version information includes data of the storage node at No. 4/month 10 and No. 4/month 20, and preferably, the data of No. 10 and No. 20 should be the same.
Preferably, the historical software version information includes, but is not limited to, MD5 value of key file of storage module to which the storage node belongs, module name of storage module to which the storage node belongs, node IP, and the like.
S302: judging whether the historical software version information and the software version information of each storage node are the same or not; when the historical software version information and the software version information of each storage node are the same, executing S303; otherwise, S304 is performed.
For each storage node, comparing the historical software version information and the software version information of the storage node to obtain a result of whether the historical software version information and the software version information of the storage node are consistent; further, when the results of the storage nodes are all characterized as being consistent, S303 may be executed; further, when there is a result characterized as inconsistent among the results of the respective storage nodes, S304 may be performed.
S303: and determining the storage nodes with the software version exception in the storage module.
S304: and determining the storage nodes with software version exception in the storage module.
The embodiment of the invention provides two modes for determining whether the storage module has the storage node with the abnormal software version, so that the method can be applied to different application scenes, and the applicability of the method is further expanded.
S103: and for each abnormal storage module, sending the module version information of the abnormal storage module to operation and maintenance personnel, acquiring version synchronization information fed back by the operation and maintenance personnel based on the module version information, and performing version synchronization operation on the abnormal storage module based on the version synchronization information so that the software versions of the storage nodes in the abnormal storage module are consistent.
For the abnormal storage module, version synchronization operation needs to be performed on the abnormal storage module, so that the software versions of the storage nodes in the abnormal storage version are consistent.
Further, module version information of the abnormal storage module is sent to operation and maintenance personnel to obtain version synchronization information fed back by the operation and maintenance personnel based on the module version information, wherein the version synchronization information can be sent to the operation and maintenance personnel by calling a short message interface; preferably, the module version information includes contents such as a module name of the abnormal storage module, current software version information of each storage node, and the like; the version synchronization information includes, but is not limited to, a storage node that needs to be version synchronized and a version data package that needs to be version synchronized, which are selected by an operation and maintenance person.
Referring to fig. 4, a flowchart of a method for performing version synchronization operation on an abnormal storage module based on version synchronization information according to an embodiment of the present invention is specifically described as follows:
s401: and acquiring synchronous node information in the version synchronous information.
The synchronization node information includes node information, such as node identifiers, of each storage node that needs to be version-synchronized, which is selected by the operation and maintenance staff.
Further, when determining whether a storage node with an abnormal software version exists in the storage module by using the MD5 value, each storage version requiring version synchronization may be a storage node to which a small number of different MD5 values belong, for example, if a majority of MD5 values are a, and a small number of MD5 values are B, C, a storage node to which a MD5 value B or C belongs is determined as a storage node requiring version synchronization.
Further, when determining whether a storage node with an abnormal software version is stored in the storage module by using the historical software version information of the storage node, the storage node with the inconsistent historical software version information and software version information may be determined as the storage node which needs to be version-synchronized.
S402: and determining each storage node to be synchronized in the abnormal storage module based on the synchronization node information.
Preferably, each node identifier in the synchronization node information may traverse the identifier of each storage node in the abnormal storage module, and further determine the storage node to which the identifier consistent with the node identifier belongs as the storage node to be synchronized.
S403: and acquiring a version data packet in the version synchronization information, wherein the software version of the version data packet is the same as the software version of the storage node which does not need to be synchronized in the abnormal storage template.
And analyzing the version synchronization information to obtain a version data packet in the version synchronization information.
S404: and sending the version data packet to each storage node to be synchronized, so that each storage node to be synchronized updates the software version based on the version data packet.
It should be noted that, when the software version of the storage node to be synchronized is updated, each storage node to be synchronized may be isolated, and the software version of the storage node to be synchronized is synchronized after isolation, thereby implementing automatic version synchronization.
In the method provided by the embodiment of the invention, a software version information set of each storage module in an object storage is obtained, wherein the software version information set comprises software version information of each storage node in the storage module; for each storage module, judging whether a storage node with an abnormal software version exists in the storage module or not based on the software version information of each storage node in the storage module, and determining the storage module as an abnormal storage module when the storage node with the abnormal software version exists in the storage module; and for each abnormal storage module, sending the module version information of the abnormal storage module to operation and maintenance personnel, acquiring the version synchronization information fed back by the operation and maintenance personnel based on the module version information, and performing version synchronization operation on the abnormal storage module based on the version synchronization information so that the software versions of the storage nodes in the abnormal storage module are consistent. The invention can quickly determine whether the storage nodes with abnormal software versions exist in the storage module by using the software version information of each storage node, timely feeds back the software version information to operation and maintenance personnel when the storage nodes with abnormal software versions exist, and carries out version synchronization according to the version synchronization information fed back by the operation and maintenance personnel, so that the software versions of the storage modules are the same, thereby avoiding production accidents.
In the method provided in the embodiment of the present invention, the node information of the storage module may also be displayed, specifically as follows:
receiving a query instruction;
determining each data record corresponding to the query instruction in the historical result database;
and displaying each data record corresponding to the query instruction on a preset front end page.
It should be noted that the query instruction may be an instruction sent by an operation and maintenance worker, where the query instruction includes information that the operation and maintenance worker needs to query, and exemplarily queries information of each storage module in a certain time period, or queries information of all storage modules, or queries information of a storage module with an abnormality.
The data records inquired in the database are displayed to the operation and maintenance personnel on the front-end page, so that the operation and maintenance personnel can intuitively know the specific conditions of the storage module to be known, and further, the software version management visualization is realized.
The method provided by the embodiment of the invention can realize the contents of software version management visualization, software version change record and automatic version synchronization, and the invention further provides a specific description for further describing the software version management visualization, the software version change record and the automatic version synchronization, wherein the specific description comprises the following steps:
(1) software version management visualization
The software version management of the object storage is realized by identifying the MD5 value of the key file of each module, and the key file is visually displayed on a front-end page.
The first step is as follows:
the object storage includes a plurality of modules, each module has a plurality of nodes, in order to ensure that version information of each Node is consistent, a key file MD5 value on all nodes of a certain module needs to be pulled, and then comparison calculation is performed, referring to fig. 5, for a flowchart of obtaining an MD5 value of each storage Node in a storage module provided in the embodiment of the present invention, it should be noted that a Node in the diagram represents a storage Node, and a module 1Node1 represents a storage Node numbered 1 in the storage module 1.
1) Acquiring the MD5 value of each Node key file;
2) module name, MD5 value. Node IP, query time and other information are stored in the mysql database tb _ version table.
The second step is that:
after the MD5 values of all the object storage modules are queried and stored in the database, the abnormal node information needs to be displayed on the front-end page through query, which is a flowchart for querying information of storage nodes provided by the embodiment of the present invention with reference to fig. 6. In addition, the query supporting the full-scale node MD5 specifically includes the following aspects:
1) when the operation and maintenance personnel do not make any selection, the system compares the results of the last two queries by default, and displays a module with a changed MD5 value and an IP list;
2) the full query result can be displayed for operation and maintenance personnel to perform full analysis;
3) the number of modules and equipment with consistent versions can be analyzed by operation and maintenance personnel by displaying unchanged modules and IP lists;
4) if the versions of partial nodes in the same module are inconsistent with those of other nodes, the partial nodes are also visually displayed in a page related to the 'change information';
5) any two historical dates can be selected for comparison, and operation and maintenance personnel can trace the date when the software version changes.
(2) Software version change record
The software version management has the functions of visualizing and querying, and also has the function of autonomously recording the change condition, and fig. 7 is a flow chart of the method for autonomously recording the version change of the node.
1) The software version management device inquires the values of each module MD5 stored in the object in the current production environment once at 8:00 a day and records the values in a database tb _ version;
2) in order to realize the function of recording the change condition, after the MD5 value of each module is inquired, the result is compared with the inquiry result of the previous day, if a certain module or node is inconsistent, the corresponding module or node and the discovery time are recorded, and the data is written into the database tb _ change. Meanwhile, calling a short message interface, and sending the changed module information to operation and maintenance personnel;
3) in addition, the data inquired on the same day can be compared and analyzed, and if partial nodes in a certain module are inconsistent with the versions of other nodes, a short message interface is called to inform operation and maintenance personnel.
(3) Automatic version synchronization
Through the version inquiry and comparison, inconsistent module information is sent to operation and maintenance personnel, the version synchronization confirmation operation is started, and after the operation and maintenance personnel confirm, automatic version synchronization is carried out, and the method and the device refer to fig. 8, which is a flow chart of the version synchronization provided by the invention.
1) Sending the inconsistent module information to operation and maintenance personnel, and initiating version synchronization confirmation operation on line;
2) the operation and maintenance personnel confirm on line that the version synchronization can be carried out;
3) the system synchronizes the latest version to the nodes of the old version, isolates the nodes to be changed one by one, and restarts the module.
The invention and the device store the software version information of each module by regularly inquiring the object, record the change condition by comparing with the historical records, visualize the change condition, facilitate the inquiry of operation and maintenance personnel, have the function of short messages and inform the relevant operation and maintenance personnel when the object storage generates the software version change. And after the versions are found to be inconsistent, initiating version synchronization operation on line, and after the operation and maintenance personnel confirm, carrying out automatic version synchronization to keep the versions of all nodes of the same module consistent.
By applying the method provided by the invention, the software version stored in the object in the production environment is managed without a software version control tool in a Client/Server mode, and only the version information of the key files of each module stored in the object needs to be inquired and consistency comparison is carried out, so that the risk of abnormal change is avoided, and operation and maintenance personnel are assisted to manage the software version stored in the object.
When the method is applied, version information can be recorded by inquiring the MD5 value of the key file of each module stored by the object; the problem that the versions of partial nodes in the same module are not consistent or the version of the same module is changed can be found out in time through comparison, and operation and maintenance personnel are informed; the system can also initiate version synchronization confirmation operation to operation and maintenance personnel, and after the operation and maintenance personnel confirm, an automatic version synchronization function is initiated and the related modules are restarted.
The file synchronization function of the existing software version control tool has a large risk on object storage, operation and maintenance, and can cause unexpected changes of key files in a production environment, so that a production node cannot normally process a service request, and a production accident is caused. The device and the method store the software version information of each module by regularly inquiring the object, record the change condition by comparing the historical records, visualize the change condition, facilitate the inquiry of operation and maintenance personnel, have the function of short messages and inform relevant operation and maintenance personnel when the object stores the change of the software version. The problem and the pain point of production change can be solved actually, and the operation and maintenance personnel can be helped to accurately grasp the product version condition in frequent bug repair and version upgrading, so that the problem backtracking is facilitated. And after the versions are found to be inconsistent, initiating version synchronization operation on line, and after the operation and maintenance personnel confirm, carrying out automatic version synchronization to keep the versions of all nodes of the same module consistent.
Corresponding to the method shown in fig. 1, an embodiment of the present invention further provides a software version management device, which may be disposed in a computer terminal or a processor, and with reference to fig. 9, a schematic structural diagram of the software version management device provided in the embodiment of the present invention is specifically described as follows:
an obtaining unit 801, configured to obtain a software version information set of each storage module in an object storage, where the software version information set includes software version information of each storage node in the storage module;
a determining unit 802, configured to determine, for each storage module, whether a storage node with an abnormal software version exists in the storage module based on software version information of each storage node in the storage module, and when a storage node with an abnormal software version exists in the storage module, determine the storage module as an abnormal storage module;
a synchronization unit 803, configured to send, for each abnormal storage module, the module version information of the abnormal storage module to an operation and maintenance worker, obtain version synchronization information fed back by the operation and maintenance worker based on the module version information, and perform version synchronization operation on the abnormal storage module based on the version synchronization information, so that software versions of storage nodes in the abnormal storage module are consistent.
In the device provided by the embodiment of the invention, a software version information set of each storage module in an object storage is obtained, wherein the software version information set comprises software version information of each storage node in the storage module; for each storage module, judging whether a storage node with an abnormal software version exists in the storage module or not based on the software version information of each storage node in the storage module, and determining the storage module as an abnormal storage module when the storage node with the abnormal software version exists in the storage module; and for each abnormal storage module, sending the module version information of the abnormal storage module to operation and maintenance personnel, acquiring version synchronization information fed back by the operation and maintenance personnel based on the module version information, and performing version synchronization operation on the abnormal storage module based on the version synchronization information so that the software versions of the storage nodes in the abnormal storage module are consistent. The invention can quickly determine whether the storage nodes with abnormal software versions exist in the storage module by using the software version information of each storage node, timely feeds back the software version information to operation and maintenance personnel when the storage nodes with abnormal software versions exist, and carries out version synchronization according to the version synchronization information fed back by the operation and maintenance personnel, so that the software versions of the storage modules are the same, thereby avoiding production accidents.
In the apparatus provided in the embodiment of the present invention, the determining unit 802 of the apparatus includes:
a first obtaining subunit, configured to obtain an MD5 value of each storage node based on the software version information of each storage node;
the first judgment subunit is used for judging whether the MD5 values of the storage nodes are consistent;
the first determining subunit is configured to determine, when MD5 values of the storage nodes are consistent, a storage node in the storage module that is not abnormal in software version; otherwise, determining the storage node with the abnormal software version in the storage module.
In the apparatus provided in the embodiment of the present invention, the determining unit 802 of the apparatus includes:
the second acquiring subunit is used for acquiring historical software version information of each storage node in the storage module;
the second judgment subunit is configured to judge whether the historical software version information and the software version information of each storage node are the same;
the second determining subunit is used for determining a storage node with no software version exception in the storage module when the historical software version information and the software version information of each storage node are the same; otherwise, determining the storage node with the abnormal software version in the storage module.
In the apparatus provided in the embodiment of the present invention, the synchronization unit 803 of the apparatus includes:
a third obtaining subunit, configured to obtain synchronization node information in the version synchronization information;
a third determining subunit, configured to determine, in the exception storage module, each storage node to be synchronized based on the synchronization node information;
a fourth obtaining subunit, configured to obtain a version data packet in the version synchronization information, where a software version of the version data packet is the same as a software version of a storage node that does not need to be synchronized in the abnormal storage template;
and the sending subunit is configured to send the version data packet to each storage node to be synchronized, so that each storage node to be synchronized updates the software version based on the version data packet.
In the apparatus provided in the embodiment of the present invention, the apparatus further includes:
and the first generation unit is used for generating a data record for representing that the storage module is an abnormal storage module and storing the data record into a preset record database.
In the apparatus provided in the embodiment of the present invention, the apparatus further includes:
and the second generation unit is used for generating a data record for representing that the storage module is a non-abnormal storage module when the storage module is determined to have no storage node with an abnormal software version, and storing the data record into the record database.
In the apparatus provided in the embodiment of the present invention, the apparatus further includes:
the receiving unit is used for receiving the query instruction;
the determining unit is used for determining each data record corresponding to the query instruction in the historical result database;
and the display unit is used for displaying each data record corresponding to the query instruction on a preset front end page.
The embodiment of the invention also provides a storage medium, which comprises a stored instruction, wherein when the instruction runs, the device where the storage medium is located is controlled to execute the software version management method.
An embodiment of the present invention further provides an electronic device, which has a schematic structural diagram as shown in fig. 10, and specifically includes a memory 901 and one or more instructions 902, where the one or more instructions 902 are stored in the memory 901, and are configured to be executed by the one or more processors 903 to execute the one or more instructions 902 to perform the software version management method.
The specific implementation procedures and derivatives thereof of the above embodiments are within the scope of the present invention.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement without inventive effort.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A software version management method, comprising:
acquiring a software version information set of each storage module in an object storage, wherein the software version information set comprises software version information of each storage node in the storage module;
for each storage module, judging whether a storage node with an abnormal software version exists in the storage module or not based on the software version information of each storage node in the storage module, and determining the storage module as an abnormal storage module when the storage node with the abnormal software version exists in the storage module;
and for each abnormal storage module, sending the module version information of the abnormal storage module to operation and maintenance personnel, acquiring version synchronization information fed back by the operation and maintenance personnel based on the module version information, and performing version synchronization operation on the abnormal storage module based on the version synchronization information so that the software versions of all storage nodes in the abnormal storage module are consistent.
2. The method according to claim 1, wherein the determining whether a storage node with an abnormal software version exists in the storage module based on the software version information of each storage node in the storage module comprises:
acquiring an MD5 value of each storage node based on the software version information of each storage node;
judging whether the MD5 values of the storage nodes are consistent;
when the MD5 values of the storage nodes are consistent, determining that no storage node with abnormal software version exists in the storage module; otherwise, determining the storage nodes with abnormal software versions in the storage module.
3. The method according to claim 1, wherein the determining whether a storage node with an abnormal software version exists in the storage module based on the software version information of each storage node in the storage module comprises:
acquiring historical software version information of each storage node in the storage module;
judging whether the historical software version information and the software version information of each storage node are the same;
when the historical software version information and the software version information of each storage node are the same, determining that no storage node with abnormal software version exists in the storage module; otherwise, determining the storage nodes with abnormal software versions in the storage module.
4. The method of claim 1, wherein performing a version synchronization operation on the exception storage module based on the version synchronization information comprises:
acquiring synchronous node information in the version synchronous information;
determining each storage node to be synchronized in the abnormal storage module based on the synchronous node information;
acquiring a version data packet in the version synchronization information, wherein the software version of the version data packet is the same as the software version of a storage node which does not need to be synchronized in the abnormal storage template;
and sending the version data packet to each storage node to be synchronized, so that each storage node to be synchronized updates the software version based on the version data packet.
5. The method of claim 1, after determining the storage module as an abnormal storage module, further comprising:
and generating a data record representing that the storage module is an abnormal storage module, and storing the data record into a preset record database.
6. The method of claim 1, further comprising:
and when determining that the storage node with the abnormal software version does not exist in the storage module, generating a data record for representing that the storage module is a non-abnormal storage module, and storing the data record into the record database.
7. The method of claim 6, further comprising:
receiving a query instruction;
determining each data record corresponding to the query instruction in the historical result database;
and displaying each data record corresponding to the query instruction on a preset front end page.
8. A software version management apparatus, comprising:
the system comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring a software version information set of each storage module in an object storage, and the software version information set comprises software version information of each storage node in the storage module;
the judging unit is used for judging whether a storage node with an abnormal software version exists in the storage module or not based on the software version information of each storage node in the storage module for each storage module, and when the storage node with the abnormal software version exists in the storage module, the storage module is determined to be an abnormal storage module;
and the synchronization unit is used for sending the module version information of the abnormal storage modules to operation and maintenance personnel for each abnormal storage module, acquiring the version synchronization information fed back by the operation and maintenance personnel based on the module version information, and performing version synchronization operation on the abnormal storage modules based on the version synchronization information so that the software versions of the storage nodes in the abnormal storage modules are consistent.
9. A storage medium, comprising stored instructions, wherein when executed, the instructions control a device on which the storage medium is located to execute the software version management method according to any one of claims 1 to 7.
10. An electronic device comprising a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform the software version management method of any one of claims 1-7.
CN202210544885.6A 2022-05-19 2022-05-19 Software version management method and device, storage medium and electronic equipment Pending CN114780137A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210544885.6A CN114780137A (en) 2022-05-19 2022-05-19 Software version management method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210544885.6A CN114780137A (en) 2022-05-19 2022-05-19 Software version management method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114780137A true CN114780137A (en) 2022-07-22

Family

ID=82407924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210544885.6A Pending CN114780137A (en) 2022-05-19 2022-05-19 Software version management method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114780137A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117742777A (en) * 2024-02-21 2024-03-22 沐曦集成电路(上海)有限公司 Chip file version management system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117742777A (en) * 2024-02-21 2024-03-22 沐曦集成电路(上海)有限公司 Chip file version management system
CN117742777B (en) * 2024-02-21 2024-05-03 沐曦集成电路(上海)有限公司 Chip file version management system

Similar Documents

Publication Publication Date Title
CN110768833B (en) Application arrangement and deployment method and device based on kubernets
CN109542529B (en) Function name-based point burying method and device, computer equipment and storage medium
US8321548B2 (en) Method and system for specifying planned changes to a communications network
CN105610946B (en) A kind of cloud springboard machine system based on docker technologies
US9658846B2 (en) Software configuration control wherein containers are associated with physical storage of software application versions in a software production landscape
CN114385759B (en) Configuration file synchronization method and device, computer equipment and storage medium
CN110619226A (en) Platform-based data processing method, system, equipment and storage medium
CN112579101B (en) Task script management and control method and device, electronic equipment and storage medium
CN114780137A (en) Software version management method and device, storage medium and electronic equipment
CN112506969A (en) BMC address query method, system, equipment and readable storage medium
CN111506358A (en) Method and device for updating container configuration
CN110784347A (en) Node management method, system, equipment and storage medium for container cluster
CN113076186B (en) Task processing method, device, electronic equipment and storage medium
JP4040844B2 (en) Remote maintenance device, remote maintenance processing program, and recording medium for the program
CN116578497A (en) Automatic interface testing method, system, computer equipment and storage medium
CN115004662A (en) Data synchronization method, data synchronization device, data storage system and computer readable medium
CN114443294B (en) Big data service component deployment method, system, terminal and storage medium
JPH10105540A (en) Working procedure managing system
CN115658791A (en) Ground application management control system and method
CN115309457A (en) Application instance restarting method and device, electronic equipment and readable storage medium
CN108701035A (en) The management of application attribute
CN113761075A (en) Method, device, equipment and computer readable medium for switching databases
CN111104415A (en) Time zone updating method, time zone updating device, electronic equipment and storage medium
CN109582288B (en) Method, system and storage medium for producing configuration reflux
CN114466026B (en) Update method and device of application program interface, storage medium and computing device

Legal Events

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