CN115080093B - Distributed system upgrading method, device, server and medium - Google Patents
Distributed system upgrading method, device, server and medium Download PDFInfo
- Publication number
- CN115080093B CN115080093B CN202210912291.6A CN202210912291A CN115080093B CN 115080093 B CN115080093 B CN 115080093B CN 202210912291 A CN202210912291 A CN 202210912291A CN 115080093 B CN115080093 B CN 115080093B
- Authority
- CN
- China
- Prior art keywords
- upgrading
- distributed system
- checking
- inspection
- cluster
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a method, a device, a server and a medium for upgrading a distributed system, and relates to the technical field of distribution. Comprising the following steps: acquiring an upgrade file and uploading the upgrade file to a distributed system; upgrading the clusters in the distributed system and the nodes corresponding to the clusters according to the upgrading file; under the condition that the upgrading state of the cluster is a pause state, pausing the current upgrading process of the distributed system and counting the nodes to be upgraded in the current upgrading process to an upgrading pause information table; and under the condition of continuing the current upgrading process, upgrading the node to be upgraded in the upgrading pause information table. Therefore, in the method, the upgraded nodes and the un-upgraded nodes can be distinguished through the upgrade pause information table, and when the upgrade is started again, only the nodes in the upgrade pause information table are required to be upgraded, so that the nodes which are upgraded before are not required to be upgraded again, and the upgrade efficiency of the distributed system is improved.
Description
Technical Field
The present application relates to the field of distributed technologies, and in particular, to a method, an apparatus, a server, and a medium for upgrading a distributed system.
Background
A distributed system is a cluster system with many data nodes, each data node can be understood as a data storage server, and when data storage is performed, a plurality of pieces of data are stored in the corresponding data node.
The distributed system needs to be updated and maintained regularly, when the distributed storage system is updated, the existing distributed storage system needs to upload an update file, can issue an update request to update after successful uploading, and displays simple update process information below. In the process of upgrading a distributed system, once a certain cluster or node has a problem, the upgrading is failed, and when the upgrading is carried out again, all clusters and nodes (including the clusters and nodes which are successfully upgraded before) need to be upgraded again, so that the upgrading efficiency of the distributed system is finally reduced.
It can be seen that how to improve the upgrade efficiency of the distributed system is a technical problem that the person skilled in the art continues to solve.
Disclosure of Invention
The application aims to provide a method, a device, a server and a medium for upgrading a distributed system, which are used for improving the upgrading efficiency of the distributed system.
In order to solve the above technical problems, the present application provides a method for upgrading a distributed system, including:
Acquiring an upgrade file and uploading the upgrade file to the distributed system;
upgrading the clusters in the distributed system and the nodes corresponding to the clusters according to the upgrading file;
Under the condition that the upgrading state of the cluster is a pause state, pausing the current upgrading process of the distributed system and counting the nodes to be upgraded in the current upgrading process to an upgrading pause information table;
And under the condition of continuing the current upgrading process, upgrading the node to be upgraded in the upgrading pause information table.
Preferably, after the upgrade file is obtained and uploaded to the distributed system, before the cluster in the distributed system and the node corresponding to the cluster are upgraded according to the upgrade file, the method further includes:
Checking the clusters and the nodes respectively and obtaining corresponding checking results;
And under the condition that the inspection results are all passed, entering the step of upgrading the cluster in the distributed system and the node corresponding to the cluster according to the upgrading file.
Preferably, after the obtaining the upgrade file and uploading the upgrade file to the distributed system, before the inspecting the cluster and the node respectively and obtaining the corresponding inspection results, the method further includes:
acquiring a version of the upgrade file and a current version of the distributed system;
under the condition that the version of the upgrade file is higher than the current version, carrying out encryption verification on the upgrade file;
And under the condition that the encryption verification passes, entering the step of respectively checking the cluster and the nodes and obtaining corresponding checking results.
Preferably, the checking the cluster and the node respectively and obtaining the corresponding checking result includes:
Acquiring inspection items of the clusters;
Checking the checking items of the cluster in a serial mode and acquiring a first checking result;
and if the first checking result is passing, checking the nodes in a parallel mode and acquiring a second checking result.
Preferably, checking the check items of the cluster and acquiring the first check result includes:
judging whether the checking item to be checked is a blocking item or not;
If yes, checking each blocking item of the checking item, and if the blocking item does not pass the checking, determining that the first checking result is not passed; otherwise, determining that the first checking result is passing;
If not, after the inspection of each inspection item is completed, if the inspection item which is failed in inspection exists, determining that the first inspection result is failed; and otherwise, determining that the first checking result is passing.
Preferably, the checking the node and obtaining the second checking result includes:
Under the condition that an instruction for checking the nodes is received, checking the nodes in turn;
Polling the inspection result of each node according to the fixed frequency;
if the inspection results of all the nodes are passing, determining that the second inspection result is passing; and otherwise, determining that the second checking result is failed.
Preferably, suspending the current upgrade process for the distributed system comprises:
judging whether the current node is the node which is being upgraded or not;
If not, suspending the current upgrading process of the distributed system;
if yes, after the current node finishes upgrading, suspending the current upgrading process of the distributed system.
Preferably, after the node to be upgraded in the upgrade suspension information table is upgraded while continuing the current upgrade process, the method further includes:
Acquiring related data in the current upgrading process; wherein, the related data at least comprises a status icon, a summary element, detailed information and a progress bar element;
The relevant data is exposed through the modular UI component design.
Preferably, the exposing the related data through the modular UI component design includes:
Determining the minimum unit element displayed;
performing modular combination of a preset scale based on each minimum unit element;
And splicing and combining the modularized combination as a new element to display the related data.
Preferably, the exposing of the data in the cluster inspection process and the data in the inspection process of the node by the modular UI component design includes at least one of:
Combining the status icon and the summary element into a first module unit so as to display data in the cluster inspection process and data in the inspection process of the node through the first module unit;
Combining the first module unit and the detailed information into a second module unit so as to display data in the cluster inspection process and data in the inspection process of the node through the second module unit;
Assembling a cluster inspection module unit or a node inspection module unit through the second module unit so as to display data in the cluster inspection process and data in the inspection process of the node through the cluster inspection module unit or the node inspection module unit;
and combining the cluster inspection module unit, the node inspection module unit, the progress bar element and multiplexing the first module unit into a third module unit, so that the data in the cluster inspection process and the data in the inspection process of the node are displayed through the third module unit.
In order to solve the above technical problem, the present application further provides a device for upgrading a distributed system, including:
The acquisition module is used for acquiring an upgrade file and uploading the upgrade file to the distributed system;
the first upgrading module is used for upgrading the cluster in the distributed system and the node corresponding to the cluster according to the upgrading file;
the pause and statistics module is used for pausing the current upgrading process of the distributed system and counting the nodes to be upgraded in the current upgrading process to an upgrading pause information table;
and the second upgrading module is used for upgrading the node to be upgraded in the upgrading pause information table under the condition of continuing the current upgrading process.
In order to solve the above technical problem, the present application further provides a server, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the method for upgrading the distributed system when executing the computer program.
In order to solve the above technical problem, the present application further provides a computer readable storage medium, where a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for upgrading a distributed system described above.
The method for upgrading the distributed system provided by the application comprises the following steps: acquiring an upgrade file and uploading the upgrade file to a distributed system; upgrading the clusters in the distributed system and the nodes corresponding to the clusters according to the upgrading file; under the condition that the upgrading state of the cluster is a pause state, pausing the current upgrading process of the distributed system and counting the nodes to be upgraded in the current upgrading process to an upgrading pause information table; and under the condition of continuing the current upgrading process, upgrading the node to be upgraded in the upgrading pause information table. Therefore, in the method, the upgrade of the distributed system is suspended according to the suspension state of the cluster, the nodes which are not upgraded are stored in the upgrade suspension information table, the upgraded nodes and the nodes which are not upgraded can be distinguished through the upgrade suspension information table, and when the upgrade is started again, only the nodes in the upgrade suspension information table are required to be upgraded, so that the nodes which are already upgraded before are not required to be upgraded again, and the upgrade efficiency of the distributed system is improved.
In addition, the application also provides a device, a server and a computer readable storage medium for upgrading the distributed system, which have the same or corresponding technical characteristics as the method for upgrading the distributed system, and the effects are the same.
Drawings
For a clearer description of embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described, it being apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a flow chart of a method for upgrading a distributed system according to an embodiment of the present application;
FIG. 2 is a diagram of minimum unit elements in an upgrade process according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an upgrade information modularized UI component design checked before upgrade according to an embodiment of the present application;
FIG. 4 is a block diagram of an apparatus for distributed system upgrades provided by an embodiment of the present application;
FIG. 5 is a block diagram of a server according to another embodiment of the present application;
FIG. 6 is a schematic diagram of an online upgrade process of a distributed system according to an embodiment of the present application;
fig. 7 is a schematic state diagram corresponding to an upgrade process of a distributed system according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by a person of ordinary skill in the art without making any inventive effort are within the scope of the present application.
The core of the application is to provide a method, a device, a server and a medium for upgrading a distributed system, which are used for improving the upgrading efficiency of the distributed system.
A cluster and a node corresponding to the cluster exist in the distributed system. Clusters are typically connected by a set of loosely-integrated computer software and/or hardware, and in popular terms, several servers are grouped together to implement the same service. When one machine fails, the execution of other servers is not affected. A node refers to a server in a cluster. Distributed systems typically require periodic upgrade maintenance during long-term use. When online upgrade is performed at present, an upgrade file needs to be uploaded firstly, an upgrade request can be issued for upgrade after the upgrade file is successfully uploaded, and simple upgrade process information including upgrade progress, current upgrade nodes and upgraded nodes is displayed below. The upgrade of the current distributed system has the following problems: if the cluster has problems or the nodes have problems during upgrading, the upgrading failure is finally caused. The upgrade time is generally longer, the upgrade failure is very time-consuming and the efficiency is low because of the problem of clusters or nodes after the long-time upgrade, and the current direct upgrade mechanism lacks a module checked in advance and cannot recognize the problem in advance; the current upgrade process has no pause mechanism once started, and the upgrade function is very time-consuming, especially when in a large-scale cluster scenario, the upgrade process can take several hours. Under the limitation of certain scene conditions, if a sufficient time window is not provided for completing one-time upgrading, the current upgrading cannot be stopped once being started, the current upgrading cannot be completed under the time limitation, and the next time of upgrading still needs to be performed again, so that the efficiency is low, the time is always limited, and the sufficient time window is required to be provided for completing one-time upgrading; the current upgrading processes, particularly effective information of upgrading failure is very limited, the upgrading information cannot be displayed intuitively, the detailed information solving guidance is lacking, and the problem investigation of upgrading failure is challenged. In summary, the current upgrading process has the problems that the upgrading steps are unclear, a pause mechanism is not provided after the upgrading is started, effective information is not displayed in the upgrading process and after the upgrading is failed, and the like, so that the difficulty is brought to the online upgrading process, and meanwhile, the difficulty of checking and processing after the upgrading is failed is also increased.
Therefore, the application realizes the optimization of the upgrading process of the distributed system by adding the checking before the upgrading and the pause mechanism in the upgrading process, and performs friendly display on the data in the upgrading process by the design of the modularized User Interface (UI) component, so that the operation of the online upgrading process is clearer, the cluster and node problems which do not accord with the upgrading can be identified in advance, the upgrading pause mechanism is provided, and the upgrading efficiency is improved. Meanwhile, the friendly display of the data in the upgrading process is beneficial to the tracking of the upgrading process and the problem positioning and checking after the upgrading failure. Meanwhile, the design of the UI component modularized through the upgrade information has flexibility and expandability.
In order to better understand the aspects of the present application, the present application will be described in further detail with reference to the accompanying drawings and detailed description. Fig. 1 is a flowchart of a method for upgrading a distributed system according to an embodiment of the present application, where, as shown in fig. 1, the method includes:
s10: and acquiring the upgrade file and uploading the upgrade file to the distributed system.
In the process of upgrading a distributed system, an upgrade file (also referred to as an upgrade package) needs to be uploaded to the distributed system. Since the distributed system is to be upgraded, the version of the upgrade file needs to be higher than the current version of the distributed system. In practice, after a new upgrade file is developed (herein, the new upgrade file refers to an upgrade file having a version higher than a current version of the distributed system), the upgrade file may be uploaded to the distributed system to upgrade the distributed system, or whether a new upgrade file exists may be checked periodically, and the new upgrade file may be uploaded to the distributed system after the new upgrade file exists.
S11: and upgrading the clusters in the distributed system and the nodes corresponding to the clusters according to the upgrading file.
Because the distributed system has clusters and nodes corresponding to the clusters, the distributed system is upgraded by the clusters and the nodes corresponding to the clusters.
S12: under the condition that the upgrading state of the cluster is a pause state, pausing the current upgrading process of the distributed system and counting the nodes to be upgraded in the current upgrading process to an upgrading pause information table.
S13: and under the condition of continuing the current upgrading process, upgrading the node to be upgraded in the upgrading pause information table.
In practice, typically distributed system upgrades are typically completed in a limited amount of time, and after the upgrade exceeds the time limit, the upgrade is re-performed. Therefore, in this embodiment, an upgrade suspension mechanism is set in the upgrade process, and when a user needs to suspend the upgrade distributed system or a cluster of the distributed system has a problem or a node has a problem in the upgrade process, a suspension upgrade command can be issued. After issuing the pause upgrade command, firstly modifying the cluster upgrade state, setting the cluster upgrade state as 'triggered pause', and responding to the interface pause command to complete the issuing after the modification. Under the condition that the upgrading state of the cluster is a pause state, pausing the current upgrading process of the distributed system, and then counting the nodes to be upgraded in the current upgrading process to an upgrading pause information table. It should be noted that, the nodes to be upgraded include nodes that have been upgraded but failed in the upgrade and nodes that have not been upgraded before. The specific contents in the upgrade suspension information table are not limited, but at least the names of the nodes are included. Under the condition of continuing the current upgrading process, only the node to be upgraded in the upgrading pause information table is required to be upgraded.
The method for upgrading the distributed system provided by the embodiment comprises the following steps: acquiring an upgrade file and uploading the upgrade file to a distributed system; upgrading the clusters in the distributed system and the nodes corresponding to the clusters according to the upgrading file; under the condition that the upgrading state of the cluster is a pause state, pausing the current upgrading process of the distributed system and counting the nodes to be upgraded in the current upgrading process to an upgrading pause information table; and under the condition of continuing the current upgrading process, upgrading the node to be upgraded in the upgrading pause information table. Therefore, in the method, the upgrade of the distributed system is suspended according to the suspension state of the cluster, the nodes which are not upgraded are stored in the upgrade suspension information table, the upgraded nodes and the nodes which are not upgraded can be distinguished through the upgrade suspension information table, and when the upgrade is started again, only the nodes in the upgrade suspension information table are required to be upgraded, so that the nodes which are already upgraded before are not required to be upgraded again, and the upgrade efficiency of the distributed system is improved.
In implementation, if a problem exists in a cluster or a problem occurs in a node during upgrading of the distributed system, the upgrading is finally failed. And upgrade is generally long, and upgrade failure caused by cluster or node problems after long-time upgrade is very time-consuming and inefficient. Therefore, as a preferred embodiment, after acquiring the upgrade file and uploading the upgrade file to the distributed system, before upgrading the cluster and the node corresponding to the cluster in the distributed system according to the upgrade file, the method for upgrading the distributed system further includes:
checking the clusters and the nodes respectively and obtaining corresponding checking results;
And under the condition that the inspection results are all passed, entering a step of upgrading the cluster and the node corresponding to the cluster in the distributed system according to the upgrading file.
The checking of clusters and nodes may be referred to herein as pre-upgrade checking. The results of the pre-upgrade checks fall into four main states: checking before upgrading, checking success and checking failure are not started. Because the distributed system includes clusters and nodes, in order to perform more accurate pre-upgrade inspection on the distributed system, the pre-upgrade inspection in this embodiment includes two inspection modules: cluster inspection and node inspection.
The inspection before upgrading the distributed system provided by the embodiment starts to upgrade the distributed system only when the inspection passes, namely, the inspection is successful, so that the problem of clusters and/or nodes in the upgrading process can be avoided as much as possible, and the upgrading efficiency of the distributed system is improved.
In an implementation, after the upgrade file is acquired and the upgrade file is uploaded to the distributed system, before the cluster and the node are respectively checked and the corresponding checking result is acquired, the method for upgrading the distributed system further includes:
Acquiring a version of an upgrade file and a current version of a distributed system;
Under the condition that the version of the upgrade file is higher than the current version, carrying out encryption verification on the upgrade file;
And under the condition that the encryption verification is passed, entering a step of respectively checking the cluster and the nodes and obtaining corresponding checking results.
In order to avoid the situation of failure in upgrading the distributed system caused by the upgrade file, in this embodiment, it is first determined whether the version of the upgrade file is higher than the current version of the distributed system, if so, the upgrade file is checked again, and only if the check passes, the checking before the upgrade of the distributed system is started. The way of checking the upgrade file is not limited, and for example, the values of the digest Algorithm5 (Message-digest Algorithm5, MD 5), the secure hash Algorithm (Secure Hash Algorithm, SHA), and the cyclic redundancy check32 (Cyclic Redundancy Check, CRC 32) of the file may be checked.
After uploading the upgrade file to the distributed system, the version of the upgrade file and the upgrade file are encrypted and checked, so that the situation that the distributed system cannot be upgraded or fails to be upgraded due to the abnormality of the upgrade file is discharged as much as possible, and the upgrade efficiency of the distributed system is improved.
When checking the cluster and the node corresponding to the cluster before upgrading, the preferred implementation manner is that respectively checking the cluster and the node and obtaining the corresponding checking result includes:
Acquiring inspection items of a cluster;
checking the checking items of the cluster in a serial mode and acquiring a first checking result;
And if the first checking result is passing, checking the nodes in a parallel mode and acquiring a second checking result.
The pre-upgrade checks include a cluster check and a node check, and the order of the cluster check and the node check is not limited. In this embodiment, the cluster is inspected first and then the nodes are inspected. When the cluster is inspected, the inspection items of the cluster are inspected in a serial mode, namely after the inspection result of one inspection item is passed, the inspection of the other inspection item is started; if the checking result of one checking item is not passed, the checking flow is terminated. And checking the nodes again under the condition that the checking results of all the checking items of the cluster pass. When checking the nodes, since the number of the nodes is large, if the nodes are checked in a serial manner, a long time is required to complete the checking of all the nodes, so in this embodiment, all the nodes are updated in a parallel manner, that is, all the nodes are checked synchronously.
According to the embodiment, under the condition that the cluster inspection is passed, the nodes are inspected again, and the serial inspection is adopted when the cluster inspection is carried out, and the parallel inspection is adopted when the nodes are inspected, so that the inspection efficiency before upgrading can be improved, and the upgrading efficiency of the distributed system can be improved.
In practice, the examination item may be a blocking item or a non-blocking item. Thus, checking the inspection items of the cluster and obtaining a first inspection result includes:
judging whether the checking item to be checked is a blocking item or not;
if yes, checking each blocking item of the checking item, and determining that the first checking result is failed under the condition that the blocking item fails to pass the checking; otherwise, determining that the first checking result is passing;
if not, after the inspection of each inspection item is completed, if the inspection item which fails the inspection exists, determining that the first inspection result is failed; otherwise, the first checking result is determined to be passing.
The manner of acquiring the first inspection result in the case that the inspection item is a blocking item or a non-blocking item provided in this embodiment enables the first inspection result to be obtained according to the specific situation of the inspection item.
The above steps describe checking the cluster, and further checking the node after checking the cluster, specifically, checking the node and obtaining the second checking result includes:
Under the condition that an instruction for checking the nodes is received, checking each node in turn;
polling the checking result of each node according to the fixed frequency;
If the inspection results of all the nodes are passing, determining that the second inspection result is passing; and otherwise, determining that the second checking result is not passed.
The specific value of the fixed frequency is not limited, and is determined according to practical situations. In general, in order to obtain the inspection result of each node in time, the value of the fixed frequency that is set is not excessively large, and in order to reduce the number of polling, a smaller fixed frequency value is not set, and in short, the value of the fixed frequency that is set is reasonable. And sequentially checking each node in a parallel mode, polling the checking results of each node according to fixed frequency, and determining that the second checking result is passing only when the checking results of each node are all passing.
In practice, while the upgrade to the distributed system is suspended, there are cases where some nodes upgrade is completed and upgrade is successful, some nodes are to be upgraded, some nodes have been upgraded but upgrade fails. For nodes that have completed an upgrade and nodes to be upgraded, halting the upgrade has little impact on them, while for nodes that are being upgraded, the preferred embodiment is that halting the current upgrade process for the distributed system includes:
Judging whether the current node is the node being upgraded or not;
If not, suspending the current upgrading process of the distributed system;
If yes, after the current node finishes upgrading, the current upgrading process of the distributed system is paused.
For the node being upgraded, the current upgrading process of the distributed system is paused after the current node finishes upgrading. The case of waiting for the current node to complete the upgrade may be referred to as a wait for suspension state. By waiting for the current node to finish upgrading, the upgrading condition of the current node (comprising success of upgrading the current node and failure of upgrading the current node) can be obtained, so that the node to be upgraded in the upgrading pause information table is more accurate, and the accuracy of the distributed system upgrading is improved.
The distributed system is upgraded in the above embodiment. In order to facilitate the user to know the data in the upgrade process, the preferred embodiment is that, after the upgrade is performed on the node to be upgraded in the upgrade suspension information table under the condition that the current upgrade process is continued, the method for upgrading the distributed system further includes:
Acquiring related data in the current upgrading process; the related data at least comprises a status icon, a summary element, detailed information and a progress bar element;
relevant data is exposed through the modular UI component design.
Specifically, exposing relevant data through the modular UI component design includes:
Determining the minimum unit element displayed;
performing modular combination of a preset scale based on each minimum unit element;
and splicing and combining the modularized combination as a new element to show related data.
For example, exposing data in a cluster inspection process and data in an inspection process of a node through a modular UI component design includes at least one of:
Combining the status icons and the summary elements into a first module unit so as to display data in the cluster inspection process and data in the inspection process of the nodes through the first module unit;
Combining the first module unit and the detailed information into a second module unit so as to display data in a cluster inspection process and data in an inspection process of the node through the second module unit;
The second module units are spliced into a cluster checking module unit or a node checking module unit, so that data in the cluster checking process and data in the checking process of the nodes are displayed through the cluster checking module unit or the node checking module unit;
The cluster inspection module unit, the node inspection module unit, the progress bar element and the multiplexing first module unit are combined into a third module unit, so that data in the cluster inspection process and data in the node inspection process are displayed through the third module unit.
In the checking before upgrading and upgrading process, friendly detailed information display is supported. The pre-upgrade checks include the overall progress and result, detailed information of the cluster check module (check profile, in-check content and specific time, check failure item detailed information and time), detailed information of the node level check module (check profile, in-check node, check failure node detailed information and time). The upgrade process includes upgrade overall progress and result, upgrade node profile, upgrade information of node granularity (detailed information and time of nodes in upgrade state, nodes that upgrade successfully, detailed failure information and time of nodes that upgrade failed). The detailed information is displayed with a certain complexity in realization, and on the basis, a modularized UI component design of on-line upgrade scene information is further provided for carrying out modularized processing on the upgrade flow information. Fig. 2 is a diagram of minimum unit elements in an upgrade process according to an embodiment of the present application. As shown in fig. 2, the required minimum unit elements including a status icon (picture or icon element, bound to status data), summary information summary (text element including total data, success data, failure data), detailed information list (list element including name, time and detailed description), progress bar element are first determined. Based on the minimum unit elements, modular combination in different scale forms can be performed, and modules in different scales can be formed and then used as elements to be spliced and combined.
Fig. 3 is a schematic diagram of an upgrade information modularized UI component design checked before upgrade according to an embodiment of the present application. As shown in fig. 3, the status icon element+summary element is combined into a module unit a, where a forms a status-bound icon and a module containing total data, success data and failure data information, and the status icon element+summary element can be used as a module to output information alone or as an element to be combined again; a+the detailed information list is combined into a module unit b, and a larger combined unit is spliced to be used as a cluster checking module c or a node checking module d; c+d can be used as a unit module of the whole pre-upgrade inspection, and on the basis, a total progress bar element p and a combination of multiplexing state elements and summarizing elements can be added, but the data is bound into a' formed by the information of the whole pre-upgrade inspection, so that the complete pre-upgrade inspection module information output is formed.
The mode of displaying the information in the upgrade scene through the modularized UI component design provided by the embodiment enhances the flexibility, reusability and expandability of information display implementation. Meanwhile, according to the detailed information in the upgrading process and after the upgrading failure, the method is beneficial to tracking in the upgrading process and problem locating and checking after the upgrading failure.
In the above embodiments, the method for upgrading the distributed system is described in detail, and the application also provides a corresponding embodiment of a device and a server for upgrading the distributed system. It should be noted that the present application describes an embodiment of the device portion from two angles, one based on the angle of the functional module and the other based on the angle of the hardware.
Fig. 4 is a block diagram of an apparatus for upgrading a distributed system according to an embodiment of the present application. The embodiment is based on the angle of the functional module, and comprises:
The acquisition module 10 is used for acquiring the upgrade file and uploading the upgrade file to the distributed system;
The first upgrading module 11 is used for upgrading the clusters and the nodes corresponding to the clusters in the distributed system according to the upgrading file;
a pause and statistics module 12, configured to pause a current upgrade process for the distributed system and count nodes to be upgraded in the current upgrade process to an upgrade pause information table;
And the second upgrading module 13 is used for upgrading the node to be upgraded in the upgrading pause information table under the condition of continuing the current upgrading process.
Since the embodiments of the apparatus portion and the embodiments of the method portion correspond to each other, the embodiments of the apparatus portion are referred to the description of the embodiments of the method portion, and are not repeated herein.
According to the distributed system upgrading device provided by the embodiment, an upgrading file is obtained through an obtaining module and is uploaded to a distributed system; upgrading the clusters and nodes corresponding to the clusters in the distributed system according to the upgrade files through a first upgrade module; suspending the current upgrading process of the distributed system through a suspending and counting module and counting the nodes to be upgraded in the current upgrading process to an upgrading suspending information table; and upgrading the node to be upgraded in the upgrade pause information table under the condition of continuing the current upgrade process through the second upgrade module. According to the device, the upgrade of the distributed system is suspended according to the suspension state of the cluster, the nodes which are not upgraded are stored in the upgrade suspension information table, the upgraded nodes and the nodes which are not upgraded can be distinguished through the upgrade suspension information table, and when the upgrade is started again, only the nodes in the upgrade suspension information table are required to be upgraded, so that the nodes which are already upgraded before are not required to be upgraded again, and the upgrade efficiency of the distributed system is improved.
Fig. 5 is a block diagram of a server according to another embodiment of the present application. The present embodiment is based on hardware angle, as shown in fig. 5, and the server includes:
a memory 20 for storing a computer program;
a processor 21 for carrying out the steps of the method of distributed system upgrade as mentioned in the above embodiments when executing a computer program.
The server provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
Processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The Processor 21 may be implemented in at least one hardware form of a digital signal Processor (DIGITAL SIGNAL Processor, DSP), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 21 may also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a central processor (Central Processing Unit, CPU); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a graphics processor (Graphics Processing Unit, GPU) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) processor for processing computing operations related to machine learning.
Memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing a computer program 201, which, when loaded and executed by the processor 21, is capable of implementing the relevant steps of the method for distributed system upgrade disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may further include an operating system 202, data 203, and the like, where the storage manner may be transient storage or permanent storage. Operating system 202 may include Windows, unix, linux, among other things. The data 203 may include, but is not limited to, data related to the above-mentioned method of distributed system upgrade, etc.
In some embodiments, the server may further include a display 22, an input-output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is not limiting and may include more or fewer components than illustrated.
The server provided by the embodiment of the application comprises a memory and a processor, wherein the processor can realize the following method when executing a program stored in the memory: the method for upgrading the distributed system has the same effect.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps as described in the method embodiments above.
It will be appreciated that the methods of the above embodiments, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored on a computer readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium for performing all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The computer readable storage medium provided by the application comprises the method for upgrading the distributed system, and the effects are the same as the above.
The present application will be further described in detail with reference to fig. 6 and 7, so that those skilled in the art can better understand the technical solutions of the present application. Fig. 6 is a schematic diagram of an online upgrade process of a distributed system according to an embodiment of the present application. As shown in fig. 6, the upgrade process includes three steps of uploading an upgrade file, checking before upgrade, and upgrading. Fig. 7 is a schematic state diagram corresponding to an upgrade process of a distributed system according to an embodiment of the present application. As shown in fig. 7, the status corresponding to uploading the upgrade file includes success and failure; after the upgrade file is successfully uploaded, starting to perform pre-upgrade inspection, wherein the pre-upgrade inspection comprises cluster inspection and node inspection, and the state of the cluster inspection and the state of the node inspection can be success or failure; under the condition that the cluster and the node are checked to be successful, the distributed system is started to be upgraded, and the upgrading state comprises upgrading, waiting for suspension, upgrading failure and upgrading success.
Therefore, the division of the upgrading process in the embodiment makes the operation of the online upgrading process clearer; the pre-upgrading checking module is added before the formal upgrading, so that the process can identify the items which do not meet the upgrading conditions in advance, the problem is solved, and the success rate of subsequent upgrading is improved; the pause function and the continuous upgrading function provided in the upgrading process can solve the problem that the cluster cannot complete the full-node upgrading in one upgrading window period in a scene of large scale on site, and improve the upgrading efficiency of the distributed system.
The method, the device, the server and the medium for upgrading the distributed system provided by the application are described in detail. In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the application can be made without departing from the principles of the application and these modifications and adaptations are intended to be within the scope of the application as defined in the following claims.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Claims (11)
1. A method of distributed system upgrades, comprising:
Acquiring an upgrade file and uploading the upgrade file to the distributed system;
upgrading the clusters in the distributed system and the nodes corresponding to the clusters according to the upgrading file;
Under the condition that the upgrading state of the cluster is a pause state, pausing the current upgrading process of the distributed system and counting the nodes to be upgraded in the current upgrading process to an upgrading pause information table;
Under the condition of continuing the current upgrading process, upgrading the node to be upgraded in the upgrading pause information table;
after the upgrade file is obtained and uploaded to the distributed system, before the cluster in the distributed system and the node corresponding to the cluster are upgraded according to the upgrade file, the method further comprises:
Checking the clusters and the nodes respectively and obtaining corresponding checking results;
If the inspection results are all passed, entering a step of upgrading the cluster in the distributed system and the node corresponding to the cluster according to the upgrading file;
The step of respectively checking the cluster and the node and obtaining the corresponding checking result includes:
Acquiring inspection items of the clusters;
Checking the checking items of the cluster in a serial mode and acquiring a first checking result;
and if the first checking result is passing, checking the nodes in a parallel mode and acquiring a second checking result.
2. The method of claim 1, wherein after the obtaining an upgrade file and uploading the upgrade file to the distributed system, before the inspecting the cluster and the node, respectively, and obtaining corresponding inspection results, the method further comprises:
acquiring a version of the upgrade file and a current version of the distributed system;
under the condition that the version of the upgrade file is higher than the current version, carrying out encryption verification on the upgrade file;
And under the condition that the encryption verification passes, entering the step of respectively checking the cluster and the nodes and obtaining corresponding checking results.
3. The method of distributed system upgrades of claim 1, wherein inspecting the inspection items of the cluster and obtaining the first inspection result comprises:
judging whether the checking item to be checked is a blocking item or not;
If yes, checking each blocking item of the checking item, and if the blocking item does not pass the checking, determining that the first checking result is not passed; otherwise, determining that the first checking result is passing;
If not, after the inspection of each inspection item is completed, if the inspection item which is failed in inspection exists, determining that the first inspection result is failed; and otherwise, determining that the first checking result is passing.
4. The method of distributed system upgrades of claim 1, wherein inspecting the node and obtaining the second inspection result comprises:
Under the condition that an instruction for checking the nodes is received, checking the nodes in turn;
Polling the inspection result of each node according to the fixed frequency;
if the inspection results of all the nodes are passing, determining that the second inspection result is passing; and otherwise, determining that the second checking result is failed.
5. The method of claim 1, wherein suspending a current upgrade procedure to the distributed system comprises:
judging whether the current node is the node which is being upgraded or not;
If not, suspending the current upgrading process of the distributed system;
if yes, after the current node finishes upgrading, suspending the current upgrading process of the distributed system.
6. The method of any one of claims 1 to 4, wherein after the upgrading of the node to be upgraded in the upgrade suspension information table while continuing the current upgrade process, the method further comprises:
Acquiring related data in the current upgrading process; wherein, the related data at least comprises a status icon, a summary element, detailed information and a progress bar element;
The relevant data is exposed through the modular UI component design.
7. The method of distributed system upgrades of claim 6, wherein the exposing the relevant data through a modular UI component design comprises:
Determining the minimum unit element displayed;
performing modular combination of a preset scale based on each minimum unit element;
And splicing and combining the modularized combination as a new element to display the related data.
8. The method of distributed system upgrades of claim 6, wherein exposing data in the cluster inspection process and data in the inspection process of the node through the modular UI component design comprises at least one of:
Combining the status icon and the summary element into a first module unit so as to display data in the cluster inspection process and data in the inspection process of the node through the first module unit;
Combining the first module unit and the detailed information into a second module unit so as to display data in the cluster inspection process and data in the inspection process of the node through the second module unit;
Assembling a cluster inspection module unit or a node inspection module unit through the second module unit so as to display data in the cluster inspection process and data in the inspection process of the node through the cluster inspection module unit or the node inspection module unit;
and combining the cluster inspection module unit, the node inspection module unit, the progress bar element and multiplexing the first module unit into a third module unit, so that the data in the cluster inspection process and the data in the inspection process of the node are displayed through the third module unit.
9. An apparatus for distributed system upgrades, comprising:
The acquisition module is used for acquiring an upgrade file and uploading the upgrade file to the distributed system;
the first upgrading module is used for upgrading the cluster in the distributed system and the node corresponding to the cluster according to the upgrading file;
the pause and statistics module is used for pausing the current upgrading process of the distributed system and counting the nodes to be upgraded in the current upgrading process to an upgrading pause information table;
The second upgrading module is used for upgrading the node to be upgraded in the upgrading pause information table under the condition of continuing the current upgrading process;
After the upgrade file is obtained and uploaded to the distributed system, before the cluster in the distributed system and the node corresponding to the cluster are upgraded according to the upgrade file, the device further comprises:
Checking the clusters and the nodes respectively and obtaining corresponding checking results;
Triggering the first upgrading module under the condition that the inspection results are all passed;
The step of respectively checking the cluster and the node and obtaining the corresponding checking result includes:
Acquiring inspection items of the clusters;
Checking the checking items of the cluster in a serial mode and acquiring a first checking result;
and if the first checking result is passing, checking the nodes in a parallel mode and acquiring a second checking result.
10. A server, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method of distributed system upgrade according to any of claims 1 to 8 when executing said computer program.
11. A computer readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the steps of the method of distributed system upgrade according to any of the claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210912291.6A CN115080093B (en) | 2022-07-29 | 2022-07-29 | Distributed system upgrading method, device, server and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210912291.6A CN115080093B (en) | 2022-07-29 | 2022-07-29 | Distributed system upgrading method, device, server and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115080093A CN115080093A (en) | 2022-09-20 |
CN115080093B true CN115080093B (en) | 2024-07-30 |
Family
ID=83242987
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210912291.6A Active CN115080093B (en) | 2022-07-29 | 2022-07-29 | Distributed system upgrading method, device, server and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115080093B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117707587B (en) * | 2024-02-04 | 2024-06-07 | 济南浪潮数据技术有限公司 | Method, device, server and storage medium for concurrent upgrade of distributed storage clusters |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108768758A (en) * | 2018-08-31 | 2018-11-06 | 郑州云海信息技术有限公司 | Distributed memory system online upgrading method, apparatus, equipment and storage medium |
CN108923985A (en) * | 2018-07-16 | 2018-11-30 | 四川长虹网络科技有限责任公司 | The method of the batch upgrade network equipment in distributed network management system |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9032053B2 (en) * | 2010-10-29 | 2015-05-12 | Nokia Corporation | Method and apparatus for upgrading components of a cluster |
US20170115978A1 (en) * | 2015-10-26 | 2017-04-27 | Microsoft Technology Licensing, Llc | Monitored upgrades using health information |
CN112463195B (en) * | 2020-12-07 | 2022-07-08 | 苏州浪潮智能科技有限公司 | Method, system, terminal and storage medium for cluster grouping online upgrade |
CN112994952B (en) * | 2021-04-13 | 2021-07-27 | 艾伯资讯(深圳)有限公司 | Distributed base station upgrading processing method and system |
-
2022
- 2022-07-29 CN CN202210912291.6A patent/CN115080093B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108923985A (en) * | 2018-07-16 | 2018-11-30 | 四川长虹网络科技有限责任公司 | The method of the batch upgrade network equipment in distributed network management system |
CN108768758A (en) * | 2018-08-31 | 2018-11-06 | 郑州云海信息技术有限公司 | Distributed memory system online upgrading method, apparatus, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN115080093A (en) | 2022-09-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3425535A1 (en) | Dynamically performing data processing in a data pipeline system | |
US10795793B1 (en) | Method and system for simulating system failures using domain-specific language constructs | |
US20150358392A1 (en) | Method and system of virtual desktop infrastructure deployment studio | |
CN107977308A (en) | interface test method and device | |
CN110825399B (en) | Deployment method and device of application program | |
CN109634989B (en) | HIVE task execution engine selection method and system | |
CN110727575B (en) | Information processing method, system, device and storage medium | |
CN108664291A (en) | The construction method and device of container group | |
CN117076096B (en) | Task flow execution method and device, computer readable medium and electronic equipment | |
CN112631919A (en) | Comparison test method and device, computer equipment and storage medium | |
CN110275768A (en) | Data processing method, device and electronic equipment | |
CN115080093B (en) | Distributed system upgrading method, device, server and medium | |
CN112632174B (en) | A method, device and system for data verification | |
CN112445860A (en) | Method and device for processing distributed transaction | |
CN112463574A (en) | Software testing method, device, system, equipment and storage medium | |
CN112328299A (en) | Server firmware information viewing method, device, equipment and storage medium | |
CN115599401A (en) | Publishing method, device, equipment and medium of user-defined model | |
CN119597424A (en) | Flow management method, system and equipment based on DevOps | |
CN111399871B (en) | System updating method, device, equipment and medium of HBA card | |
CN114995847A (en) | Hot update method, device, equipment and computer readable storage medium | |
US20230259347A1 (en) | Container based generation of inputs for generic functions | |
JP2010224812A (en) | Job management system and method | |
CN116627437A (en) | Deployment method and device of Airflow service, storage medium and computer equipment | |
CN117251250B (en) | Container management method based on cloud native platform and related equipment | |
CN116136813B (en) | Method, device and storage medium for simulating adaptive multi-model avionics signals |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |