CN111817894B - Cluster node configuration method and system and readable storage medium - Google Patents

Cluster node configuration method and system and readable storage medium Download PDF

Info

Publication number
CN111817894B
CN111817894B CN202010669474.0A CN202010669474A CN111817894B CN 111817894 B CN111817894 B CN 111817894B CN 202010669474 A CN202010669474 A CN 202010669474A CN 111817894 B CN111817894 B CN 111817894B
Authority
CN
China
Prior art keywords
node
cluster
target
nodes
configuration
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
Application number
CN202010669474.0A
Other languages
Chinese (zh)
Other versions
CN111817894A (en
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.)
Inspur Jinan data Technology Co ltd
Original Assignee
Inspur Jinan data 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 Inspur Jinan data Technology Co ltd filed Critical Inspur Jinan data Technology Co ltd
Priority to CN202010669474.0A priority Critical patent/CN111817894B/en
Publication of CN111817894A publication Critical patent/CN111817894A/en
Application granted granted Critical
Publication of CN111817894B publication Critical patent/CN111817894B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • 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/12Discovery or management of network topologies

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses two cluster node configuration methods which can be respectively applied to a target node and a configuration node, a cluster node configuration system and a computer readable storage medium. Because the target nodes and the configuration nodes have the topological relations among the nodes, the configuration nodes can generate cluster configuration management command groups based on the topological relations among the nodes and send the cluster configuration management command groups to all the target nodes, and the target nodes can analyze the cluster configuration management command based on the topological relations among the nodes and determine whether the target nodes need to be added. Therefore, for the configuration node, the method provided by the invention can enable the constituent nodes of the target cluster to be added into the target cluster by sending the cluster configuration management command in a group mode, and for the target node, whether the constituent node belongs to the target node can be determined by analyzing the cluster configuration management command. In other words, from the perspective of both the configuration node and the target node, the manual execution command can be omitted, and the cluster node configuration management efficiency can be improved.

Description

Cluster node configuration method and system and readable storage medium
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a cluster node configuration method, a cluster node configuration system, and a readable storage medium.
Background
At present, a new cluster is established, and management (such as node addition and node deletion) on nodes of the established cluster is performed in a mode that an execution command is manually sent to each node.
For example, the following steps are carried out: the method for establishing the cluster by the multiple double-control devices is that the double-control cluster is established firstly, and then other double-control devices are added into the cluster in a mode of manually executing commands, so that the purpose of establishing the multi-control cluster is achieved. Obviously, the manual command executing method is only suitable for the situation that the number of devices is small, and when the number of devices is too large, the command for adding the node needs to be executed for many times, which is tedious and prone to error.
In summary, how to effectively improve the efficiency of cluster node configuration management and the like is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a cluster node configuration method, a cluster node configuration system and a readable storage medium, which realize efficient configuration management by group sending of cluster configuration management commands in the process of cluster node configuration management.
In order to solve the technical problems, the invention provides the following technical scheme:
a cluster node configuration method is applied to configuration nodes and comprises the following steps:
acquiring a cluster configuration management request, and determining a component node set of a target cluster corresponding to the cluster configuration management request;
determining a cluster topology sequence corresponding to the component node set by using the topological relation among the nodes;
generating a cluster configuration management command corresponding to the cluster topology sequence;
sending the cluster configuration management command to each target node cluster with communication connection so as to configure the constituent nodes of the target cluster; wherein each of the target nodes has the inter-node topological relationship.
Preferably, the determining, by using the topological relation among the nodes, the cluster topology sequence corresponding to the constituent node set includes:
searching the topological relation among the nodes to obtain a target link sequence corresponding to the unique identifier of the node;
and determining the cluster topology sequence by using the target link sequence.
Preferably, determining the set of constituent nodes of the target cluster corresponding to the cluster configuration management request includes:
if the cluster configuration management request is a cluster establishment request, directly taking a node set specified by the cluster configuration management request as the component node set;
if the cluster configuration management request is a cluster node batch adding request, supplementing the existing component node set by using the added nodes corresponding to the cluster node batch adding request;
and if the cluster configuration management request is a cluster node deletion request, deleting the existing component node set by using deletion nodes corresponding to the cluster node batch deletion request.
Preferably, the process of obtaining the topological relation between the nodes includes:
sending heartbeat detection data packets to each target node to obtain the target link sequence;
mutually synchronizing the link sequences obtained by the target nodes with each other;
and constructing the topological relation among the nodes by utilizing each link sequence.
A cluster node configuration method is applied to a target node and comprises the following steps:
receiving and analyzing a cluster configuration management command sent by a configuration node cluster to obtain a unique identifier of the configuration node and a cluster topology sequence;
searching the topological relation among the nodes to obtain a target link sequence corresponding to the unique identifier;
judging whether a target node is a constituent node of a target cluster or not by utilizing the cluster topology sequence and the target link sequence;
and if so, joining the target cluster.
Preferably, the searching for the topological relation between the nodes to obtain the target link sequence corresponding to the unique identifier includes:
searching a target row where the unique identifier is located in a table corresponding to the topological relation among the nodes;
and determining the target link sequence by using the data content recorded in the target row.
Preferably, the determining whether the target node is a constituent node of the target cluster by using the cluster topology sequence and the target link sequence includes:
comparing the cluster topology sequence with the target link sequence to determine a component node set of the target cluster;
if the target node is in the component node set, determining the target node as the component node;
if the target node is not in the set of component nodes, determining that the target node is not the component node.
Preferably, after determining that the target node is not the component node, the method further includes:
judging whether the target node is added into the target cluster;
if so, exiting the target cluster.
A cluster node configuration system comprising:
a configuration node, and a target node having a communication connection with the configuration node;
wherein the configuration node comprises:
a memory for storing a computer program;
a processor, configured to implement the steps of the above-mentioned cluster node configuration method when executing the computer program;
the target node includes:
a memory for storing a computer program;
and a processor, configured to implement the steps of the above cluster node configuration method when executing the computer program.
A cluster node configuration device comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the cluster node configuration method when executing the computer program.
A readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the above-mentioned cluster node configuration method.
On one hand, by applying the method provided by the embodiment of the invention, the configuration node acquires the cluster configuration management request and determines the component node set of the target cluster corresponding to the cluster configuration management request; determining a cluster topology sequence corresponding to the node set by using the topological relation among the nodes; generating a cluster configuration management command corresponding to the cluster topology sequence; and sending a cluster configuration management command to each target node cluster with communication connection so as to configure the constituent nodes of the target cluster.
In the method, a configuration node and a target node jointly maintain a topological relation between the nodes. After the configuration node acquires the cluster configuration management request, a component node set of a target cluster corresponding to the cluster configuration management request can be determined. Then, by utilizing the topological relation among the nodes, a cluster topological sequence corresponding to the component node set is determined, and a cluster configuration management command corresponding to the cluster topological sequence is generated. And finally, sending cluster configuration management commands to each target node group. Because the target node also has the topological relation among the nodes, the target node can carry out node processing on the cluster configuration management command based on the topological relation among the nodes to determine whether the target cluster needs to be added. Therefore, in the method, the configuration node can enable the constituent nodes of the target cluster to be added into the target cluster by sending the cluster configuration management command in a group manner, so that the manual execution command is omitted, and the cluster node configuration management efficiency can be improved.
On the other hand, by applying the method provided by the embodiment of the invention, the target node receives and analyzes the cluster configuration management command sent by the configuration node in a cluster manner to obtain the unique identifier of the configuration node and the cluster topology sequence; searching the topological relation among the nodes to obtain a target link sequence corresponding to the unique identifier; judging whether the target node is a constituent node of the target cluster or not by utilizing the cluster topology sequence and the target link sequence; if so, the target cluster is added.
For the target node, after receiving the cluster configuration management command sent by the configuration node in a cluster, the configuration node may analyze the cluster configuration management directory to determine the unique identifier of the configuration node and the cluster topology sequence. And searching the topological relation among the nodes to obtain a target link sequence corresponding to the unique identifier. And then, by comparing the cluster topology sequence with the target link sequence, whether the target node is a constituent node of the target cluster can be determined. When the node is determined to be the constituent node of the target cluster, the target cluster can be added. Therefore, in the method, the target node can automatically join the target cluster only by receiving one cluster configuration management command sent in a group, so that a manual execution command is omitted, and the cluster node configuration management efficiency can be improved.
Accordingly, embodiments of the present invention further provide a cluster node configuration system and a readable storage medium corresponding to the above cluster node configuration method, which have the above technical effects and are not described herein again.
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 flowchart of an implementation of a cluster node configuration method applied to a configuration node in an embodiment of the present invention;
fig. 2 is a flowchart of an implementation of a cluster node configuration method applied to a target node in the embodiment of the present invention;
fig. 3 is a schematic diagram of information transmission of a cluster node configuration method in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a cluster node configuration system in an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a scheme for managing cluster nodes in batches, which can manage the cluster nodes in batches based on the topological relation among the nodes, save manual execution commands and improve the configuration management efficiency of the cluster nodes. For convenience of description, the following description will be made in detail by taking the application to the configuration node and the target node as examples.
Accordingly, another core of the present invention is to provide a system and a computer-readable storage medium capable of managing cluster nodes in batch, which have corresponding technical effects.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. 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.
The first embodiment is as follows:
in this embodiment, a cluster node configuration method applied to a configuration node is mainly described. The configuration node may be any node that has a communication connection with other nodes, for example, one node in any dual-control device. Specifically, referring to fig. 1, fig. 1 is a flowchart of an implementation of a cluster node configuration method applied to a configuration node in the embodiment of the present invention, where the method includes the following steps:
s101, a cluster configuration management request is obtained, and a component node set of a target cluster corresponding to the cluster configuration management request is determined.
In this embodiment, the cluster configuration management mainly refers to configuration management of creation of a cluster, addition, deletion, and modification (replacement) of constituent nodes of the cluster.
When the cluster needs to be configured and managed, a cluster configuration management request can be sent to the configuration node. And the configuration node receives the cluster configuration management request and can determine the cluster configuration management requirement. That is, the cluster configuration management request may specifically carry a target cluster to be configured and managed, and specific management content.
Specifically, in this embodiment, the cluster configuration management request may include, but is not limited to, a cluster creation request, a cluster node batch addition request, and a cluster node deletion request. For the specific case of the cluster configuration management request, the corresponding manner for determining the constituent node set of the target cluster includes, but is not limited to, the following cases:
the first condition is as follows: and if the cluster configuration management request is a cluster establishment request, directly taking a node set specified by the cluster configuration management request as a component node set.
When the cluster configuration management request is a cluster creation request, the ID of the target cluster to be created and the constituent node of the target cluster may be specified in the cluster creation request. Therefore, the set of nodes specified by the cluster creation request may be directly used as the set of constituent nodes of the target cluster. For example, if there are 8 nodes, the cluster creation request may specifically create the target cluster for 5 nodes with node numbers 0 to 4, and the constituent node set of the target cluster includes: node 0, node 1, node 2, node 3, and node 4.
And a second condition: and if the cluster configuration management request is a cluster node batch adding request, supplementing the existing component node set by using the added nodes corresponding to the cluster node batch adding request. When the cluster node is a cluster node batch addition request, the cluster node batch addition request may specifically include a newly added node. And supplementing the current constituent node set of the target cluster based on the newly added node. For example, if there are 8 nodes and the constituent node set of the current target cluster includes: node 0, node 1, node 2, and node 3; and the cluster node batch addition request specifies that the node 5, the node 6 and the node 7 are added to the target node, and the supplemented target cluster comprises a node set consisting of: node 0, node 1, node 2, node 3, node 5, node 6, and node 7.
And a third situation: if the cluster configuration management request is a cluster node deletion and modification request, deleting and modifying the existing component node set by using deletion and modification nodes corresponding to the cluster node batch deletion and modification request. When the cluster configuration request is a cluster node deletion request, the existing component node set can be deleted and modified by using the nodes to be deleted and modified specified in the cluster node deletion request. For example, if there are 8 nodes, and the constituent node set of the current target cluster includes: node 0, node 1, node 2 and node 3, node 4; and the cluster node batch deletion request specifies that the node 1 is replaced by the node 5, the node 2 is replaced by the node 6, and the node 0 is deleted, so that the node set formed by the deleted target cluster comprises: node 3, node 4, node 5, node 6.
As can be seen from the above situation, no matter what operation is specifically required to be performed on the target cluster by the cluster configuration management request, the finally determined constituent node set corresponds to the cluster node after the target cluster configuration management.
After the group of constituent nodes is obtained, the operation of step S102 may be performed.
S102, determining a cluster topology sequence corresponding to the node set by using the topological relation among the nodes.
It should be noted that, the topological relationship between the nodes, i.e., the connection topology between the nodes communicating with each other. Specifically, the topological relation between the nodes can be stored in a table or two-dimensional array form. For convenience of explanation, the following description will describe the topological relationships among the nodes in detail by taking the example of storing the topological relationships among the nodes in a table. Please refer to the following table:
Figure BDA0002581744230000071
TABLE 1
Table 1 shows a topological relationship between nodes including 4 nodes, where 1111 in the topological relationship corresponds to a communication state of a node corresponding to each unique identifier of each node recorded in the same row, and in a first example, a first bit in 1111 indicates that a node 0 × 0000 is online, a second bit indicates that a node 0 × 0001 is online, and so on, when a node is disconnected, the corresponding bit in the topological relationship is indicated by 0.
Each row in table 1 represents a link sequence. The link sequence corresponding to the first row is a link sequence which starts from node 0 × 0000 and sequentially passes through node 0 × 0001, node 0 × 0010 and node 0 × 0011.
The process of obtaining the topological relation between the nodes comprises the following steps:
step one, sending heartbeat detection data packets to each target node to obtain a target link sequence;
step two, mutually synchronizing the link sequences obtained by the target nodes with each other;
and step three, constructing a topological relation between the nodes by utilizing each link sequence.
The target nodes and the configuration nodes mutually send heartbeat detection data packets, synchronize links, and establish a topological relation between the nodes, which is similar to a two-dimensional array and can be expressed in a matrix or table form. Preferably, in order to facilitate a user to select a node for constructing the target cluster, when constructing the topology relationship between nodes, the nodes may be further sorted according to the quality of the links, so that the better the quality of the links is, the smaller or the higher the sequence number is.
In this embodiment, in order to implement the cluster configuration management command, the cluster of constituent nodes may be characterized by the topological relationship between the nodes, that is, the topological sequence thereof refers to the set of constituent nodes. The specific process for determining the cluster topology sequence comprises the following steps:
step one, searching a topological relation between nodes to obtain a target link sequence corresponding to a unique identifier of the node;
and step two, determining a cluster topology sequence by using the target link sequence.
The unique identifier finds the row where the device unique identifier equal to the index number 0 is located
Specifically, a target row where the unique identifier of the target row is located can be searched in a table corresponding to the topological relation among the nodes; and determining a target link sequence by using the data content recorded in the target row. For example, the following steps are carried out: referring to table 1, if the configured node is node 0 × 0001, the target link is a link sequence that sequentially passes through node 0 × 0000, node 0 × 0011 and node 0 × 0010, starting from node 0 × 0001.
After the target link sequence is obtained, the cluster topology sequence may be identified by a string of corresponding digits.
Specifically, the same number of binary digits as the number of nodes in the target link sequence may be used to represent different nodes, with 1 or 0 representing the corresponding node in the constituent node set. Referring to table 1, if a node is configured to be node 0x0000, that is, data in row 1 of table 1 needs to be compared, 4 nodes may be identified by using 4-bit binary numbers, for example, 1011, indicating that node 1 (same as 0x0000 in table 1), node 3 (same as 0x 0010 in table 1), and node 4 (same as 0x 0011 in table 1) need to be added to a target cluster, and node 2 (same as 0x 0001 in table 1) does not need to be added to a cluster. Preferably, in practical application, the configuration node may be any node that needs to be added/fixed in the home target cluster, so that the characterizing effect of 1011 and 0011 is the same.
S103, generating a cluster configuration management command corresponding to the cluster topology sequence.
In order to facilitate each target node receiving the cluster configuration management command to determine whether itself belongs to the target cluster, the configuration node may indicate its identity in the cluster configuration management command so that each target node determines a target link sequence for comparison. That is, the cluster topology sequence and the unique identifier of the configuration node are included in the cluster configuration management command. For example, 0 × 0001.
And S104, sending a cluster configuration management command to each target node cluster with communication connection so as to configure the constituent nodes of the target cluster.
And each target node has a topological relation among the nodes.
After the cluster configuration management command is generated, the directory can be sent to each target node group with communication understanding. Therefore, each target node carries out reverse node based on the generation process of the configuration management command, and whether the target node belongs to the target cluster can be determined, and whether the target node is added to the target cluster or whether the target node exits the target cluster can be further determined.
By applying the method provided by the embodiment of the invention, the configuration node acquires the cluster configuration management request and determines the component node set of the target cluster corresponding to the cluster configuration management request; determining a cluster topology sequence corresponding to the component node set by using the topological relation among the nodes; generating a cluster configuration management command corresponding to the cluster topology sequence; and sending a cluster configuration management command to each target node cluster with communication connection so as to configure the constituent nodes of the target cluster.
In the method, a configuration node and a target node jointly maintain a topological relation between the nodes. After the configuration node acquires the cluster configuration management request, a component node set of a target cluster corresponding to the cluster configuration management request can be determined. Then, by utilizing the topological relation among the nodes, a cluster topological sequence corresponding to the component node set is determined, and a cluster configuration management command corresponding to the cluster topological sequence is generated. And finally, sending cluster configuration management commands to each target node group. Because the target node also has the topological relation among the nodes, the target node can carry out node processing on the cluster configuration management command based on the topological relation among the nodes to determine whether the target cluster needs to be added. Therefore, in the method, the configuration node can enable the constituent nodes of the target cluster to be added into the target cluster by sending the cluster configuration management command in a group manner, so that the manual execution command is omitted, and the cluster node configuration management efficiency can be improved.
Example two:
in this embodiment, a cluster node configuration method applied to a target node is described in detail. The target node may be any node capable of communicating with the configuration node, and the target node may be a node in the target cluster or a node outside the target cluster. It should be noted that the present embodiment and the first embodiment can be referred to each other. Specifically, referring to fig. 2, fig. 2 is a flowchart of an implementation of a cluster node configuration method applied to a target node in the embodiment of the present invention, where the method includes the following steps:
s201, receiving and analyzing a cluster configuration management command sent by the configuration node in a cluster mode to obtain a unique identifier of the configuration node and a cluster topology sequence.
It should be noted that, for the generation process of the cluster configuration management command and the cluster topology sequence, reference may be made to the first embodiment, and details are not described herein.
After the target node receives the cluster configuration management command sent by the configuration node, the target node can perform node processing on the cluster configuration management command to obtain the unique identifier of the configuration node and the cluster topology sequence.
S202, searching the topological relation among the nodes to obtain a target link sequence corresponding to the unique identifier.
The specific form and the specific obtaining process of the topological relation between the nodes may refer to the description of the first embodiment, which is further described herein.
Specifically, a target link sequence referred by the configuration node when generating the cluster topology sequence is determined by searching the topological relation between the nodes.
From the above, the topological relationship between nodes can be represented by a table or a two-dimensional array, and the following describes how to determine the target link sequence in detail by taking the table form as an example:
the method comprises the following steps: searching a target row where the unique identifier is located in a table corresponding to the topological relation among the nodes;
and step two, determining a target link sequence by using the data content recorded in the target row.
Referring to table 1, if the unique identifier in the cluster configuration management command is: 0 × 0011, finding the fourth row data in the table to obtain the target link sequence as follows: the link sequence passing through node 0 × 0010, node 0 × 0001, and node 0 × 0000 in this order starts from node 0 × 0011.
S203, judging whether the target node is a constituent node of the target cluster or not by using the cluster topology sequence and the target link sequence.
After the target link sequence is obtained, the cluster topology sequence and the target link sequence can be compared to judge whether the target node is a constituent node of the target cluster. Whether the target node is a constituent node of the target cluster can be judged according to the corresponding relation between the bits of the cluster topology sequence and the target link sequence and the numerical value of each bit in the cluster topology sequence.
Specifically, the process of determining whether the target node is a component node includes:
comparing a cluster topology sequence with a target link sequence to determine a constituent node set of a target cluster;
step two, if the target node is in the component node set, determining the target node as a component node;
and step three, if the target node is not in the component node set, determining that the target node is not a component node.
For example, referring to fig. 3 and table 1, the unique identifier sent by the configuration node is 0x0000, the cluster topology sequence is 1011, which indicates that data in row 1 in table 1 needs to be compared, that is, the target link sequence is found, and the 1011 is analyzed to obtain 1101 that node 1, node 3, and node 4 need to be added to the target cluster, and node 2 does not need to be added to the cluster.
After whether the target node is the constituent node of the target cluster is obtained, subsequent supplement can be executed according to the judgment result. Specifically, if the determination result is yes, when the target node does not join the target cluster, step S204 is executed, and if the determination result is no, that is, after the target node is determined to be not a constituent node, it may also be determined whether the target node has joined the target cluster; if so, the target cluster is exited.
And S204, adding the target cluster.
Response information for joining the cluster can be sent to the configuration node so as to obtain the cluster ID of the target cluster, and the target node is configured to belong to the target cluster.
By applying the method provided by the embodiment of the invention, the target node receives and analyzes the cluster configuration management command sent by the configuration node in a cluster manner to obtain the unique identifier of the configuration node and the cluster topology sequence; searching the topological relation among the nodes to obtain a target link sequence corresponding to the unique identifier; judging whether the target node is a constituent node of the target cluster or not by utilizing the cluster topology sequence and the target link sequence; if so, the target cluster is joined.
For the target node, after receiving the cluster configuration management command sent by the configuration node in a cluster, the configuration node can analyze the cluster configuration management directory to determine the unique identifier of the configuration node and the cluster topology sequence. And searching the topological relation among the nodes to obtain a target link sequence corresponding to the unique identifier. And then, by comparing the cluster topology sequence with the target link sequence, whether the target node is a constituent node of the target cluster can be determined. Upon determining to be a constituent node of the target cluster, the target cluster may be joined. Therefore, in the method, the target node can automatically join the target cluster only by receiving one cluster configuration management command sent in a group, so that a manual execution command is omitted, and the cluster node configuration management efficiency can be improved.
Example three:
corresponding to the above method embodiment, the embodiment of the present invention further provides a cluster node configuration system, and the cluster node configuration system described below and the cluster node configuration method described above may be referred to in a corresponding manner.
Referring to fig. 4, the system includes:
a configuration node (diagram 100), and a target node (diagram 201-20N, N = node total-1 in the entire system) having a communication connection with the configuration node;
wherein the configuration node comprises:
a memory for storing a computer program;
a processor, configured to implement the steps of the cluster node configuration method as described in the first embodiment when executing the computer program;
the target node includes:
a memory for storing a computer program;
and a processor, configured to implement the steps of the cluster node configuration method described in the second embodiment when executing the computer program.
When nodes are added, deleted or the link fails, each node can detect the link again and regenerate the topological relation among the nodes, and the target cluster and the nodes in the target cluster cannot be influenced.
When a plurality of double-control devices are adopted to create a multi-node cluster, the multi-node cluster can be established through one-time creation, the complicated process of repeatedly adding nodes is reduced to a certain extent, the error rate is reduced, and the execution efficiency of the system is improved.
Example four:
corresponding to the above method embodiment, an embodiment of the present invention further provides a readable storage medium, and a readable storage medium described below and a cluster node configuration method described above may be referred to in correspondence.
A readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the cluster node configuration method of the above-mentioned method embodiment.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

Claims (8)

1. A cluster node configuration method is applied to a configuration node and comprises the following steps:
acquiring a cluster configuration management request, and determining a component node set of a target cluster corresponding to the cluster configuration management request;
determining a cluster topology sequence corresponding to the component node set by using the topological relation among the nodes; the determining a cluster topology sequence corresponding to the component node set by using the topological relation among the nodes includes: searching the topological relation among the nodes to obtain a target link sequence corresponding to the unique identifier of the node; determining the cluster topology sequence by using the target link sequence; the cluster topology sequence is identified by a character string with the same number of digits as the number of the nodes of the target link sequence; the target link sequence is a data content sequence of a target row where a table corresponding to the unique node identification and the topological relation among the nodes is located;
generating a cluster configuration management command corresponding to the cluster topology sequence;
sending the cluster configuration management command to each target node cluster with communication connection so as to configure the constituent nodes of the target cluster; wherein each of the target nodes has the inter-node topological relationship.
2. The method of claim 1, wherein determining a set of constituent nodes of a target cluster corresponding to the cluster configuration management request comprises:
if the cluster configuration management request is a cluster establishment request, directly taking a node set specified by the cluster configuration management request as the component node set;
if the cluster configuration management request is a cluster node batch adding request, supplementing the existing component node set by using the added nodes corresponding to the cluster node batch adding request;
and if the cluster configuration management request is a cluster node deletion request, deleting the existing component node set by using deletion nodes corresponding to the cluster node batch deletion request.
3. The method according to claim 1, wherein the process of obtaining the topological relationship between the nodes comprises:
sending heartbeat detection data packets to each target node to obtain a target link sequence;
mutually synchronizing the link sequences obtained by the target nodes with each other;
and constructing the topological relation among the nodes by utilizing each link sequence.
4. A cluster node configuration method is applied to a target node and comprises the following steps:
receiving and analyzing a cluster configuration management command sent by a configuration node cluster to obtain a unique identifier of the configuration node and a cluster topology sequence; searching a topological relation between nodes to obtain a target link sequence corresponding to the unique identifier; the searching for the topological relation between the nodes to obtain the target link sequence corresponding to the unique identifier includes: searching a target row where the unique identifier is located in a table corresponding to the topological relation among the nodes; determining the target link sequence by using the data content recorded in the target row; the cluster topology sequence is identified by a character string with the same number of digits as the number of the nodes of the target link sequence;
judging whether a target node is a constituent node of a target cluster or not by utilizing the cluster topology sequence and the target link sequence;
and if so, joining the target cluster.
5. The method according to claim 4, wherein determining whether a target node is a constituent node of a target cluster by using the cluster topology sequence and the target link sequence comprises:
comparing the cluster topology sequence with the target link sequence to determine a component node set of the target cluster;
if the target node is in the component node set, determining the target node as the component node;
if the target node is not in the component node set, determining that the target node is not the component node.
6. The method of claim 4, wherein after determining that the target node is not the component node, the method further comprises:
judging whether the target node is added into the target cluster;
if so, exiting the target cluster.
7. A cluster node configuration system, comprising:
a configuration node, and a target node having a communication connection with the configuration node;
wherein the configuration node comprises:
a memory for storing a computer program;
a processor for implementing the steps of the cluster node configuration method of any one of claims 1 to 3 when executing the computer program;
the target node includes:
a memory for storing a computer program;
a processor for implementing the steps of the cluster node configuration method according to any of claims 4 to 6 when executing said computer program.
8. A readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the cluster node configuration method according to any one of claims 1 to 6.
CN202010669474.0A 2020-07-13 2020-07-13 Cluster node configuration method and system and readable storage medium Active CN111817894B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010669474.0A CN111817894B (en) 2020-07-13 2020-07-13 Cluster node configuration method and system and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010669474.0A CN111817894B (en) 2020-07-13 2020-07-13 Cluster node configuration method and system and readable storage medium

Publications (2)

Publication Number Publication Date
CN111817894A CN111817894A (en) 2020-10-23
CN111817894B true CN111817894B (en) 2022-12-30

Family

ID=72843095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010669474.0A Active CN111817894B (en) 2020-07-13 2020-07-13 Cluster node configuration method and system and readable storage medium

Country Status (1)

Country Link
CN (1) CN111817894B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1441569A (en) * 2002-02-27 2003-09-10 华为技术有限公司 Concentrated network equipment managing method
CN110597664A (en) * 2019-09-17 2019-12-20 深信服科技股份有限公司 High-availability cluster resource deployment method, device and related components

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7035858B2 (en) * 2002-04-29 2006-04-25 Sun Microsystems, Inc. System and method dynamic cluster membership in a distributed data system
CN100366001C (en) * 2006-01-05 2008-01-30 西安交通大学 Method of constructing cluster management and monitoring system in resilient system architecture
CN101873225A (en) * 2010-06-09 2010-10-27 神州数码网络(北京)有限公司 Cluster network management system and method thereof with high reliability and flexibility
CN103970580B (en) * 2014-05-05 2017-09-15 华中科技大学 A kind of data flow towards multinuclear cluster compiles optimization method
CN106960060B (en) * 2017-04-10 2020-07-31 聚好看科技股份有限公司 Database cluster management method and device
CN111404924B (en) * 2020-03-12 2022-09-30 腾讯云计算(北京)有限责任公司 Security management and control method, device, equipment and storage medium of cluster system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1441569A (en) * 2002-02-27 2003-09-10 华为技术有限公司 Concentrated network equipment managing method
CN110597664A (en) * 2019-09-17 2019-12-20 深信服科技股份有限公司 High-availability cluster resource deployment method, device and related components

Also Published As

Publication number Publication date
CN111817894A (en) 2020-10-23

Similar Documents

Publication Publication Date Title
US11392612B2 (en) Data processing method and device
CN101009516B (en) A method, system and device for data synchronization
US8826032B1 (en) Systems and methods for network change discovery and host name resolution in storage network environments
US11935015B2 (en) Data processing method and apparatus, computer device, and storage medium
US20170031948A1 (en) File synchronization method, server, and terminal
CN109325016A (en) Data migration method, device, medium and electronic equipment
US11265182B2 (en) Messaging to enforce operation serialization for consistency of a distributed data structure
CN110557304B (en) Address detection method and device and computer readable storage medium
CN105187475A (en) Method and system for data synchronization
CN116360954B (en) Industrial Internet of things management and control method and system based on cloud edge cooperative technology
CN107580032A (en) Data processing method, device and equipment
CN114237519A (en) Method, device, equipment and medium for migrating object storage data
US10853892B2 (en) Social networking relationships processing method, system, and storage medium
CN111817894B (en) Cluster node configuration method and system and readable storage medium
CN108846085A (en) A kind of ID generation method, device, electronic equipment and system
CN113794581A (en) Distributed CP unified deployment method, network equipment and storage medium
CN104753659B (en) A kind of method, apparatus and system of more network element data synchronization loads
CN111858956B (en) Knowledge graph construction method, knowledge graph construction device, network equipment and storage medium
CN109947892B (en) Analysis path determination method and system, interface and log tree construction method
CN114138180A (en) Method, device and equipment for deleting object and readable medium
CN107943519B (en) A kind of time series data random ordering operation processing method and device
CN111211966A (en) Method and system for storing transmission files in chat tool
CN113132233B (en) Data processing method, software defined network controller and data processing system
CN101997829A (en) Method and equipment for synchronizing hierarchical data
CN114116681B (en) Data migration method and device

Legal Events

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