CN114443358A - Rollback method and device based on hierarchical publication - Google Patents

Rollback method and device based on hierarchical publication Download PDF

Info

Publication number
CN114443358A
CN114443358A CN202111583248.1A CN202111583248A CN114443358A CN 114443358 A CN114443358 A CN 114443358A CN 202111583248 A CN202111583248 A CN 202111583248A CN 114443358 A CN114443358 A CN 114443358A
Authority
CN
China
Prior art keywords
rollback
area
server
priority
region
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
CN202111583248.1A
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.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud Technology Co Ltd
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 Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202111583248.1A priority Critical patent/CN114443358A/en
Publication of CN114443358A publication Critical patent/CN114443358A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1433Saving, restoring, recovering or retrying at system level during software upgrading
    • 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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides a rollback method and a rollback device based on hierarchical publication, wherein the method comprises the following steps: determining at least one region requiring rollback among a plurality of regions; wherein each zone comprises at least one cluster comprising at least one server; determining a priority for each of the at least one region; and according to the priority of each area in the at least one area, performing a rollback operation on the system of the server in each area. In the embodiment provided by the invention, before the rollback operation is executed, at least one area needing rollback is determined in the plurality of areas, but not all areas are rolled back, so that the rollback efficiency is increased. In addition, in the rollback process, according to the priority of each area in the at least one area, a reverse hierarchical publishing sequence is adopted for rollback, and the loss stopping efficiency of rollback is improved.

Description

Rollback method and device based on hierarchical publication
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a rollback method and device based on hierarchical publication.
Background
The operation and maintenance system is an important component system of the operation and maintenance platform of the company and is responsible for ensuring that all systems in the company can normally operate. Among them, deploying a system is an important function in an operation and maintenance system. And the operation and maintenance personnel upgrade and update the service through the deployment system. In the traditional system deployment process, the loss stopping efficiency of rollback is low, and the rollback time is long, which is a problem to be solved urgently.
Disclosure of Invention
The embodiment of the invention provides a rollback method and device based on hierarchical publication, which are used for solving the problems of low loss stopping efficiency and long time of rollback of a traditional deployment system.
In a first aspect, an embodiment of the present invention provides a rollback method based on hierarchical publication, where the method includes: determining at least one region requiring rollback among a plurality of regions; wherein each zone comprises at least one cluster comprising at least one server; determining a priority for each of the at least one region; and according to the priority of each area in the at least one area, performing a rollback operation on the system of the server in each area.
Optionally, the determining at least one region in the plurality of regions that needs to be rolled back includes:
for any one of the plurality of regions, determining that the region does not need to be rolled back if the servers in the region are not online before a version update of the system, or the system of the servers in the region is not updated to a latest version; determining an area of the plurality of areas other than the area not requiring rollback as at least one area requiring rollback.
Optionally, the determining the priority of each of the at least one region includes:
for any area in the at least one area, the priority of the area is determined according to the environment corresponding to the system in the server in the area; when the environment corresponding to the system in the server in the area is a test environment, the priority of the area is the lowest; and when the environment corresponding to the system in the server in the area is a production environment, the priority of the area is the highest.
Optionally, the performing a rollback operation on the system of servers in each zone according to the priority of each zone in the at least one zone includes: and performing rollback operation on the systems of the servers in each of the at least one region in the order of priority from high to low.
Optionally, the method further comprises: for any one of the at least one region, performing a rollback operation on a system of servers within the cluster in the region at a cluster granularity; wherein the step of performing service checks on the system is skipped after the system rollback of the servers within each cluster is completed.
Optionally, the method further comprises: for any server in the at least one area, before rollback operation is performed on the server, judging whether an installation file required for performing the rollback operation exists in the server; and if the installation file exists, realizing rollback operation through the installation file.
Optionally, if the installation file does not exist, downloading the installation file according to the acquired download address; and realizing rollback operation through the downloaded installation file.
Optionally, the determining whether an installation file required for performing a rollback operation exists in the server includes: acquiring a rollback instruction, wherein the rollback instruction is used for indicating the server to execute a rollback operation, and the rollback instruction comprises a file identifier of the installation file; if the server comprises the file corresponding to the file identifier, determining that the installation file exists in the server; and if the server does not comprise the file corresponding to the file identifier, determining that the installation file does not exist in the server.
In a second aspect, an embodiment of the present invention provides a rollback apparatus based on hierarchical publishing, including:
a processing unit for determining at least one region requiring rollback among a plurality of regions; wherein each zone comprises at least one cluster comprising at least one server;
a rollback unit for determining a priority of each of the at least one region; and according to the priority of each area in the at least one area, performing a rollback operation on the system of the server in each area.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method provided in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where the storage medium stores computer instructions, and the computer instructions, when executed by a processor, perform the method provided in the first aspect.
In a fifth aspect, the present invention further provides a computer program product containing computer-executable instructions for causing a computer to execute the method as provided in the first aspect.
Through the technical solutions in one or more of the above embodiments of the present invention, the embodiments of the present invention have at least the following technical effects:
in the embodiment provided by the invention, before the rollback operation is executed, at least one area needing rollback is determined in the plurality of areas, but not all areas are rolled back, so that the rollback efficiency is increased. In addition, in the rollback process, according to the priority of each area in the at least one area, a reverse hierarchical publishing sequence is adopted for rollback, and the loss stopping efficiency of rollback is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic diagram of a network architecture according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a rollback method based on hierarchical publishing according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a method according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart of an inspection method according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of a rollback method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a rolling device based on hierarchical publishing according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more clearly apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
For convenience of understanding, terms referred to in the embodiments of the present invention are explained below.
The hierarchical distribution, which may also be referred to as gray distribution, generally refers to a process in which a software product gradually expands flow in an iterative process, and each hierarchical distribution is accompanied by certain data index analysis to determine whether to rollback or continue to expand gray. In the process of hierarchical release, a part of users can continue to use the original software version, a part of users begin to use the new software version, and if the new software version has no problem, the range is gradually expanded, so that all users use the new software version. Therefore, the stability of the whole system can be ensured, and the problems can be found and adjusted in the initial gray scale so as to ensure the influence degree of the gray scale.
Rollback (Rollback) refers to the act of restoring a program or data to the last state, or may refer to the act of restoring the system to the last version. Rollback includes types of program rollback and data rollback.
Test environment (testing): typically, a configuration of the production environment is cloned and a program does not work properly in the test environment and must not be distributed to the production machines. After the programmer develops the system, the programmer gives the system to a testing department for comprehensive testing, whether the realized function is wrong or not is checked, and the tester can simulate various operation conditions for testing.
Production environment (production): the method refers to that the method formally provides external services, and generally closes an error report and opens an error log. The production environment is an online environment, is released to an external environment, and is formally provided for a user to use.
The cluster, a group of independent servers, appears as a single system in the network, and is connected through a group of loosely integrated computer software or hardware to complete the work.
Referring to fig. 1, a network architecture diagram applicable to an embodiment of the present invention includes a plurality of zones, each zone includes at least one cluster, and each cluster includes at least one server. In fig. 1, two regions are taken as an example for description, each region includes 2 clusters, and in practical applications, the number of the regions is not limited, and the number of the clusters included in the region is not limited. The network architecture may further include a management device, and the management device may be a single device or a server.
In the embodiment of the invention, the division of the areas is not fixed, and a plurality of clusters can be divided into different areas in actual conditions.
In the embodiment of the invention, when the version of the system in the server is upgraded, the upgrading can be carried out based on a hierarchical release mode. Specifically, the version upgrade of the system may include multiple stages, and in the version upgrade process, the region of version upgrade may be added at each stage, so as to gradually expand the range of version upgrade, and upgrade all regions to new versions.
For example, in the embodiment of the present invention, a system for hierarchical publishing deployment online may sequentially go through the following environments in order: test environment, regression environment, pre-release environment, production environment.
The version upgrade of the system may include four phases: the first stage, testing the version corresponding to the service; the second stage, the version corresponding to the service is regressed; the third stage, pre-issuing the version corresponding to the service; and a fourth stage, serving the corresponding version on line.
In the first stage, version upgrading can be carried out on a system of servers in one area; in the second phase, the system of servers in at least two zones may be version upgraded, and so on, up to the fourth phase.
In the embodiment of the invention, when the version upgrading has errors, the system in the server can be rolled back to the version before the test service, namely to which version before the current latest version is returned.
As shown in fig. 2, a schematic flowchart of a rollback method based on hierarchical publishing according to an embodiment of the present invention is provided, where the method may be applied to the architecture shown in fig. 1, and the method includes:
s201: at least one region requiring rollback is determined among the plurality of regions.
Wherein each zone comprises at least one cluster comprising at least one server. The version of the system deployed in the server of each zone is the same.
Specifically, in a possible implementation manner, for any one of the plurality of areas, if all servers in the area are not online before the version update of the system, it is determined that the area does not need to be rolled back. In another possible implementation manner, for any one of the plurality of areas, if the systems of all servers in the area are not updated to the latest version, it is determined that the area does not need to be rolled back, for example, if the systems in the servers suddenly stop during a version update, and the version update is not completed, the area does not need to be rolled back.
In this embodiment of the present invention, an area other than the area that does not need to be rolled back among the plurality of areas may be determined as at least one area that needs to be rolled back.
S202: a priority of each of the at least one region is determined.
In the embodiment of the present invention, for any one of the at least one area, the priority of the area may be determined according to an environment corresponding to the system in the server in the area; when the environment corresponding to the system in the server in the area is a test environment, the priority of the area is the lowest; and when the environment corresponding to the system in the server in the area is a production environment, the priority of the area is the highest.
For example, a system that hierarchically publishes deployments online in a server may sequentially go through the following environments in order: test environment, regression environment, pre-release environment, production environment.
Then, if the version of the system of the server in a region corresponds to the test environment, the priority of the region is the fourth priority, i.e. the lowest priority;
if the version of the system of the server corresponds to the regression environment in one region, the priority of the region is the third priority;
if the version of the system of the server corresponds to the pre-release environment in one area, the priority of the area is a second priority;
if the version of the system of the server in a zone corresponds to the production environment, the priority of the zone is the first priority, i.e., the highest priority.
S203: and according to the priority of each area in the at least one area, performing a rollback operation on the system of the server in each area.
In the embodiment of the present invention, the rollback operation may be performed on the systems of the servers in each of the at least one area according to the order from high priority to low priority. The specific process of performing the rollback operation is not limited in this embodiment of the present invention, and is not described herein again.
In connection with the previous example in S202, if the version of the system of servers in a region corresponds to a production environment, then the servers in the region may be rolled back first.
And after the rollback of the server in the area with the first priority is finished, rolling back the server in the area with the second priority, rolling back the server in the area with the third priority, and finally rolling back the server in the area with the fourth priority.
In conjunction with the foregoing description, as shown in fig. 3, a flow chart of a method provided by the embodiment of the invention is shown.
S301: and judging whether all the areas in the plurality of areas need to execute the rollback operation, if so, turning to S302, and if not, turning to S303.
S302: and determining the whole area as the area needing to be rolled back.
S303: at least one region requiring rollback is determined among the plurality of regions.
S304: a priority of each of the at least one region requiring rollback is determined.
S305: and determining the server needing to be rolled back in each area needing to be rolled back.
Specifically, in one possible implementation, for any server in an area, if the server is not online before the version update of the system, it is determined that the server does not need to rollback. In another possible implementation manner, for any server in an area, if the system of the server is not updated to the latest version, it is determined that the server does not need to roll back, for example, the system in the server suddenly stops during a version update, and no version update is completed, then roll back is not needed.
S306: and performing rollback operation on the systems of the servers in each of all the areas needing rollback according to the sequence from high priority to low priority.
In the embodiment of the invention, in the process of executing the rollback operation on the system of the server in each area, whether the rolled-back service is checked or not can be selected according to the current environment, and if all checking steps are skipped, the rollback efficiency can be improved. In the embodiment of the present invention, for any one of the at least one region, when a rollback operation is performed on a system of servers in a cluster in the region according to cluster granularity, after system rollback of the servers in each cluster is completed, a step of performing service check on the system may be skipped. Specifically, as shown in fig. 4, a schematic flow chart of an inspection method according to an embodiment of the present invention is provided.
S401: and selecting one cluster from the area to perform rollback operation.
One cluster may be arbitrarily selected, or a cluster including more servers may be preferentially selected, which is not limited in the embodiment of the present invention.
S402: the servers in the cluster complete the rollback operation.
S403: whether the rolled back service in the server is checked, if yes, S404 is executed, otherwise, S405 is executed.
S404: and if the cluster does not execute the rollback operation, returning to the S401, and if the cluster does not execute the rollback operation, returning to the S408.
S405: checking for a service that has rolled back in the server.
How to check specifically is not limited in the embodiment of the present invention, and the checking may be performed manually or by a specific program, which is not described herein again.
S406: if the checked service is expected, go to S404, otherwise go to S407.
S407: and determining that the rollback is failed, and terminating the rollback operation.
S408: and determining that the rollback is successful.
In the embodiment of the invention, the corresponding version of the system in each environment has a corresponding installation file. Each server may perform storage backup on each received installation file, where each installation file corresponds to a file identifier. Before the rollback operation is executed on the server, judging whether an installation file required by the rollback operation exists in the server or not; if the installation files exist, the rollback operation is realized by directly calling the installation files of the local backup, so that the installation files do not need to be downloaded, the downloading and deploying link is omitted, and the rollback efficiency of each server is greatly improved.
Specifically, for any server in the at least one area, the flow of the server performing the rollback operation may refer to fig. 5. Fig. 5 is a schematic flow chart of a rollback method according to an embodiment of the present invention.
S501: the method comprises the steps that a server obtains a rollback instruction, wherein the rollback instruction is used for indicating the server to execute rollback operation, and the rollback instruction comprises a file identifier of an installation file.
The rollback instruction may be sent by the management device of the at least one area, or may be sent by another device, which is not limited in this embodiment of the present invention.
S502: the server judges whether an installation file required for executing rollback operation exists in the server; and if the installation file exists, turning to S503, otherwise, turning to S504.
Specifically, if the server includes a file corresponding to the file identifier, it is determined that the installation file exists in the server; and if the server does not comprise the file corresponding to the file identifier, determining that the installation file does not exist in the server.
S503: and realizing the rollback operation through the installation file in the server.
S504: and acquiring a download address of the installation file.
How to obtain the data is not limited in the embodiment of the present invention. In one implementation, the download address may be located in the rollback instruction.
S505: and downloading the installation file according to the acquired download address.
S506: and realizing rollback operation through the downloaded installation file.
The various embodiments described herein may be implemented as stand-alone solutions or combined in accordance with inherent logic and are intended to fall within the scope of the present application.
Based on the same technical concept, an embodiment of the present invention provides a rollback apparatus based on hierarchical publication, as shown in fig. 6, where the apparatus 600 includes: a processing unit 601 and a rollback unit 602. The division of the modules in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation. In addition, functional modules in the embodiments of the present application may be integrated into one processor, may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
A processing unit for determining at least one region requiring rollback among a plurality of regions; wherein each zone comprises at least one cluster comprising at least one server;
a rollback unit for determining a priority of each of the at least one region; and according to the priority of each area in the at least one area, performing a rollback operation on the system of the server in each area.
The apparatus may further perform other steps, which may specifically refer to the foregoing description and will not be described herein again.
Based on the same technical concept, the embodiment of the present invention provides a computer device, where the computer device may be a terminal or a server, as shown in fig. 7, the device 700 includes at least one processor 701 and a memory 702 connected to the at least one processor, a specific connection medium between the processor 701 and the memory 702 is not limited in the embodiment of the present invention, and the processor 701 and the memory 702 are connected through a bus in fig. 7 as an example. The bus may be divided into an address bus, a data bus, a control bus, etc. The apparatus shown in fig. 7 may be implemented as a hardware circuit of the apparatus shown in fig. 6. The communication device may be adapted to perform the steps of the above described method embodiments in the previously shown flow charts. For convenience of explanation, fig. 7 shows only the main components of the communication apparatus.
In the embodiment of the present invention, the memory 702 stores instructions executable by the at least one processor 701, and the at least one processor 701 may execute the steps included in the method shown in fig. 5 by executing the instructions stored in the memory 702.
The processor 701 is a control center of the computer device, and may connect various parts of the computer device by using various interfaces and lines, by executing or executing instructions stored in the memory 702 and calling data stored in the memory 702. Optionally, the processor 701 may include one or more processing units, and the processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly handles an operating system, a user interface, an application program, and the like, and the modem processor mainly handles wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 701. In some embodiments, processor 701 and memory 702 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 701 may be a general-purpose processor, such as a Central Processing Unit (CPU), a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, configured to implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
Memory 702, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 702 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and the like. The memory 702 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 702 of embodiments of the present invention may also be circuitry or any other device capable of performing a storage function to store program instructions and/or data.
Based on the same inventive concept, embodiments of the present invention provide a computer-readable storage medium storing a computer program executable by a computer device, which, when the program is run on the computer device, causes the computer device to perform the steps of the above-mentioned method.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data transmission apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data transmission apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data transmission apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data transfer apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A rollback method based on hierarchical publication is characterized by comprising the following steps:
determining at least one region requiring rollback among a plurality of regions; wherein each zone comprises at least one cluster comprising at least one server;
determining a priority for each of the at least one region;
and according to the priority of each area in the at least one area, performing a rollback operation on the system of the server in each area.
2. The method of claim 1, wherein determining at least one region of the plurality of regions that requires rollback comprises:
for any one of the plurality of regions, determining that the region does not need to be rolled back if the servers in the region are not online before a version update of the system, or the system of the servers in the region is not updated to a latest version;
determining an area of the plurality of areas other than the area not requiring rollback as at least one area requiring rollback.
3. The method of claim 1 or 2, wherein the determining the priority of each of the at least one region comprises:
for any area in the at least one area, the priority of the area is determined according to the environment corresponding to the system in the server in the area; when the environment corresponding to the system in the server in the area is a test environment, the priority of the area is the lowest; and when the environment corresponding to the system in the server in the area is a production environment, the priority of the area is the highest.
4. The method of claim 3, wherein performing a rollback operation on the system of servers within each zone according to the priority of each zone of the at least one zone comprises:
and performing rollback operation on the systems of the servers in each of the at least one region in the order of priority from high to low.
5. The method of claim 3, wherein the method further comprises:
for any one of the at least one region, performing a rollback operation on a system of servers within the cluster in the region at a cluster granularity; wherein the step of performing service checks on the system is skipped after the system rollback of the servers within each cluster is completed.
6. The method of claim 1 or 2, wherein the method further comprises:
for any server in the at least one area, before rollback operation is performed on the server, judging whether an installation file required for performing the rollback operation exists in the server;
and if the installation file exists, realizing rollback operation through the installation file.
7. The method according to claim 6, characterized in that if the installation file does not exist, the installation file is downloaded according to the acquired download address;
and realizing the rollback operation through the downloaded installation file.
8. The method of claim 6, wherein said determining whether an installation file required to perform a rollback operation exists in the server comprises:
acquiring a rollback instruction, wherein the rollback instruction is used for indicating the server to execute a rollback operation, and the rollback instruction comprises a file identifier of the installation file;
if the server comprises the file corresponding to the file identifier, determining that the installation file exists in the server;
and if the server does not comprise the file corresponding to the file identifier, determining that the installation file does not exist in the server.
9. A rollback apparatus based on hierarchical publication, comprising:
a processing unit for determining at least one region requiring rollback among a plurality of regions; wherein each zone comprises at least one cluster comprising at least one server;
a rollback unit for determining a priority of each of the at least one region; and according to the priority of each area in the at least one area, performing a rollback operation on the system of the server in each area.
10. A computer-readable storage medium, characterized in that the storage medium stores computer instructions which, when executed by a processor, implement the method of any one of claims 1 to 8.
CN202111583248.1A 2021-12-22 2021-12-22 Rollback method and device based on hierarchical publication Pending CN114443358A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111583248.1A CN114443358A (en) 2021-12-22 2021-12-22 Rollback method and device based on hierarchical publication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111583248.1A CN114443358A (en) 2021-12-22 2021-12-22 Rollback method and device based on hierarchical publication

Publications (1)

Publication Number Publication Date
CN114443358A true CN114443358A (en) 2022-05-06

Family

ID=81364201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111583248.1A Pending CN114443358A (en) 2021-12-22 2021-12-22 Rollback method and device based on hierarchical publication

Country Status (1)

Country Link
CN (1) CN114443358A (en)

Similar Documents

Publication Publication Date Title
CN107193607B (en) Method and apparatus for updating code file, storage medium, processor, and terminal
CN109491763B (en) System deployment method and device and electronic equipment
CN106951284B (en) User interface upgrading method and device based on android system application and intelligent terminal
CN110535776B (en) Gateway current limiting method, device, gateway, system and storage medium
CN109814877A (en) Project dispositions method and its device based on environmental management
CN116257438A (en) Updating method of interface test case and related equipment
CN114356504A (en) Data migration method and device in cluster, electronic equipment and storage medium
CN114237754A (en) Data loading method and device, electronic equipment and storage medium
CN113468143A (en) Data migration method, system, computing device and storage medium
CN112631646A (en) Data compatibility method, device and equipment for APP version degradation and storage medium
CN114391136A (en) Enhanced virtual machine image management system
CN110007946B (en) Method, device, equipment and medium for updating algorithm model
CN114443358A (en) Rollback method and device based on hierarchical publication
CN110471828B (en) Operating system testing method, device and equipment thereof
CN116450165A (en) Method, system, terminal and storage medium for quickly building environment and deploying program
CN115827028A (en) System upgrading method and device, storage medium and electronic equipment
CN115438723A (en) Data fusion method, device, equipment and storage medium
CN112579113A (en) Application program upgrading method and device, storage medium and terminal
CN112699023B (en) Project interface testing method and device, computer equipment and storage medium
CN116662210B (en) Interface regression testing method, device and application
CN115757088B (en) Fault injection method, device and equipment based on environment variable
WO2024070617A1 (en) Information processing system and information processing method
CN117827632A (en) Test method, test device and storage medium
CN114185555A (en) Server deployment method and device and electronic equipment
CN115904933A (en) Code warehouse management method and device, electronic equipment and storage medium

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