CN108667641A - Distributed system upgrade method, distributed system and updating and management equipment - Google Patents

Distributed system upgrade method, distributed system and updating and management equipment Download PDF

Info

Publication number
CN108667641A
CN108667641A CN201710200566.2A CN201710200566A CN108667641A CN 108667641 A CN108667641 A CN 108667641A CN 201710200566 A CN201710200566 A CN 201710200566A CN 108667641 A CN108667641 A CN 108667641A
Authority
CN
China
Prior art keywords
node
upgraded
upgrading
standby
computing
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
CN201710200566.2A
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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201710200566.2A priority Critical patent/CN108667641A/en
Priority to PCT/CN2018/081357 priority patent/WO2018177417A1/en
Publication of CN108667641A publication Critical patent/CN108667641A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

An embodiment of the present invention provides a kind of distributed system upgrade method, distributed system and updating and management equipment, first aspect, in this programme, calculate node is upgraded in batches, namely part calculate node is upgraded every time, other calculate nodes can continue to offer service, in this way, system can continue to offer service while upgrading.Second aspect, calculate node to be upgraded is before upgrading, the service of self-operating or task can be switched to other promoted completions or this time without in the calculate node of upgrading, in this way, can distributed system not influenced by upgrading, external offer service is provided, the service quality that distributed system externally provides is improved.

Description

Distributed system upgrading method, distributed system and upgrading management equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a distributed system upgrade method, a distributed system, and an upgrade management device.
Background
A distributed system generally includes a plurality of node devices connected in communication, where the node devices may be divided into a master node, a standby node, and a computing node, and the master node and the standby node may perform scheduling management on the computing node, and the computing node may provide various services.
When upgrading a distributed system, it is usually necessary to sequentially upgrade each node device in the system. At present, node equipment in a distributed system is more and more, functions are more and more complex, and therefore time consumed by upgrading operation of the distributed system is longer and longer.
Generally, the distributed system cannot provide services during upgrading, that is, the upgrading operation of the distributed system is too long, which may affect the normal use of the system.
Disclosure of Invention
The embodiment of the invention aims to provide a distributed system upgrading method, a distributed system and upgrading management equipment, which can continuously provide services while upgrading.
In order to achieve the above object, an embodiment of the present invention discloses a distributed system upgrading method, where the distributed system includes: the system comprises a main node, a standby node and a computing node; the method comprises the following steps:
sending an upgrading instruction to the standby node so as to enable the standby node to carry out upgrading operation;
after the backup node is detected to be upgraded, determining a computing node to be upgraded; the number of the determined calculation nodes to be upgraded is less than the total number of the calculation nodes;
sending an upgrading instruction to the determined computing node to be upgraded so as to enable the computing node to be upgraded to carry out upgrading operation;
judging whether the number of the upgraded computing nodes reaches a preset threshold value, wherein the preset threshold value is not more than the total number of the computing nodes;
if not, returning to the step of determining the computing node to be upgraded;
if yes, switching the main node into a standby node; determining a new main node in the upgraded standby nodes; connecting the upgraded computing node to the new master node; and sending an upgrading instruction to the non-upgraded standby node and/or the non-upgraded computing node in the system so as to upgrade the non-upgraded computing node and/or the non-upgraded computing node.
Optionally, before sending the upgrade instruction to the standby node, the method may further include:
disconnecting the connection between the standby node and the main node and the connection between the standby node and the computing node through a switching scheduling strategy;
the method may further comprise:
and after the upgrade of all the nodes in the system is detected to be completed, establishing the connection between the standby node and the main node and the connection between the standby node and the computing node through a switching scheduling strategy.
Optionally, after disconnecting the standby node from the computing node, the method may further include:
connecting the disconnected computing node to the master node.
Optionally, the method may further include:
and after detecting that all the nodes in the system are upgraded, connecting the computing nodes to the corresponding main nodes or standby nodes according to a preset connection rule.
Optionally, the sending an upgrade instruction to the standby node to enable the standby node to perform an upgrade operation includes:
acquiring a first upgrading program, and sending the first upgrading program to a standby node so that the standby node can be upgraded by using the first upgrading program;
or sending an upgrading instruction to the standby node so that the standby node acquires a first upgrading program according to the upgrading instruction and upgrades the first upgrading program;
the sending an upgrade instruction to the determined to-be-upgraded computing node to enable the to-be-upgraded computing node to perform upgrade operation includes:
acquiring a second upgrading program, and sending the second upgrading program to the computing node to be upgraded so that the computing node to be upgraded is upgraded by using the second upgrading program;
or sending an upgrading instruction to the computing node to be upgraded so that the computing node to be upgraded acquires a second upgrading program according to the upgrading instruction and upgrades the computing node by using the second upgrading program;
the sending an upgrade instruction to the non-upgraded standby node and/or the non-upgraded computing node in the system to enable the non-upgraded computing node and/or the non-upgraded computing node to perform upgrade operation includes:
obtaining a third upgrading program, and sending the third upgrading program to a non-upgraded standby node and/or a non-upgraded computing node so that the non-upgraded computing node and/or the non-upgraded standby node are upgraded by using the third upgrading program;
or sending an upgrade instruction to a computing node to be upgraded so that the computing node and/or the standby node which are not upgraded acquire a third upgrade program according to the upgrade instruction and upgrade by using the third upgrade program.
Optionally, before sending the upgrade instruction to the determined computing node to be upgraded, the method may further include:
and sending a switching instruction to the determined computing node to be upgraded, and indicating the computing node to be upgraded to switch the self-running service or task to the upgraded computing node.
In order to achieve the above object, an embodiment of the present invention further discloses a distributed system, including: upgrading the management equipment, the main node, the standby node and the computing node; wherein,
the upgrade management device is used for sending an upgrade instruction to the standby node; after the backup node is detected to be upgraded, determining a computing node to be upgraded; the number of the determined calculation nodes to be upgraded is less than the total number of the calculation nodes; sending an upgrading instruction to the determined computing node to be upgraded; judging whether the number of the upgraded computing nodes reaches a preset threshold value, wherein the preset threshold value is not more than the total number of the computing nodes; if not, returning to the step of determining the computing node to be upgraded; if yes, switching the main node into a standby node; determining a new main node in the upgraded standby nodes; connecting the upgraded computing node to the new master node; sending an upgrading instruction to the non-upgraded standby node and/or the non-upgraded computing node in the system;
the standby node is used for carrying out upgrading operation after receiving an upgrading instruction sent by the upgrading management equipment;
the main node is used for carrying out upgrading operation after receiving an upgrading instruction sent by the upgrading management equipment;
and the computing node is used for carrying out upgrading operation after receiving the upgrading instruction sent by the upgrading management equipment.
Optionally, the upgrade management device is further configured to switch the scheduling policy before sending the upgrade instruction to the standby node and after detecting that all nodes in the system are upgraded;
the main node is also used for adjusting the connection state of the main node with the standby node and the computing node in the system according to the current scheduling strategy;
and the standby node is also used for adjusting the connection state of the standby node with the main node and the computing node in the system according to the current scheduling strategy.
Optionally, the upgrade management device is further configured to connect the disconnected computing node to the master node after the backup node is disconnected from the computing node.
Optionally, the upgrade management device is further configured to, after it is detected that all nodes in the system are upgraded, connect the computing node to the corresponding master node or the backup node according to a preset connection rule.
Optionally, the upgrade management device is further configured to obtain a first upgrade program, and send the first upgrade program to the standby node; acquiring a second upgrading program, and sending the second upgrading program to the computing node to be upgraded so that the computing node to be upgraded is upgraded by using the second upgrading program; obtaining a third upgrading program, and sending the third upgrading program to the non-upgraded standby node and/or the non-upgraded computing node;
the standby node is also used for receiving a first upgrading program sent by the upgrading management equipment and upgrading by utilizing the first upgrading program; or, obtaining a first upgrading program according to an upgrading instruction sent by the upgrading management equipment, and upgrading by using the first upgrading program;
the computing node is also used for receiving a second upgrading program sent by the upgrading management equipment and upgrading by utilizing the second upgrading program; or acquiring a second upgrading program according to an upgrading instruction sent by the upgrading management equipment, and upgrading by using the second upgrading program;
the master node is also used for receiving a third upgrading program sent by the upgrading management equipment and upgrading by utilizing the third upgrading program; or acquiring a third upgrading program according to the upgrading instruction sent by the upgrading management equipment, and upgrading by using the third upgrading program.
Optionally, the computing node is further configured to switch a service or task running by the computing node to the computing node after receiving the upgrade instruction sent by the upgrade management device;
or,
the upgrade management equipment is also used for sending a switching instruction to the determined computing node to be upgraded;
and the computing node is also used for switching the self-running service or task to the updated computing node after receiving the switching instruction.
Optionally, the computing node is further configured to connect to the master node after disconnecting from the standby node.
In order to achieve the above object, an embodiment of the present invention further discloses an upgrade management device, including:
the first sending module is used for sending an upgrading instruction to the standby node so as to enable the standby node to carry out upgrading operation;
the detection module is used for detecting whether the upgrade of the standby node is finished or not, and if so, triggering the first determination module;
the first determining module is used for determining the computing node to be upgraded; the number of the determined calculation nodes to be upgraded is less than the total number of the calculation nodes;
the second sending module is used for sending an upgrading instruction to the determined computing node to be upgraded so as to enable the computing node to be upgraded to carry out upgrading operation;
the judging module is used for judging whether the number of the updated computing nodes reaches a preset threshold value, wherein the preset threshold value is not greater than the total number of the computing nodes; if not, triggering the first determination module; if yes, triggering a switching module;
the switching module is used for switching the main node into a standby node;
the second determining module is used for determining a new main node in the upgraded standby nodes;
the first connecting module is used for connecting the upgraded computing node to the new main node;
and the third sending module is used for sending an upgrading instruction to the non-upgraded standby node and/or the non-upgraded computing node in the system so as to enable the non-upgraded computing node and/or the non-upgraded computing node to carry out upgrading operation.
Optionally, the apparatus may further include:
the disconnection module is used for disconnecting the connection between the standby node and the main node and the connection between the standby node and the computing node through a switching scheduling strategy before the upgrade instruction is sent to the standby node;
and the connection establishing module is used for establishing the connection between the standby node and the main node and the connection between the standby node and the computing node through a switching scheduling strategy after detecting that all the nodes in the system are upgraded.
Optionally, the apparatus may further include:
and the second connection module is used for connecting the disconnected computing node to the main node after the standby node and the computing node are disconnected.
Optionally, the apparatus may further include:
and the third connecting module is used for connecting the computing node to the corresponding main node or the standby node according to a preset connecting rule after the completion of the upgrade of all the nodes in the system is detected.
Optionally, the first sending module may be specifically configured to:
acquiring a first upgrading program, and sending the first upgrading program to a standby node so that the standby node can be upgraded by using the first upgrading program;
or sending an upgrading instruction to the standby node so that the standby node acquires a first upgrading program according to the upgrading instruction and upgrades the first upgrading program;
the second sending module may be specifically configured to:
acquiring a second upgrading program, and sending the second upgrading program to the computing node to be upgraded so that the computing node to be upgraded is upgraded by using the second upgrading program;
or sending an upgrading instruction to the computing node to be upgraded so that the computing node to be upgraded acquires a second upgrading program according to the upgrading instruction and upgrades the computing node by using the second upgrading program;
the third sending module may be specifically configured to:
obtaining a third upgrading program, and sending the third upgrading program to a non-upgraded standby node and/or a non-upgraded computing node so that the non-upgraded computing node and/or the non-upgraded standby node are upgraded by using the third upgrading program;
or sending an upgrade instruction to a computing node to be upgraded so that the computing node and/or the standby node which are not upgraded acquire a third upgrade program according to the upgrade instruction and upgrade by using the third upgrade program.
Optionally, the apparatus may further include:
and the fourth sending module is used for sending a switching instruction to the determined computing node to be upgraded and indicating the computing node to be upgraded to switch the service or task operated by the computing node to be upgraded to the computing node after the upgrade is completed.
Therefore, in the scheme, the computing nodes are upgraded in batches, namely, each time part of the computing nodes are upgraded, other computing nodes can continue to provide services, and therefore the system can continue to provide services while being upgraded.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a distributed system upgrade method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a distributed system according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an upgrade management device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the foregoing technical problem, embodiments of the present invention provide a distributed system upgrade method, a distributed system, and an upgrade management device, where the method may be applied to an upgrade management device, and the upgrade management device may be a device in the system or a device independent of the system, and is not limited specifically.
If the upgrade management device is a device in the system, the system includes: the system comprises a main node, a standby node, a computing node and an upgrade management device. If the upgrade management device is a device independent of the system, the system includes: the system comprises a main node, a standby node and a computing node. Alternatively, the method may be applied to other apparatuses, and is not particularly limited.
First, a distributed system upgrading method provided by the embodiment of the present invention is explained in detail below.
Fig. 1 is a schematic flowchart of a distributed system upgrading method provided in an embodiment of the present invention, including:
s101: and sending an upgrading instruction to the standby node so as to enable the standby node to carry out upgrading operation.
As an embodiment, the connection between the standby node and the master node and the connection between the standby node and the computing node may be disconnected by switching the scheduling policy, and then S101 is performed.
For example, the scheduling may be performed by a weight assignment manner, for example, the scheduling policy is "100 (primary): when 0 (standby), "indicates that only the master node is started and the standby node is not started; scheduling policy is "50 (primary): 50 (standby)', which means that both the master node and the standby node are started; scheduling policy is "0 (primary): 100 (standby) "indicates that only the standby node is activated, and the specific scheduling policy for not activating the master node … … may be other, and is not particularly limited.
In the above example, under normal operating conditions, the scheduling policy may be "50 (primary): 50 (standby) ", when the system needs to be upgraded, the scheduling policy can be switched to 100 (main): 0 (backup) ", which corresponds to stopping the operation of the service in the backup node, specifically, disconnecting the backup node from the master node and the backup node from the computing node.
In one embodiment, after the backup node is disconnected from the computing node, the disconnected computing node is connected to the master node. The master node may manage these compute nodes instead of the standby node so that the compute nodes may continue to provide service.
Alternatively, it is reasonable that these computing nodes disconnected from the standby node may also be automatically connected to the master node.
And after stopping the operation of the service in the standby node, sending an upgrading instruction to the standby node.
The upgrading process of the node can be a process of replacing an original program for a new program, or a process of replacing part of components for a new component. For convenience of description, the new program or the new component is collectively referred to as an upgrade program in the following.
In this embodiment, the device executing the present solution may obtain an upgrade program, send the upgrade program to the node, and after receiving the upgrade program, the node performs upgrade using the upgrade program;
or, the device executing the scheme only sends the upgrade instruction to the node without acquiring the upgrade program, and the node downloads the upgrade program to a preset address after receiving the upgrade instruction and uses the downloaded upgrade program for upgrading;
or, the upgrade instruction sent by the device executing the present scheme may carry a download address, and after receiving the upgrade instruction, the node downloads the upgrade program according to the download address carried in the upgrade instruction, and performs upgrade using the downloaded upgrade program. Alternatively, other schemes may be used, not listed here.
As an implementation manner, a device executing the present solution may obtain a first upgrade program, and send the first upgrade program to a standby node, so that the standby node performs upgrade by using the first upgrade program.
As another implementation, the device executing the present solution may send an upgrade instruction to the standby node, so that the standby node obtains a first upgrade program according to the upgrade instruction, and performs upgrade by using the first upgrade program.
S102: and detecting whether the upgrade of the standby node is completed, and if so, executing S103.
S103: determining a computing node to be upgraded; and the determined number of the computing nodes to be upgraded is less than the total number of the computing nodes.
In this embodiment, there are multiple compute nodes in the distributed system; there may be multiple standby nodes or only one standby node, or there may be multiple master nodes or only one master node, and the details are not limited.
The number of the computing nodes to be upgraded determined each time is smaller than the total number of the computing nodes, namely the computing nodes to be upgraded are determined in the computing nodes in batches. The number of the computing nodes to be upgraded determined each time can be fixed or not.
For example, there are 10 computing nodes in the distributed system, and 2 computing nodes to be upgraded may be determined each time, or 3, and 4 computing nodes to be upgraded may be determined in sequence; the rule for determining the computing node to be upgraded is not limited.
S104: and sending an upgrading instruction to the determined computing node to be upgraded so as to upgrade the computing node to be upgraded.
As an implementation manner, a device executing the present solution may obtain a second upgrade program, and send the second upgrade program to a computing node to be upgraded, so that the computing node to be upgraded is upgraded by using the second upgrade program.
As another implementation manner, the device executing the scheme may send an upgrade instruction to the to-be-upgraded computing node, so that the to-be-upgraded computing node obtains a second upgrade program according to the upgrade instruction, and performs upgrade by using the second upgrade program.
In this embodiment, the device executing the present solution may obtain an upgrade program, send the upgrade program to the node, and after receiving the upgrade program, the node performs upgrade using the upgrade program;
or, the device executing the scheme only sends the upgrade instruction to the node without acquiring the upgrade program, and the node downloads the upgrade program to a preset address after receiving the upgrade instruction and uses the downloaded upgrade program for upgrading;
or, the upgrade instruction sent by the device executing the present scheme may carry a download address, and after receiving the upgrade instruction, the node downloads the upgrade program according to the download address carried in the upgrade instruction, and performs upgrade using the downloaded upgrade program. Alternatively, other schemes may be used, not listed here.
As an embodiment, before sending the upgrade instruction to the determined computing node to be upgraded, a switching instruction may be sent to the determined computing node to be upgraded. After receiving the switching instruction, the computing node may switch the service or task executed by the computing node to another computing node that has been upgraded or is not upgraded this time.
It can be understood that before the upgrade, the computing node to be upgraded can switch the service or task running on the computing node to other computing nodes that have been upgraded or are not upgraded at this time, so that the switched service or task can still run on other computing nodes, and the quality of service externally provided by the distributed system is improved.
Or, as another embodiment, the device executing the present solution may also send only the upgrade instruction without sending the switch instruction, and in this embodiment, after receiving the upgrade instruction, the computing node first switches the service or task executed by the computing node to another computing node that has been upgraded or is not upgraded this time, and then performs the upgrade operation, which is also reasonable.
S105: and judging whether the number of the updated computing nodes reaches a preset threshold value, if not, returning to execute S103, and if so, executing S106.
The preset threshold in S105 is less than or equal to the total number of the computation nodes in the distributed system, for example, the preset threshold may be half of the total number, may also be two thirds of the total number, may also be one fourth of the total number, and the like, and is not limited herein.
S106: and switching the main node into a standby node.
In the distributed system, the master node and the standby node perform scheduling management on the computing nodes, and the master node and the standby node can be switched with each other.
S107: and determining a new main node in the upgraded standby nodes.
S108: and connecting the upgraded computing node to the new main node.
In an optional embodiment of the present invention, if the implementation of the "switching scheduling policy" is applied, here, after the original master node is switched to the standby node, the original master node is still applicable to the scheduling policy, that is, the original master node is disconnected from other nodes. The new master node is also adapted to the scheduling policy, i.e. a connection is established between the new master node and the compute node. In this way, the upgraded computing node may be connected to the new master node.
S109: and sending an upgrading instruction to the non-upgraded standby node and/or the non-upgraded computing node in the system so as to upgrade the non-upgraded computing node and/or the non-upgraded computing node.
As an implementation manner, a device executing the present solution may obtain a third upgrade program, and send the third upgrade program to an un-upgraded standby node and/or an un-upgraded computing node, so that the un-upgraded computing node and/or the standby node performs upgrade by using the third upgrade program.
As another implementation manner, the device executing the present solution may send an upgrade instruction to a computing node to be upgraded, so that the computing node and/or the standby node that is not upgraded obtains a third upgrade program according to the upgrade instruction, and performs upgrade by using the third upgrade program.
In this embodiment, the device executing the present solution may obtain an upgrade program, send the upgrade program to the node, and after receiving the upgrade program, the node performs upgrade using the upgrade program;
or, the device executing the scheme only sends the upgrade instruction to the node without acquiring the upgrade program, and the node downloads the upgrade program to a preset address after receiving the upgrade instruction and uses the downloaded upgrade program for upgrading;
or, the upgrade instruction sent by the device executing the present scheme may carry a download address, and after receiving the upgrade instruction, the node downloads the upgrade program according to the download address carried in the upgrade instruction, and performs upgrade using the downloaded upgrade program. Alternatively, other schemes may be used, not listed here.
As an implementation manner, after it is detected that all nodes in the system are upgraded, the connection between the standby node and the main node and the connection between the standby node and the computing node may be established by switching the scheduling policy.
It should be emphasized that "establishing a connection" herein refers to starting a standby node so that the standby node can be connected to other nodes, and does not refer to establishing a connection between the standby node and a certain node.
The above example of the handover strategy is continued, that is, the scheduling strategy is defined by "100 (primary): 0 (standby) "switch to" 50 (primary): 50 (standby)', so that both the master and the standby nodes are operational.
As an implementation manner, after it is detected that all nodes in the system are upgraded, the computing node may be connected to the corresponding master node or the standby node according to a preset connection rule.
The preset connection rule may be a pre-stored correspondence between the master node and the computing node and a correspondence between the backup node and the computing node, and the computing node is connected to the master node or the backup node corresponding thereto, and the master node and the backup node manage the computing nodes connected thereto. Or, the connection rule may be preset to "10 computing nodes corresponding to the master node and 5 computing nodes corresponding to the standby node", for example, so that the specific correspondence may be randomly allocated. In this embodiment, the specific preset connection rule is not limited.
Alternatively, it is also reasonable that the computing node may automatically connect to the master node or the standby node.
According to the foregoing description, the above-mentioned preset threshold is not greater than the total number of the computing nodes.
As an embodiment, the preset threshold may be equal to the total number of the computing nodes, that is, in this embodiment, after all the computing nodes are upgraded, S106-S109 are executed.
In this embodiment, after all the computing nodes are upgraded, the master node is switched to the standby node, a new master node is determined in the upgraded standby node, all the computing nodes are connected to the new master node, an upgrade instruction is sent to the standby node (i.e., the original master node) that is not upgraded in the system, and after the original master node is upgraded, all the nodes in the system are upgraded.
For example, suppose there is a master node a, a standby node B, 6 computing nodes in the system: the system comprises a computing node C, a computing node D, a computing node E, a computing node F, a computing node G and a computing node H. Assume that primary node a is connected to and manages compute node C, D, E and backup node B is connected to and manages compute node F, G, H.
1. And the connection between the standby node B and the main node A and the connection between the standby node B and the computing node F, G, H are disconnected through the switching scheduling strategy.
2. Computing node F, G, H is connected to master node A, which manages computing node F, G, H.
3. And sending an upgrading instruction to the standby node B, and carrying out upgrading operation by the standby node B. The foregoing description of the specific upgrade process has been described, and is not repeated here.
4. And after the standby node B finishes upgrading, determining the computing node to be upgraded in the 6 computing nodes. For simplicity of description, this example only includes one standby node, and if the system includes multiple standby nodes, the computing node to be upgraded may be determined after it is detected that all the standby nodes are upgraded.
5. Assume that the rule for determining the compute node to be upgraded is "determine 3 at a time", this time determining the compute node D, E, F as the compute node to be upgraded.
6. And sending an upgrade instruction to the computing node D, E, F to be upgraded, and carrying out upgrade operation on the computing node D, E, F.
7. And judging whether the number of the updated computing nodes reaches a preset threshold value. Here, it is assumed that the preset threshold is equal to the total number of the computing nodes of 6, at this time, the number of the computing nodes after the upgrade is completed is 3, and does not reach 6, and the judgment result is no.
8. And continuously determining the computing nodes to be upgraded. At this time, the updated computing node already exists; and determining the computing nodes to be upgraded in the computing nodes which are not upgraded. This time computing node C, G, H is determined to be the computing node to be upgraded.
9. And sending an upgrade instruction to the computing node C, G, H to be upgraded, and carrying out upgrade operation on the computing node C, G, H.
10. And judging whether the number of the updated computing nodes reaches a preset threshold value. At this time, the number of the updated computing nodes is 6, and the judgment result is yes when the preset threshold value is reached.
11. And switching the main node A into a standby node.
12. And determining the upgraded standby node B as a new main node. For simplicity of description, this example only includes one standby node, and if the system includes multiple standby nodes, a new master node may be determined among the multiple upgraded standby nodes.
13. And connecting the 6 upgraded computing nodes to a new main node, namely the original node B.
In an optional embodiment of the present invention, after the original primary node a is switched to the standby node, the original primary node a is still suitable for the scheduling policy, that is, the connection between the original primary node a and the standby node and the connection between the original primary node a and the computing node are both disconnected. The new master node B is also adapted to the scheduling policy, i.e. the new master node B is set up to connect to the computing node. In this way, the upgraded computing node may be connected to the new master node B.
14. And sending an upgrading instruction to a standby node which is not upgraded in the system, namely the original main node A, and carrying out upgrading operation on the original main node A. Thus, all the nodes in the system are upgraded.
15. And establishing the connection between the main node and the standby node and the connection between the standby node and the computing node through the switching scheduling strategy.
16. And connecting the computing node to the corresponding main node or the standby node according to a preset connection rule.
Assume that the preset connection rule is "node a corresponds to compute node C, D, E; node B corresponds to computing node E, F, G', reconnecting computing node C, D, E to node A.
Optionally, the node a may be switched to the master node again, or may not be switched, which is not particularly limited.
By applying the embodiment, the computing nodes are upgraded in batches, namely, each time part of the computing nodes are upgraded, other computing nodes can continue to provide services, so that the system can continue to provide services while being upgraded. Furthermore, before the upgrade, the computing node to be upgraded can switch the service or task running by itself to other computing nodes which have been upgraded or are not upgraded at this time, so that the distributed system is not affected by the upgrade, the service is continuously provided to the outside, and the quality of the service provided by the distributed system to the outside is improved.
As another embodiment, the preset threshold may be smaller than the total number of the computing nodes, that is, in this embodiment, after the upgrade of some computing nodes is completed, S106-S109 are executed. For example, the preset threshold may be half of the total number of the computing nodes, in which case, after half of the computing nodes are upgraded, S106-S109 are executed.
Specifically, after half of the computing nodes are upgraded, the main nodes are switched to standby nodes, a new main node is determined in the standby nodes after the upgrade is completed, half of the computing nodes after the upgrade is completed are connected to the new main node, an upgrade instruction is sent to the standby nodes (namely the original main node) which are not upgraded in the system and the other half of the computing nodes which are not upgraded, and after the upgrade of the original main node and the other half of the computing nodes is completed, all the nodes in the system are upgraded.
For example, suppose there is a master node a, a standby node B, 6 computing nodes in the system: the system comprises a computing node C, a computing node D, a computing node E, a computing node F, a computing node G and a computing node H. Assume that primary node a is connected to and manages compute node C, D, E and backup node B is connected to and manages compute node F, G, H.
1. And the connection between the standby node B and the main node A and the connection between the standby node B and the computing node F, G, H are disconnected through the switching scheduling strategy.
2. Computing node F, G, H is connected to master node A, which manages computing node F, G, H.
3. And sending an upgrading instruction to the standby node B, and carrying out upgrading operation by the standby node B. The foregoing description of the specific upgrade process has been described, and is not repeated here.
4. And after the standby node B finishes upgrading, determining the computing node to be upgraded in the 6 computing nodes. For simplicity of description, this example only includes one standby node, and if the system includes multiple standby nodes, the computing node to be upgraded may be determined after it is detected that all the standby nodes are upgraded.
5. Assume that the rule for determining the compute node to be upgraded is "determine 3 at a time", this time determining the compute node D, E, F as the compute node to be upgraded.
6. And sending an upgrade instruction to the computing node D, E, F to be upgraded, and carrying out upgrade operation on the computing node D, E, F.
7. And judging whether the number of the updated computing nodes reaches a preset threshold value. Here, the preset threshold is half of the total number of the computing nodes, that is, 3, at this time, the number of the computing nodes whose upgrade is completed is 3, and the determination result is yes.
8. And switching the main node A into a standby node.
9. And determining the upgraded standby node B as a new main node. For simplicity of description, this example only includes one standby node, and if the system includes multiple standby nodes, a new master node may be determined among the multiple upgraded standby nodes.
10. The upgraded 3 computing nodes D, E, F are connected to the new master node, namely the original node B.
In an optional embodiment of the present invention, after the original primary node a is switched to the standby node, the original primary node a is still suitable for the scheduling policy, that is, the connection between the original primary node a and the standby node and the connection between the original primary node a and the computing node are both disconnected. The new master node B is also adapted to the scheduling policy, i.e. the new master node B is set up to connect to the computing node. In this way, the upgraded computing node D, E, F may be connected to the new primary node B.
11. And sending an upgrade instruction to the non-upgraded standby node (namely, the original main node a) and the 3 un-upgraded computing nodes C, G, H, wherein the original main node a and the computing node C, G, H perform upgrade operation. Thus, all the nodes in the system are upgraded.
12. And establishing the connection between the main node and the standby node and the connection between the standby node and the computing node through the switching scheduling strategy.
13. And connecting the computing node to the corresponding main node or the standby node according to a preset connection rule.
Assume that the preset connection rule is "node a corresponds to compute node C, D, E; node B corresponds to compute node E, F, G', connecting compute node C, D, E to node A and compute node E, F, G to node B.
Optionally, the node a may be switched to the master node again, or may not be switched, which is not particularly limited.
In an optional embodiment of the present invention, the "preset threshold is half of the total number of the calculation nodes" is only a specific case provided in the present embodiment, and the "preset threshold" is not limited.
In the upgrading process, the upgraded computing node D, E, F is connected with the upgraded node B, and the non-upgraded computing node C, G, H is connected with the non-upgraded node a; that is, there is no connection of the upgraded node with the unequipped node; therefore, the scheme can also solve the problem that the new version and the old version of the system are incompatible.
It can be understood that the upgraded computing node is compatible with the upgraded master/slave node, and the unequipped computing node is compatible with the unequipped master/slave node; in the upgrading process, the upgraded computing node D, E, F is connected with the upgraded node B, and the non-upgraded computing node C, G, H is connected with the non-upgraded node a, so that the problem of incompatibility of new and old versions does not exist.
By applying the above embodiment, in the first aspect, the computing nodes are upgraded in batches, that is, each time a part of the computing nodes are upgraded, other computing nodes can continue to provide services, so that the system can continue to provide services while being upgraded. In a second aspect, before the upgrade, the computing node to be upgraded may switch the service or task running on the computing node to another computing node that has already been upgraded or is not upgraded this time, so that the distributed system is not affected by the upgrade, the service is continuously provided to the outside, and the quality of service provided to the outside by the distributed system is improved. And in the third aspect, the problem that the system before upgrading is incompatible with the system after upgrading is solved.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a distributed system.
Fig. 2 is a schematic structural diagram of a distributed system according to an embodiment of the present invention, including: the system comprises an upgrade management device, a main node, a standby node and a computing node. In this embodiment, there are multiple compute nodes in the distributed system (compute node 1, compute node 2 … … compute node N); there may be multiple standby nodes or only one standby node, or there may be multiple master nodes or only one master node, and the details are not limited.
In the embodiment shown in fig. 2, the upgrade management device is configured to send an upgrade instruction to the standby node; after the backup node is detected to be upgraded, determining a computing node to be upgraded; the number of the determined calculation nodes to be upgraded is less than the total number of the calculation nodes; sending an upgrading instruction to the determined computing node to be upgraded; judging whether the number of the upgraded computing nodes reaches a preset threshold value, wherein the preset threshold value is not more than the total number of the computing nodes; if not, returning to the step of determining the computing node to be upgraded; if yes, switching the main node into a standby node; determining a new main node in the upgraded standby nodes; connecting the upgraded computing node to the new master node; sending an upgrading instruction to the non-upgraded standby node and/or the non-upgraded computing node in the system;
the standby node is used for carrying out upgrading operation after receiving the upgrading instruction sent by the upgrading management equipment;
the main node is used for carrying out upgrading operation after receiving an upgrading instruction sent by the upgrading management equipment;
and the computing node is used for carrying out upgrading operation after receiving the upgrading instruction sent by the upgrading management equipment.
As an implementation manner, the upgrade management device may be further configured to switch the scheduling policy before sending the upgrade instruction to the standby node and after detecting that all nodes in the system are upgraded;
the main node can be used for adjusting the connection state of the main node with the standby node and the computing node in the system according to the current scheduling strategy;
and the standby node is also used for adjusting the connection state of the standby node with the main node and the computing node in the system according to the current scheduling strategy.
For example, the scheduling may be performed by a weight assignment manner, for example, the scheduling policy is "100 (primary): when 0 (standby), "indicates that only the master node is started and the standby node is not started; scheduling policy is "50 (primary): 50 (standby)', which means that both the master node and the standby node are started; scheduling policy is "0 (primary): 100 (standby) "indicates that only the standby node is activated, and the specific scheduling policy for not activating the master node … … may be other, and is not particularly limited.
Under normal operating conditions, the scheduling policy may be "50 (primary): 50 (standby) ", when the system needs to be upgraded, the upgrade management device can switch the scheduling policy to" 100 (primary): 0 (backup) ", which corresponds to stopping the operation of the service in the backup node, specifically, disconnecting the backup node from the master node and the backup node from the computing node.
After detecting that all the nodes in the system are upgraded, the scheduling policy can be changed from "100 (main): 0 (standby) "switch to" 50 (primary): 50 (standby)', so that both the master and the standby nodes are operational.
Alternatively, the upgrade management device may switch only the scheduling policy, and the disconnection/connection establishment operation is performed by the master/standby node. For example, the upgrade management device switches the scheduling policy to "100 (master): after 0 (standby), "the standby node automatically disconnects the connection with the main node and the computing node; the upgrade management device switches the scheduling policy to "50 (master): and 50 (standby), "the standby node automatically establishes connection with the main node and the computing node.
As an embodiment, the upgrade management device may be further configured to connect the disconnected computing node to the master node after the backup node is disconnected from the computing node.
As an implementation manner, the upgrade management device may be further configured to connect the computing node to the corresponding master node or the standby node according to a preset connection rule after it is detected that all nodes in the system are upgraded.
As an implementation manner, the upgrade management device may be further configured to obtain a first upgrade program, and send the first upgrade program to the standby node; acquiring a second upgrading program, and sending the second upgrading program to the computing node to be upgraded so that the computing node to be upgraded is upgraded by using the second upgrading program; obtaining a third upgrading program, and sending the third upgrading program to the non-upgraded standby node and/or the non-upgraded computing node;
the standby node is also used for receiving a first upgrading program sent by the upgrading management equipment and upgrading by utilizing the first upgrading program; or, obtaining a first upgrading program according to an upgrading instruction sent by the upgrading management equipment, and upgrading by using the first upgrading program;
the computing node is also used for receiving a second upgrading program sent by the upgrading management equipment and upgrading by utilizing the second upgrading program; or acquiring a second upgrading program according to an upgrading instruction sent by the upgrading management equipment, and upgrading by using the second upgrading program;
the master node is also used for receiving a third upgrading program sent by the upgrading management equipment and upgrading by utilizing the third upgrading program; or acquiring a third upgrading program according to the upgrading instruction sent by the upgrading management equipment, and upgrading by using the third upgrading program.
As an implementation manner, the upgrade management device is further configured to send a switching instruction to the determined computing node to be upgraded;
and the computing node is also used for switching the self-running service or task to other computing nodes which are upgraded or not upgraded at this time after receiving the switching instruction.
Or, as another embodiment, the computing node may be further configured to switch a service or task executed by the computing node to another computing node that has been upgraded or is not upgraded this time after receiving the upgrade instruction sent by the upgrade management device.
The computing node can also be used for connecting to the main node after disconnecting from the standby node;
that is, the operations of disconnecting and establishing connections between nodes may be performed by the upgrade management apparatus, or may be automatically performed by the nodes. Similarly, the operation of switching the service/task executed by the computing node itself to another computing node may be performed by the upgrade management device or may be automatically performed by the computing node.
By applying the embodiment shown in fig. 2 of the present invention, the computing nodes are upgraded in batches, that is, each time a part of the computing nodes are upgraded, other computing nodes can continue to provide services, so that the system can continue to provide services while being upgraded. Furthermore, before the upgrade, the computing node to be upgraded can switch the service or task running by itself to other computing nodes which have been upgraded or are not upgraded at this time, so that the distributed system is not affected by the upgrade, the service is continuously provided to the outside, and the quality of the service provided by the distributed system to the outside is improved.
Corresponding to the method embodiment, the embodiment of the invention also provides an upgrade management device.
Fig. 3 is a schematic structural diagram of an upgrade management device according to an embodiment of the present invention, where the upgrade management device includes:
a first sending module 301, configured to send an upgrade instruction to a standby node, so that the standby node performs an upgrade operation;
a detection module 302, configured to detect whether the upgrade of the standby node is completed, and if so, trigger a first determination module 303;
a first determining module 303, configured to determine a computing node to be upgraded; the number of the determined calculation nodes to be upgraded is less than the total number of the calculation nodes;
a second sending module 304, configured to send an upgrade instruction to the determined computing node to be upgraded, so that the computing node to be upgraded performs an upgrade operation;
a judging module 305, configured to judge whether the number of updated computing nodes reaches a preset threshold, where the preset threshold is not greater than the total number of computing nodes; if not, triggering the first determining module 303; if yes, the switching module 306 is triggered;
a switching module 306, configured to switch the master node to a standby node;
a second determining module 307, configured to determine a new master node in the upgraded standby nodes;
a first connection module 308, configured to connect the upgraded computing node to the new master node;
a third sending module 309, configured to send an upgrade instruction to an un-upgraded standby node and/or an un-upgraded computing node in the system, so that the un-upgraded computing node and/or the standby node performs an upgrade operation.
As an embodiment, the apparatus may further include: disconnecting and establishing a connection module (not shown), wherein,
the disconnection module is used for disconnecting the connection between the standby node and the main node and the connection between the standby node and the computing node through a switching scheduling strategy before the upgrade instruction is sent to the standby node;
and the connection establishing module is used for establishing the connection between the standby node and the main node and the connection between the standby node and the computing node through a switching scheduling strategy after detecting that all the nodes in the system are upgraded.
As an embodiment, the apparatus may further include:
and a second connection module (not shown in the figure) for connecting the disconnected computing node to the main node after disconnecting the standby node from the computing node.
As an embodiment, the apparatus may further include:
and a third connection module (not shown in the figure) configured to connect the computing node to the corresponding master node or the backup node according to a preset connection rule after it is detected that all nodes in the system are upgraded.
As an embodiment, the first sending module 301 may be specifically configured to:
acquiring a first upgrading program, and sending the first upgrading program to a standby node so that the standby node can be upgraded by using the first upgrading program;
or sending an upgrading instruction to the standby node so that the standby node acquires a first upgrading program according to the upgrading instruction and upgrades the first upgrading program;
the second sending module 304 may specifically be configured to:
acquiring a second upgrading program, and sending the second upgrading program to the computing node to be upgraded so that the computing node to be upgraded is upgraded by using the second upgrading program;
or sending an upgrading instruction to the computing node to be upgraded so that the computing node to be upgraded acquires a second upgrading program according to the upgrading instruction and upgrades the computing node by using the second upgrading program;
the third sending module 309 may specifically be configured to:
obtaining a third upgrading program, and sending the third upgrading program to a non-upgraded standby node and/or a non-upgraded computing node so that the non-upgraded computing node and/or the non-upgraded standby node are upgraded by using the third upgrading program;
or sending an upgrade instruction to a computing node to be upgraded so that the computing node and/or the standby node which are not upgraded acquire a third upgrade program according to the upgrade instruction and upgrade by using the third upgrade program.
As an embodiment, the apparatus may further include:
and a fourth sending module (not shown in the figure), configured to send a switching instruction to the determined to-be-upgraded computing node, and instruct the to-be-upgraded computing node to switch a service or task executed by the to-be-upgraded computing node to the upgraded computing node.
By applying the embodiment shown in fig. 3 of the present invention, the computing nodes are upgraded in batches, that is, each time a part of the computing nodes are upgraded, other computing nodes can continue to provide services, so that the system can continue to provide services while being upgraded. Furthermore, before the upgrade, the computing node to be upgraded can switch the service or task running by itself to other computing nodes which have been upgraded or are not upgraded at this time, so that the distributed system is not affected by the upgrade, the service is continuously provided to the outside, and the quality of the service provided by the distributed system to the outside is improved.
In an alternative embodiment of the invention, relational terms such as first and second, and the like may be used herein only 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (19)

1. A distributed system upgrade method, the distributed system comprising: the system comprises a main node, a standby node and a computing node; the method comprises the following steps:
sending an upgrading instruction to the standby node so as to enable the standby node to carry out upgrading operation;
after the backup node is detected to be upgraded, determining a computing node to be upgraded; the number of the determined calculation nodes to be upgraded is less than the total number of the calculation nodes;
sending an upgrading instruction to the determined computing node to be upgraded so as to enable the computing node to be upgraded to carry out upgrading operation;
judging whether the number of the upgraded computing nodes reaches a preset threshold value, wherein the preset threshold value is not more than the total number of the computing nodes;
if not, returning to the step of determining the computing node to be upgraded;
if yes, switching the main node into a standby node; determining a new main node in the upgraded standby nodes; connecting the upgraded computing node to the new master node; and sending an upgrading instruction to the non-upgraded standby node and/or the non-upgraded computing node in the system so as to upgrade the non-upgraded computing node and/or the non-upgraded computing node.
2. The method of claim 1, prior to sending an upgrade instruction to a standby node, further comprising:
disconnecting the connection between the standby node and the main node and the connection between the standby node and the computing node through a switching scheduling strategy;
the method further comprises the following steps:
and after the upgrade of all the nodes in the system is detected to be completed, establishing the connection between the standby node and the main node and the connection between the standby node and the computing node through a switching scheduling strategy.
3. The method of claim 2, further comprising, after disconnecting the backup node from the compute node:
connecting the disconnected computing node to the master node.
4. The method according to claim 1 or 3, characterized in that the method further comprises:
and after detecting that all the nodes in the system are upgraded, connecting the computing nodes to the corresponding main nodes or standby nodes according to a preset connection rule.
5. The method of claim 1, wherein sending an upgrade instruction to the standby node to cause the standby node to perform an upgrade operation comprises:
acquiring a first upgrading program, and sending the first upgrading program to a standby node so that the standby node can be upgraded by using the first upgrading program;
or sending an upgrading instruction to the standby node so that the standby node acquires a first upgrading program according to the upgrading instruction and upgrades the first upgrading program;
the sending an upgrade instruction to the determined to-be-upgraded computing node to enable the to-be-upgraded computing node to perform upgrade operation includes:
acquiring a second upgrading program, and sending the second upgrading program to the computing node to be upgraded so that the computing node to be upgraded is upgraded by using the second upgrading program;
or sending an upgrading instruction to the computing node to be upgraded so that the computing node to be upgraded acquires a second upgrading program according to the upgrading instruction and upgrades the computing node by using the second upgrading program;
the sending an upgrade instruction to the non-upgraded standby node and/or the non-upgraded computing node in the system to enable the non-upgraded computing node and/or the non-upgraded computing node to perform upgrade operation includes:
obtaining a third upgrading program, and sending the third upgrading program to a non-upgraded standby node and/or a non-upgraded computing node so that the non-upgraded computing node and/or the non-upgraded standby node are upgraded by using the third upgrading program;
or sending an upgrade instruction to a computing node to be upgraded so that the computing node and/or the standby node which are not upgraded acquire a third upgrade program according to the upgrade instruction and upgrade by using the third upgrade program.
6. The method of claim 1, prior to sending upgrade instructions to the determined computing nodes to be upgraded, further comprising:
and sending a switching instruction to the determined computing node to be upgraded, and indicating the computing node to be upgraded to switch the self-running service or task to the upgraded computing node.
7. A distributed system, comprising: upgrading the management equipment, the main node, the standby node and the computing node; wherein,
the upgrade management device is used for sending an upgrade instruction to the standby node; after the backup node is detected to be upgraded, determining a computing node to be upgraded; the number of the determined calculation nodes to be upgraded is less than the total number of the calculation nodes; sending an upgrading instruction to the determined computing node to be upgraded; judging whether the number of the upgraded computing nodes reaches a preset threshold value, wherein the preset threshold value is not more than the total number of the computing nodes; if not, returning to the step of determining the computing node to be upgraded; if yes, switching the main node into a standby node; determining a new main node in the upgraded standby nodes; connecting the upgraded computing node to the new master node; sending an upgrading instruction to the non-upgraded standby node and/or the non-upgraded computing node in the system;
the standby node is used for carrying out upgrading operation after receiving an upgrading instruction sent by the upgrading management equipment;
the main node is used for carrying out upgrading operation after receiving an upgrading instruction sent by the upgrading management equipment;
and the computing node is used for carrying out upgrading operation after receiving the upgrading instruction sent by the upgrading management equipment.
8. The system of claim 7,
the upgrade management device is also used for switching scheduling strategies before sending an upgrade instruction to the standby node and after detecting that all nodes in the system are upgraded;
the main node is also used for adjusting the connection state of the main node with the standby node and the computing node in the system according to the current scheduling strategy;
and the standby node is also used for adjusting the connection state of the standby node with the main node and the computing node in the system according to the current scheduling strategy.
9. The system of claim 8,
the upgrade management device is further configured to connect the disconnected computing node to the master node after the backup node is disconnected from the computing node.
10. The system of claim 7 or 9,
and the upgrade management equipment is also used for connecting the computing node to the corresponding main node or the standby node according to a preset connection rule after detecting that all the nodes in the system are upgraded.
11. The system of claim 7,
the upgrade management device is further configured to obtain a first upgrade program, and send the first upgrade program to a standby node; acquiring a second upgrading program, and sending the second upgrading program to the computing node to be upgraded so that the computing node to be upgraded is upgraded by using the second upgrading program; obtaining a third upgrading program, and sending the third upgrading program to the non-upgraded standby node and/or the non-upgraded computing node;
the standby node is also used for receiving a first upgrading program sent by the upgrading management equipment and upgrading by utilizing the first upgrading program; or, obtaining a first upgrading program according to an upgrading instruction sent by the upgrading management equipment, and upgrading by using the first upgrading program;
the computing node is also used for receiving a second upgrading program sent by the upgrading management equipment and upgrading by utilizing the second upgrading program; or acquiring a second upgrading program according to an upgrading instruction sent by the upgrading management equipment, and upgrading by using the second upgrading program;
the master node is also used for receiving a third upgrading program sent by the upgrading management equipment and upgrading by utilizing the third upgrading program; or acquiring a third upgrading program according to the upgrading instruction sent by the upgrading management equipment, and upgrading by using the third upgrading program.
12. The system of claim 7,
the computing node is also used for switching the self-running service or task to the computing node after receiving the upgrading instruction sent by the upgrading management equipment;
or,
the upgrade management equipment is also used for sending a switching instruction to the determined computing node to be upgraded; and the computing node is also used for switching the self-running service or task to the updated computing node after receiving the switching instruction.
13. The system of claim 7, wherein the computing node is further configured to connect to the master node after disconnecting from the standby node.
14. An upgrade management apparatus, comprising:
the first sending module is used for sending an upgrading instruction to the standby node so as to enable the standby node to carry out upgrading operation;
the detection module is used for detecting whether the upgrade of the standby node is finished or not, and if so, triggering the first determination module;
the first determining module is used for determining the computing node to be upgraded; the number of the determined calculation nodes to be upgraded is less than the total number of the calculation nodes;
the second sending module is used for sending an upgrading instruction to the determined computing node to be upgraded so as to enable the computing node to be upgraded to carry out upgrading operation;
the judging module is used for judging whether the number of the updated computing nodes reaches a preset threshold value, wherein the preset threshold value is not greater than the total number of the computing nodes; if not, triggering the first determination module; if yes, triggering a switching module;
the switching module is used for switching the main node into a standby node;
the second determining module is used for determining a new main node in the upgraded standby nodes;
the first connecting module is used for connecting the upgraded computing node to the new main node;
and the third sending module is used for sending an upgrading instruction to the non-upgraded standby node and/or the non-upgraded computing node in the system so as to enable the non-upgraded computing node and/or the non-upgraded computing node to carry out upgrading operation.
15. The apparatus of claim 14, further comprising:
the disconnection module is used for disconnecting the connection between the standby node and the main node and the connection between the standby node and the computing node through a switching scheduling strategy before the upgrade instruction is sent to the standby node;
and the connection establishing module is used for establishing the connection between the standby node and the main node and the connection between the standby node and the computing node through a switching scheduling strategy after detecting that all the nodes in the system are upgraded.
16. The apparatus of claim 15, further comprising:
and the second connection module is used for connecting the disconnected computing node to the main node after the standby node and the computing node are disconnected.
17. The apparatus according to claim 14 or 16, characterized in that it further comprises:
and the third connecting module is used for connecting the computing node to the corresponding main node or the standby node according to a preset connecting rule after the completion of the upgrade of all the nodes in the system is detected.
18. The device according to claim 14, wherein the first sending module is specifically configured to:
acquiring a first upgrading program, and sending the first upgrading program to a standby node so that the standby node can be upgraded by using the first upgrading program;
or sending an upgrading instruction to the standby node so that the standby node acquires a first upgrading program according to the upgrading instruction and upgrades the first upgrading program;
the second sending module is specifically configured to:
acquiring a second upgrading program, and sending the second upgrading program to the computing node to be upgraded so that the computing node to be upgraded is upgraded by using the second upgrading program;
or sending an upgrading instruction to the computing node to be upgraded so that the computing node to be upgraded acquires a second upgrading program according to the upgrading instruction and upgrades the computing node by using the second upgrading program;
the third sending module is specifically configured to:
obtaining a third upgrading program, and sending the third upgrading program to a non-upgraded standby node and/or a non-upgraded computing node so that the non-upgraded computing node and/or the non-upgraded standby node are upgraded by using the third upgrading program;
or sending an upgrade instruction to a computing node to be upgraded so that the computing node and/or the standby node which are not upgraded acquire a third upgrade program according to the upgrade instruction and upgrade by using the third upgrade program.
19. The apparatus of claim 14, further comprising:
and the fourth sending module is used for sending a switching instruction to the determined computing node to be upgraded and indicating the computing node to be upgraded to switch the service or task operated by the computing node to be upgraded to the computing node after the upgrade is completed.
CN201710200566.2A 2017-03-30 2017-03-30 Distributed system upgrade method, distributed system and updating and management equipment Pending CN108667641A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710200566.2A CN108667641A (en) 2017-03-30 2017-03-30 Distributed system upgrade method, distributed system and updating and management equipment
PCT/CN2018/081357 WO2018177417A1 (en) 2017-03-30 2018-03-30 Method of upgrading distributed system, distributed system, and upgrade management device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710200566.2A CN108667641A (en) 2017-03-30 2017-03-30 Distributed system upgrade method, distributed system and updating and management equipment

Publications (1)

Publication Number Publication Date
CN108667641A true CN108667641A (en) 2018-10-16

Family

ID=63675257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710200566.2A Pending CN108667641A (en) 2017-03-30 2017-03-30 Distributed system upgrade method, distributed system and updating and management equipment

Country Status (2)

Country Link
CN (1) CN108667641A (en)
WO (1) WO2018177417A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110247791A (en) * 2019-05-22 2019-09-17 北京英视睿达科技有限公司 The environmental monitoring system and update method of work online updating free of discontinuities
CN110597531A (en) * 2019-08-05 2019-12-20 平安科技(深圳)有限公司 Distributed module upgrading method and device and storage medium
CN111111161A (en) * 2019-12-19 2020-05-08 上海米哈游天命科技有限公司 Game server repairing method, device, server and medium
CN111930448A (en) * 2020-09-23 2020-11-13 南京梦饷网络科技有限公司 Method, electronic device, and storage medium for service distribution
CN113805925A (en) * 2021-09-27 2021-12-17 济南浪潮数据技术有限公司 Online upgrading method, device, equipment and medium for distributed cluster management software
CN114201549A (en) * 2020-09-17 2022-03-18 金篆信科有限责任公司 Switching method, system, server and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217678A (en) * 2007-12-28 2008-07-09 华为技术有限公司 System upgrade method, system and device
CN101741894A (en) * 2008-11-26 2010-06-16 中国移动通信集团公司 Upgrade method for distributed system and upgrade scheduling node and system
US20140188955A1 (en) * 2001-06-05 2014-07-03 Silicon Graphics International Corp. Clustered filesystem with membership version support

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7143406B2 (en) * 2001-01-23 2006-11-28 Wildtangent, Inc. Asynchronous software update
US9170852B2 (en) * 2012-02-02 2015-10-27 Microsoft Technology Licensing, Llc Self-updating functionality in a distributed system
US10042626B2 (en) * 2015-06-29 2018-08-07 Verizon Patent And Licensing Inc. Software updates using client self-reporting and a hierarchical data structure
CN106354531B (en) * 2016-08-25 2020-03-27 杭州华为数字技术有限公司 Physical node upgrading method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140188955A1 (en) * 2001-06-05 2014-07-03 Silicon Graphics International Corp. Clustered filesystem with membership version support
CN101217678A (en) * 2007-12-28 2008-07-09 华为技术有限公司 System upgrade method, system and device
CN101741894A (en) * 2008-11-26 2010-06-16 中国移动通信集团公司 Upgrade method for distributed system and upgrade scheduling node and system

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110247791A (en) * 2019-05-22 2019-09-17 北京英视睿达科技有限公司 The environmental monitoring system and update method of work online updating free of discontinuities
CN110247791B (en) * 2019-05-22 2022-04-01 北京英视睿达科技股份有限公司 Environment monitoring system and updating method for continuous work online updating
CN110597531A (en) * 2019-08-05 2019-12-20 平安科技(深圳)有限公司 Distributed module upgrading method and device and storage medium
CN110597531B (en) * 2019-08-05 2022-11-08 平安科技(深圳)有限公司 Distributed module upgrading method and device and storage medium
CN111111161A (en) * 2019-12-19 2020-05-08 上海米哈游天命科技有限公司 Game server repairing method, device, server and medium
CN111111161B (en) * 2019-12-19 2023-08-29 上海米哈游天命科技有限公司 Game server repairing method, device, server and medium
CN114201549A (en) * 2020-09-17 2022-03-18 金篆信科有限责任公司 Switching method, system, server and storage medium
CN114201549B (en) * 2020-09-17 2022-11-25 金篆信科有限责任公司 Switching method, system, server and storage medium
CN111930448A (en) * 2020-09-23 2020-11-13 南京梦饷网络科技有限公司 Method, electronic device, and storage medium for service distribution
CN113805925A (en) * 2021-09-27 2021-12-17 济南浪潮数据技术有限公司 Online upgrading method, device, equipment and medium for distributed cluster management software

Also Published As

Publication number Publication date
WO2018177417A1 (en) 2018-10-04

Similar Documents

Publication Publication Date Title
CN108667641A (en) Distributed system upgrade method, distributed system and updating and management equipment
CN100518082C (en) Long-distance on-line updating method with self-recovery function
US8111674B2 (en) Maintaining network availability for wireless clients in a wireless local area network
CN102681874B (en) A kind ofly guarantee the method that software normally runs and device
CN102244669B (en) Software upgrading method in stacking equipment and stacking equipment
CN107589955B (en) Method and system for upgrading double-CMC (carboxy methyl cellulose) firmware version
CN108934033B (en) Base station upgrading and returning method and device
CN106648781B (en) Method and system for upgrading remote firmware of communication equipment
CN105517015A (en) Upgrading method, device of wifi product by over the air OTA and terminal
CN105260209A (en) Hot-update solution of program
JP2005242691A (en) Program downloading/switching method and device for it
CN107395385A (en) Method for upgrading software and device
CN104503861A (en) Abnormality handling method and system, agency device and control device
CN104516704A (en) Application activated control method and device in multi-screen system and mobile terminal
CN108874410B (en) Patch management method and device
CN106161532A (en) A kind of orientation method for cleaning based on cloud service and system
CN103685405B (en) Network service system and the method updating firmware thereof
CN104580360A (en) System and method for updating firmware through heterogeneous network
CN104320279B (en) A kind of method and system of upgrading service
EP2398186A1 (en) Method, device and system for dynamic upgrade of a service
CN107438011B (en) Method and device for determining configuration information, network manager and system
CN110913416B (en) Terminal, networking method thereof and computer-readable storage medium
CN115622871A (en) Bus load determination method and device, household electrical appliance and storage medium
CN115225464A (en) Network switching method, device, equipment and storage medium
CN101826977A (en) Remote management method, processing device and network system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181016