CN109088937B - Cluster authorization method and device based on unified management - Google Patents

Cluster authorization method and device based on unified management Download PDF

Info

Publication number
CN109088937B
CN109088937B CN201810990176.4A CN201810990176A CN109088937B CN 109088937 B CN109088937 B CN 109088937B CN 201810990176 A CN201810990176 A CN 201810990176A CN 109088937 B CN109088937 B CN 109088937B
Authority
CN
China
Prior art keywords
cluster
authorization
node
master
time
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
CN201810990176.4A
Other languages
Chinese (zh)
Other versions
CN109088937A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810990176.4A priority Critical patent/CN109088937B/en
Publication of CN109088937A publication Critical patent/CN109088937A/en
Application granted granted Critical
Publication of CN109088937B publication Critical patent/CN109088937B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application discloses a cluster authorization method and a device based on unified management, wherein the method comprises the following steps: after the master node and the non-master nodes in the cluster are determined, the authorization time and the authorization state of the cluster master node are synchronized to all other non-master nodes in the cluster, so that the authorization time and the authorization state of all other non-master nodes in the cluster are consistent with the cluster master node, the authorization time and the authorization state of all the nodes in the cluster are guaranteed to be consistent, and the cluster authorization of unified management is realized. Therefore, the method for computing the authorization time of each node is not adopted, the authorization time and the authorization state of the cluster master node are synchronized to all other non-master nodes in the cluster after the master node and the non-master nodes in the cluster are determined, so that the unified management of the authorization time and the authorization state of each node in the cluster is realized, the authorization time of all the nodes in the cluster is ensured to be consistent, and the cluster can normally provide services.

Description

Cluster authorization method and device based on unified management
Technical Field
The present application relates to the field of cluster technologies, and in particular, to a cluster authorization method and apparatus based on unified management.
Background
Currently, with the advent of the data age and the continuous development of high-performance parallel computing technology, the amount of data which needs to be stored in daily life is larger and larger, and in this context, distributed storage systems are becoming widely used.
For the distributed storage system, it is important to authorize the cluster of the storage system while increasing the capacity of the storage system, and especially after the company sells the product to the customer, the authorization of the cluster must be strictly controlled, so that the customer can enjoy the corresponding service of the product only during the authorized time, and after the lease expires, if the customer can still enjoy the service of the product, a certain economic loss is caused to the company. As is well known, a cluster of a storage system refers to a group of service entities, such as computers, which are independent of each other and interconnected through a high-speed network, and provide services to the outside as a single system, and each service entity in the cluster is a node, so the cluster generally includes a plurality of nodes. Currently, an authorization method for a cluster is to configure a monitoring module for each node of the cluster to independently calculate authorization time of each node, but the independent calculation of the authorization time for each node may cause inconsistent authorization time of different nodes in a cluster authorization process, which may further cause failure of node authorization time, or even cause the whole cluster to stop providing services. Or, when a user artificially modifies the local time of some nodes of the cluster, the authorized time of the node may be inconsistent with that of other nodes, and the whole cluster stops providing services.
Therefore, how to use a more advanced cluster authorization manner to replace the conventional authorization manner to achieve unified management of the authorization time of each node in the cluster, thereby ensuring that the authorization times of all nodes are consistent and ensuring that the cluster can provide services normally is a problem to be solved urgently.
Disclosure of Invention
In order to solve the above problems, the present application provides a cluster authorization method and device based on unified management, and the specific technical scheme is as follows:
in a first aspect, the present application provides a cluster authorization method based on unified management, where the method includes:
determining a main node and a non-main node of a cluster;
synchronizing the authorization time and authorization status of the cluster master node to the non-master nodes of the cluster so that the authorization time and authorization status of the non-master nodes of the cluster are consistent with the cluster master node.
In an optional implementation manner, the determining the master node and the non-master node of the cluster includes:
judging whether a triggering condition of a cluster is generated, wherein the triggering condition comprises at least one of adding a new node into the cluster, exiting the cluster by a node and lease expiration of the cluster;
and if so, determining the main node of the cluster through a main node election process.
In an optional implementation manner, the synchronizing the authorization time and the authorization status of the cluster master node to the non-master nodes of the cluster includes:
the authorization time and the authorization state of the cluster master node are synchronized to the non-master nodes of the cluster in a timing mode; and/or synchronizing the authorization time and the authorization state of the cluster master node to the non-master nodes of the cluster when the master node election process is carried out.
In an optional implementation, the method further includes:
judging whether the cluster main node is transformed or not;
if so, synchronizing the authorization time and the authorization state of the transformed master node to other nodes of the cluster so that the authorization time and the authorization state of the other nodes are consistent with the transformed master node.
In an optional implementation manner, after synchronizing the authorization time and the authorization status of the cluster master node to the non-master nodes of the cluster so that the authorization time and the authorization status of the non-master nodes of the cluster are consistent with the cluster master node, the method further includes:
detecting whether the authorized time of the user to the cluster node is modified;
if so, judging whether the modified authorization time is consistent with the authorization time from the cluster master node to the cluster node in the previous round;
if not, keeping the authorization time of the cluster node consistent with the authorization time of the cluster master node in the previous round.
In a second aspect, the present application provides a cluster authorization apparatus based on unified management, where the apparatus includes:
the determining unit is used for determining a main node and a non-main node of the cluster;
and the first synchronization unit is used for synchronizing the authorization time and the authorization state of the cluster main node to the non-main nodes of the cluster, so that the authorization time and the authorization state of the non-main nodes of the cluster are consistent with those of the cluster main node.
In an optional implementation manner, the determining unit includes:
the device comprises a judging subunit, a judging unit and a judging unit, wherein the judging subunit is used for judging whether a triggering condition of a cluster is generated, and the triggering condition comprises at least one of adding a new node into the cluster, exiting the cluster by the node and lease expiration of the cluster;
and the determining subunit is used for determining the master node of the cluster through the master node election process if the triggering condition of the cluster is judged to be generated.
In an optional implementation manner, the first synchronization unit is specifically configured to:
the authorization time and the authorization state of the cluster master node are synchronized to the non-master nodes of the cluster in a timing mode; and/or synchronizing the authorization time and the authorization state of the cluster master node to the non-master nodes of the cluster when the master node election process is carried out.
In an optional implementation, the apparatus further includes:
the first judgment unit is used for judging whether the cluster main node is changed or not;
and the second synchronization unit is used for synchronizing the authorization time and the authorization state of the transformed main node to other nodes of the cluster if the change of the main node of the cluster is judged, so that the authorization time and the authorization state of the other nodes are consistent with the changed main node.
In an optional implementation, the apparatus further includes:
the detection unit is used for detecting whether the authorization time of the user to the cluster node is modified;
a second judging unit, configured to, if it is detected that the authorization time of the cluster node is modified by the user, judge whether the modified authorization time is consistent with the authorization time from the cluster master node to the cluster node in the previous round;
and the time determining unit is used for keeping the authorization time of the cluster node consistent with the authorization time of the cluster master node in the previous round if the modified authorization time is judged to be inconsistent with the authorization time from the cluster master node to the cluster node in the previous round.
In the cluster authorization method based on unified management provided by the application, after the master node and the non-master nodes in the cluster are determined, the authorization time and the authorization state of the cluster master node are synchronized to all other non-master nodes in the cluster, so that the authorization time and the authorization state of all other non-master nodes in the cluster are consistent with the cluster master node, thus the authorization time and the authorization state of all nodes in the cluster are guaranteed to be consistent, and the cluster authorization based on unified management is realized. Therefore, the method for computing the authorization time of each node is not adopted, the authorization time and the authorization state of the cluster master node are synchronized to all other non-master nodes in the cluster after the master node and the non-master nodes in the cluster are determined, so that the unified management of the authorization time and the authorization state of each node in the cluster is realized, the authorization time of all the nodes in the cluster is ensured to be consistent, and the cluster can normally provide services.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a flowchart of a cluster authorization method based on unified management according to an embodiment of the present application;
FIG. 2 is a diagram illustrating authorization time and authorization status synchronization provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram of a cluster authorization method based on unified management according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a cluster authorization apparatus based on unified management according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
In order to facilitate understanding of the technical solutions provided in the present application, the following briefly describes the research background of the technical solutions in the present application.
As is well known, as described in the background art, with the arrival of the big data era and the continuous development of the high-performance parallel computing technology, the amount of data to be processed by a storage system is increasing, for a distributed storage system, it is very important how to authorize a cluster of the storage system while increasing the capacity of the storage system. Or, when a user artificially modifies the local time of some nodes of the cluster, the authorized time of the node may be inconsistent with that of other nodes, and the whole cluster stops providing services. Therefore, how to implement unified management on the authorization time and the authorization state of each node in the cluster by using a more advanced cluster authorization manner so as to ensure that the authorization times of all the nodes are consistent, thereby ensuring that the cluster can normally provide services, has become a problem to be solved urgently.
Based on this, the application provides a cluster authorization method and device based on unified management, which are used for implementing unified management on authorization time and authorization state of each node in a cluster.
The cluster authorization method based on unified management provided by the embodiment of the present application will be described in detail below with reference to the accompanying drawings. Referring to fig. 1, which shows a flowchart of a cluster authorization method based on unified management provided in an embodiment of the present application, the embodiment may include the following steps:
s101: a master node and a non-master node of the cluster are determined.
In this embodiment, with continuous development of a high-performance parallel computing technology, stored data shows an exponential growth trend, and in order to implement unified management on authorization time of each node in a cluster, thereby ensuring that authorization time of all nodes is consistent, and ensuring that the cluster can normally provide services, it is first required to determine a master node and a non-master node of a storage system cluster, where the master node refers to a node in the cluster whose monitoring state is "leader" and is dominant in the cluster node, and correspondingly, the non-master node is another node in the cluster node except for the master node, and the non-master node is dominated by the master node and is non-dominant in the cluster. After the master node and the non-master nodes of the cluster are determined, the subsequent step S102 is executed to implement the unified management of cluster authorization.
It should be noted that, in some possible implementation manners of the present application, step S101 may specifically include steps a-B:
step A: and judging whether a triggering condition of the cluster is generated, wherein the triggering condition comprises at least one of adding a new node into the cluster, exiting the cluster by the node and over-term lease of the cluster.
In this implementation manner, in order to implement unified management on the authorization time of each node in the cluster, after confirming the cluster message of the storage system, the configuration message of all nodes in the cluster may be obtained, where the configuration message includes authorization status information (lic _ type) and authorization time (left _ time) of each node, and then it is determined whether a triggering condition of the cluster master node and the non-master node is generated, where the triggering condition may include at least one of adding a new node in the cluster, exiting the cluster by an existing node in the cluster, and lease expiration of the cluster, and the generation of the triggering condition triggers execution of step B to determine the cluster master node and the non-master node.
And B: if the triggering conditions for determining the cluster main node and the non-main node are generated, determining the main node of the cluster through the main node election process
In this implementation manner, if it is determined through step a that the triggering condition for determining the cluster master node and the non-master node is generated, if a network interruption occurs and a lease of the cluster is expired, an election process is performed autonomously to determine the master node and the non-master node in the cluster, where a specific implementation process of the election process is consistent with that of the existing method, and details are not described herein.
S102: the authorization time and authorization status of the cluster master node are synchronized to the non-master nodes of the cluster so that the authorization time and authorization status of the non-master nodes of the cluster are consistent with the cluster master node.
In this embodiment, after the master node and the non-master nodes of the cluster are determined in step S101, in order to implement unified management of the authorization time of each node in the cluster and ensure that the cluster can normally provide services, the authorization time and the authorization state of the master node in the cluster may be synchronized to the non-master nodes of the cluster, so that the authorization time and the authorization state of the non-master nodes of the cluster are consistent with those of the cluster master node.
For example, the following steps are carried out: as shown in fig. 2, which illustrates a schematic diagram of synchronization of authorization time and authorization status provided in this embodiment of the application, assuming that a cluster includes A, B, C nodes, where a node a is a cluster master node determined in step S101, and a node B and a node C are non-master nodes of the cluster, and the authorization time and authorization status of the master node a are transmitted to the non-master nodes B and C through message transmission of AB, AC, and BC, so that the authorization status and authorization time displayed by the node B and the node C are consistent with that displayed by the node a.
In some possible implementation manners of the present application, in the process of synchronizing the authorization time and the authorization status of the cluster master node to the non-master node of the cluster through step S102, the process may include:
synchronizing the authorization time and the authorization state of the cluster main node to the non-main node of the cluster at regular time; and/or synchronizing the authorization time and the authorization state of the cluster master node to the non-master nodes of the cluster when the master node election process is carried out.
In this implementation manner, the process of synchronizing the authorization time and the authorization state of the cluster master node to the non-master node of the cluster may include timing synchronization and synchronization implemented when the master node elects, where timing synchronization refers to a process of synchronizing the authorization time and the authorization state of the master node to the non-master node of the cluster at fixed intervals, for example, a synchronization process is executed at every 300 seconds; the synchronization implemented during the master node election refers to a process of automatically synchronizing the authorized time and authorized state of the elected master node to the non-master nodes of the cluster each time the master node election is autonomously performed, and it should be noted that, in practical application, a synchronization mode may be set according to specific situations, which is not limited in the present application.
In some possible implementation manners of the present application, after the step S101-S102 is used to implement unified management of the authorized time of each node in the cluster, the method further includes:
and judging whether the cluster master node is changed, if so, synchronizing the authorization time and the authorization state of the changed master node to other nodes of the cluster so that the authorization time and the authorization state of the other nodes are consistent with the changed master node.
In this implementation manner, since the cluster autonomously elects the master node when a new node is added, an original node exits, and a lease expires, the master node in the cluster may change at any time, that is, the master node of the cluster may be changed at any time through a re-election process of the master node, so that, after the change of the cluster master node is detected, in order to maintain uniform management of the authorization time of each node in the cluster, the authorization time and authorization state of the changed master node need to be synchronized to other non-master nodes of the cluster, so that the authorization time and authorization state of the other non-master nodes may be consistent with the master node after the change of the cluster, and the cluster after the change of the master node is ensured to normally provide services. The method and the device realize that the authorization time of the cluster changes along with the change of the main node, so that the authorization time of the cluster fails after the main node changes, and further ensure that the cluster has higher fault tolerance.
For example, the following steps are carried out: based on the above example, it is assumed that the cluster includes three nodes, respectively A, B, C, where a is a cluster master node, and after the master node is changed, the master node is changed from node a to node B, at this time, the authorization state and the authorization time of the cluster are displayed as the authorization state and the authorization time of node B, that is, after node B becomes a cluster master node, the authorization time and the authorization state displayed by node a and node C are both consistent with that of node B, so as to ensure that the cluster after the master node is changed can normally provide services.
In some possible implementation manners of the present application, after the steps S101 to S102 are used to implement unified management of the authorized time of each node in the cluster, the following steps C to E are further included:
and C: and detecting whether the authorized time of the user to the cluster node is modified.
In this implementation manner, after the unified management of the authorization time of each node in the cluster is implemented, it can be further detected whether the local time of a certain node in the cluster is modified by a user, and further whether the authorization time of the node changes.
Step D: and if so, judging whether the modified authorization time is consistent with the authorization time from the cluster master node to the cluster node in the previous round.
In this implementation manner, if it is detected through step C that the authorized time of a node of the cluster changes due to the manual modification of the time by the user, it may be further determined whether the authorized time after the modification of the node is consistent with the authorized time when the master node of the cluster in the previous round synchronizes to the node.
Step E: if not, keeping the authorization time of the cluster node consistent with the authorization time of the cluster master node in the previous round.
If the authorization time after the node modification is judged to be inconsistent with the authorization time from the last round of cluster master node synchronization to the node through the step D, the authorization time of the node is kept consistent with the authorization time from the last round of cluster master node synchronization, namely the node does not modify the authorization time of the node due to artificial modification, so that the authorization time of the node is inconsistent with the authorization time of the master node, and the node fails. For example, assuming that the authorization time from the synchronization of the cluster master node received by a node to the node in the previous round is 300 days, and after the user modifies the local time manually, the authorization time calculated by the node monitoring module is 200 days and is inconsistent with the original authorization time, the authorization time from the synchronization of the cluster master node received by the previous round to the node (i.e., 300 days) is kept as the authorization time of the node, so that the authorization time of the node is ensured to be consistent with the master node, and the authorization time of the cluster is not invalidated.
Therefore, in the cluster authorization method based on unified management provided by the application, after the master node and the non-master nodes in the cluster are determined, the authorization time and the authorization state of the cluster master node are synchronized to all other non-master nodes in the cluster, so that the authorization time and the authorization state of all other non-master nodes in the cluster are consistent with the cluster master node, and thus, the authorization time and the authorization state of all nodes in the cluster are guaranteed to be consistent, and the cluster authorization of unified management is realized. Therefore, the method for computing the authorization time of each node is not adopted, the authorization time and the authorization state of the cluster master node are synchronized to all other non-master nodes in the cluster after the master node and the non-master nodes in the cluster are determined, so that the unified management of the authorization time and the authorization state of each node in the cluster is realized, the authorization time of all the nodes in the cluster is ensured to be consistent, and the cluster can normally provide services.
For ease of understanding, a schematic structural diagram of the cluster authorization method based on unified management is shown in fig. 3. A specific implementation process of the cluster authorization method based on unified management provided by the embodiment of the present application is introduced.
As shown in fig. 3, the implementation process of the embodiment of the present application is as follows: first, after confirming the cluster information of the storage system, the configuration information of all nodes in the cluster may be obtained, wherein the configuration information includes authorization status information (lic _ type) and authorization time (left _ time) of each node, and then, the master node and the non-master node of the cluster are determined according to the configuration information of each node, for example, it may be determined whether the cluster master node is node a, if so, node a sends authorization status information (lic _ type) and authorization time (left _ time) to non-master nodes B and C, so that the authorization time and authorization status of the non-master nodes B and C are consistent with that of the master node a. Meanwhile, in the running process of the cluster, if the change of the master node occurs, the change is also reported to each node, and each node can synchronize the information of the master node and the slave node at one time. For example, if the master node is changed from node a to another node, node a does not send grant status information (lic _ type) and grant time (left _ time) to nodes B and C, but synchronizes the grant status information (lic _ type) and grant time (left _ time) from the changed master node, which is specifically implemented in step S101 to step S102.
The foregoing embodiments describe the technical solutions of the methods of the present application in detail, and accordingly, the present application further provides a cluster authorization apparatus based on unified management, which is introduced below.
Referring to fig. 4, fig. 4 is a structural diagram of a cluster authorization apparatus based on unified management according to an embodiment of the present application, and as shown in fig. 4, the apparatus includes:
a determining unit 401, configured to determine a master node and a non-master node of a cluster;
a first synchronizing unit 402, configured to synchronize the authorization time and the authorization status of the cluster master node to the non-master nodes of the cluster, so that the authorization time and the authorization status of the non-master nodes of the cluster are consistent with the cluster master node.
Optionally, the determining unit 401 includes:
the device comprises a judging subunit, a judging unit and a judging unit, wherein the judging subunit is used for judging whether a triggering condition of a cluster is generated, and the triggering condition comprises at least one of adding a new node into the cluster, exiting the cluster by the node and lease expiration of the cluster;
and the determining subunit is used for determining the master node of the cluster through the master node election process if the triggering condition of the cluster is judged to be generated.
Optionally, the first synchronization unit 402 is specifically configured to:
the authorization time and the authorization state of the cluster master node are synchronized to the non-master nodes of the cluster in a timing mode; and/or synchronizing the authorization time and the authorization state of the cluster master node to the non-master nodes of the cluster when the master node election process is carried out.
Optionally, the apparatus further comprises:
the first judgment unit is used for judging whether the cluster main node is changed or not;
and the second synchronization unit is used for synchronizing the authorization time and the authorization state of the transformed main node to other nodes of the cluster if the change of the main node of the cluster is judged, so that the authorization time and the authorization state of the other nodes are consistent with the changed main node.
Optionally, the apparatus further comprises:
the detection unit is used for detecting whether the authorization time of the user to the cluster node is modified;
a second judging unit, configured to, if it is detected that the authorization time of the cluster node is modified by the user, judge whether the modified authorization time is consistent with the authorization time from the cluster master node to the cluster node in the previous round;
and the time determining unit is used for keeping the authorization time of the cluster node consistent with the authorization time of the cluster master node in the previous round if the modified authorization time is judged to be inconsistent with the authorization time from the cluster master node to the cluster node in the previous round.
Therefore, in the cluster authorization device based on unified management provided by the application, after the master node and the non-master nodes in the cluster are determined, the authorization time and the authorization state of the cluster master node are synchronized to all other non-master nodes in the cluster, so that the authorization time and the authorization state of all other non-master nodes in the cluster are consistent with the cluster master node, and thus, the authorization time and the authorization state of all nodes in the cluster are guaranteed to be consistent, and the cluster authorization of unified management is realized. Therefore, the method for computing the authorization time of each node is not adopted, the authorization time and the authorization state of the cluster master node are synchronized to all other non-master nodes in the cluster after the master node and the non-master nodes in the cluster are determined, so that the unified management of the authorization time and the authorization state of each node in the cluster is realized, the authorization time of all the nodes in the cluster is ensured to be consistent, and the cluster can normally provide services.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the system or the device disclosed by the embodiment, the description is simple because the system or the device corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. 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.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (6)

1. A cluster authorization method based on unified management is characterized in that the method comprises the following steps:
determining a main node and a non-main node of a cluster;
synchronizing the authorization time and the authorization state of the cluster master node to all other non-master nodes of the cluster so that the authorization time and the authorization state of all other non-master nodes of the cluster are consistent with the cluster master node;
the determining the master nodes and the non-master nodes of the cluster comprises:
judging whether a triggering condition of a cluster is generated, wherein the triggering condition comprises at least one of adding a new node into the cluster, exiting the cluster by a node and lease expiration of the cluster;
if yes, determining the main node of the cluster through a main node election process;
after synchronizing the authorization time and authorization status of the cluster master node to the non-master nodes of the cluster so that the authorization time and authorization status of the non-master nodes of the cluster are consistent with the cluster master node, the method further comprises:
detecting whether the authorized time of the user to the cluster node is modified;
if so, judging whether the modified authorization time is consistent with the authorization time from the cluster master node to the cluster node in the previous round;
if not, keeping the authorization time of the cluster node consistent with the authorization time of the cluster master node in the previous round.
2. The unified management based cluster authorization method of claim 1, wherein the synchronizing the authorization time and authorization status of the cluster master node to the non-master nodes of the cluster comprises:
the authorization time and the authorization state of the cluster master node are synchronized to the non-master nodes of the cluster in a timing mode; and/or synchronizing the authorization time and the authorization state of the cluster master node to the non-master nodes of the cluster when the master node election process is carried out.
3. The unified management based cluster authorization method according to claim 1, wherein the method further comprises:
judging whether the cluster main node is transformed or not;
if so, synchronizing the authorization time and the authorization state of the transformed master node to other nodes of the cluster so that the authorization time and the authorization state of the other nodes are consistent with the transformed master node.
4. A cluster authorization apparatus based on unified management, the apparatus comprising:
the determining unit is used for determining a main node and a non-main node of the cluster;
a first synchronization unit, configured to synchronize the authorization time and the authorization status of the cluster master node to all other non-master nodes of the cluster, so that the authorization time and the authorization status of all other non-master nodes of the cluster are consistent with the cluster master node;
the determination unit includes:
the device comprises a judging subunit, a judging unit and a judging unit, wherein the judging subunit is used for judging whether a triggering condition of a cluster is generated, and the triggering condition comprises at least one of adding a new node into the cluster, exiting the cluster by the node and lease expiration of the cluster;
the determining subunit is used for determining the main node of the cluster through the main node election process if the triggering condition of the cluster is judged to be generated;
the device further comprises:
the detection unit is used for detecting whether the authorization time of the user to the cluster node is modified;
a second judging unit, configured to, if it is detected that the authorization time of the cluster node is modified by the user, judge whether the modified authorization time is consistent with the authorization time from the cluster master node to the cluster node in the previous round;
and the time determining unit is used for keeping the authorization time of the cluster node consistent with the authorization time of the cluster master node in the previous round if the modified authorization time is judged to be inconsistent with the authorization time from the cluster master node to the cluster node in the previous round.
5. The apparatus according to claim 4, wherein the first synchronization unit is specifically configured to:
the authorization time and the authorization state of the cluster master node are synchronized to the non-master nodes of the cluster in a timing mode; and/or synchronizing the authorization time and the authorization state of the cluster master node to the non-master nodes of the cluster when the master node election process is carried out.
6. The apparatus of claim 4, further comprising:
the first judgment unit is used for judging whether the cluster main node is changed or not;
and the second synchronization unit is used for synchronizing the authorization time and the authorization state of the transformed main node to other nodes of the cluster if the change of the main node of the cluster is judged, so that the authorization time and the authorization state of the other nodes are consistent with the changed main node.
CN201810990176.4A 2018-08-28 2018-08-28 Cluster authorization method and device based on unified management Active CN109088937B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810990176.4A CN109088937B (en) 2018-08-28 2018-08-28 Cluster authorization method and device based on unified management

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810990176.4A CN109088937B (en) 2018-08-28 2018-08-28 Cluster authorization method and device based on unified management

Publications (2)

Publication Number Publication Date
CN109088937A CN109088937A (en) 2018-12-25
CN109088937B true CN109088937B (en) 2021-10-26

Family

ID=64795043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810990176.4A Active CN109088937B (en) 2018-08-28 2018-08-28 Cluster authorization method and device based on unified management

Country Status (1)

Country Link
CN (1) CN109088937B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110708187A (en) * 2019-09-11 2020-01-17 上海爱数信息技术股份有限公司 Tape library management device and method supporting cluster
CN113612499B (en) * 2021-08-20 2022-09-16 河南辉煌科技股份有限公司 Method for realizing answering type two-way data acquisition

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468722A (en) * 2014-11-10 2015-03-25 四川川大智胜软件股份有限公司 Method for classified storage of training data in navigation management training system
CN106375342A (en) * 2016-10-21 2017-02-01 用友网络科技股份有限公司 Zookeeper-technology-based system cluster method and system
CN106534374A (en) * 2016-12-27 2017-03-22 郑州云海信息技术有限公司 Authorization management method of distributed storage system
CN107122630A (en) * 2017-04-26 2017-09-01 新华三技术有限公司 device authorization management method and device
CN108123851A (en) * 2017-12-29 2018-06-05 北京奇虎科技有限公司 The lifetime detection method and device of main and subordinate node synchronization link in distributed system
CN108234630A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 Method for reading data and device based on distributed consensus protocol realization

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6877043B2 (en) * 2000-04-07 2005-04-05 Broadcom Corporation Method for distributing sets of collision resolution parameters in a frame-based communications network
US8510267B2 (en) * 2011-03-08 2013-08-13 Rackspace Us, Inc. Synchronization of structured information repositories
CN107918085A (en) * 2017-11-09 2018-04-17 上海格蒂电力科技有限公司 A kind of power grid wide area real-time monitoring system and control method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468722A (en) * 2014-11-10 2015-03-25 四川川大智胜软件股份有限公司 Method for classified storage of training data in navigation management training system
CN106375342A (en) * 2016-10-21 2017-02-01 用友网络科技股份有限公司 Zookeeper-technology-based system cluster method and system
CN106534374A (en) * 2016-12-27 2017-03-22 郑州云海信息技术有限公司 Authorization management method of distributed storage system
CN107122630A (en) * 2017-04-26 2017-09-01 新华三技术有限公司 device authorization management method and device
CN108123851A (en) * 2017-12-29 2018-06-05 北京奇虎科技有限公司 The lifetime detection method and device of main and subordinate node synchronization link in distributed system
CN108234630A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 Method for reading data and device based on distributed consensus protocol realization

Also Published As

Publication number Publication date
CN109088937A (en) 2018-12-25

Similar Documents

Publication Publication Date Title
EP3279794B1 (en) Time-based node election method and apparatus
WO2019119212A1 (en) Method and device for identifying osd sub-health, and data storage system
CN108810100B (en) Method, device and equipment for electing master node
US8169856B2 (en) Time synchronization in cluster systems
CN105471622B (en) A kind of high availability method and system of the control node active-standby switch based on Galera
US8538923B2 (en) Method, node and system for controlling version in distributed system
US7814360B2 (en) Synchronizing cluster time to a master node with a faster clock
TWI677797B (en) Management method, system and equipment of master and backup database
CN109088937B (en) Cluster authorization method and device based on unified management
CN105069152B (en) data processing method and device
EP3528431A1 (en) Paxos protocol-based methods and apparatuses for online capacity expansion and reduction of distributed consistency system
CN109921942B (en) Cloud platform switching control method, device and system and electronic equipment
WO2023082800A1 (en) Main node selection method, distributed database and storage medium
CN111552701B (en) Method for determining data consistency in distributed cluster and distributed data system
CN111726388A (en) Cross-cluster high-availability implementation method, device, system and equipment
CN106533751B (en) SDN controller cluster merging method and device
CN110213359B (en) Internet of vehicles networking data pushing system and method based on D2D
CN110209526A (en) A kind of accumulation layer synchronization system and storage medium
CN111049886A (en) Multi-region SDN controller data synchronization method, server and system
US11347607B1 (en) Data storage cluster with witness node for selecting surviving storage node after replication failure
US20210326224A1 (en) Method and system for processing device failure
CN111010339B (en) Enterprise-level high-performance API service gateway design method
WO2019080386A1 (en) Network service management method and system
CN116455830A (en) Method for realizing high-availability distributed QOS of storage gateway
CN109032854B (en) Election request processing method and device, management node and storage medium

Legal Events

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