CN111708836B - Cluster management method, device and cluster system - Google Patents

Cluster management method, device and cluster system Download PDF

Info

Publication number
CN111708836B
CN111708836B CN202010496617.2A CN202010496617A CN111708836B CN 111708836 B CN111708836 B CN 111708836B CN 202010496617 A CN202010496617 A CN 202010496617A CN 111708836 B CN111708836 B CN 111708836B
Authority
CN
China
Prior art keywords
cluster
configuration file
file
synchronized
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
CN202010496617.2A
Other languages
Chinese (zh)
Other versions
CN111708836A (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.)
Beijing Skyguard Network Security Technology Co ltd
Original Assignee
Beijing Skyguard Network Security 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 Beijing Skyguard Network Security Technology Co ltd filed Critical Beijing Skyguard Network Security Technology Co ltd
Priority to CN202010496617.2A priority Critical patent/CN111708836B/en
Publication of CN111708836A publication Critical patent/CN111708836A/en
Application granted granted Critical
Publication of CN111708836B publication Critical patent/CN111708836B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a cluster management method, cluster management equipment and a cluster system, and relates to the technical field of computers. One embodiment of the method comprises the following steps: receiving a configuration file to be synchronized, which is uploaded by first cluster equipment in a cluster; storing the configuration file to be synchronized and generating file synchronization information; sending the file synchronization information to other devices in the cluster so that the other devices synchronize the stored configuration files according to the configuration files to be synchronized; the other devices refer to cluster devices in the cluster except the first cluster device. According to the embodiment, the configuration information of all cluster devices in the cluster is uniformly stored and managed, and after any cluster device in the cluster is received to-be-synchronized configuration file uploaded by the cluster device, the configuration file is automatically synchronized to other cluster devices in the cluster, so that manual operation can be avoided, complexity and workload of the cluster device configuration information consistency operation are greatly reduced, and efficiency and accuracy of the consistency operation are improved.

Description

Cluster management method, device and cluster system
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a cluster system for cluster management.
Background
In a multi-device cluster environment, configuration information is modified on a certain device in the cluster, the modified configuration information is recorded only on a specific device, and other devices cannot obtain the configuration information, so that the configuration information among the cluster devices is inconsistent. In the prior art, configuration information of each device in a cluster is always kept consistent by a manually modified configuration information consistency operation mode, and the operation is complex and the efficiency and accuracy are low.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a method, an apparatus, and a cluster system for cluster management, which uniformly store and manage configuration information of all cluster devices in a cluster, and automatically synchronize configuration files to be synchronized uploaded by any one cluster device in the cluster to other cluster devices in the cluster after receiving the configuration files, so that manual operations can be avoided, complexity and workload of the cluster device configuration information consistency operations are greatly reduced, and efficiency and accuracy of the consistency operations are improved.
To achieve the above object, according to one aspect of the embodiments of the present invention, there is provided a method for cluster management, including:
receiving a configuration file to be synchronized, which is uploaded by first cluster equipment in a cluster;
Storing the configuration file to be synchronized and generating file synchronization information;
sending the file synchronization information to other devices in the cluster so that the other devices synchronize the stored configuration files according to the configuration files to be synchronized;
the other devices refer to cluster devices in the cluster except the first cluster device.
Optionally, the file synchronization information includes: file version information of the configuration file to be synchronized; after sending the file synchronization information to other devices in the cluster, the method further comprises: receiving a file downloading request sent by other equipment, and sending a configuration file to be synchronized corresponding to the file downloading request to the other equipment;
the file downloading request is generated by the other equipment under the condition that the file version of the stored configuration file is not consistent with the file version information of the configuration file to be synchronized.
Optionally, after receiving the file downloading request sent by the other device, the method further includes:
and transmitting file verification information of the configuration file to be synchronized corresponding to the file downloading request to the other equipment, so that the other equipment verifies the configuration file to be synchronized according to the file verification information, and stores the configuration file to be synchronized and the file version information when verification passes.
Optionally, before receiving the configuration file to be synchronized uploaded by the first cluster device in the cluster, the method further includes: according to a file synchronization request of a user, screening a first cluster device from all cluster devices in a cluster to serve as a reference device, so that the reference device uploads a stored configuration file; the configuration file to be synchronized is the configuration file uploaded by the reference equipment.
Optionally, the method of the embodiment of the present invention further includes: after screening a first cluster device from all cluster devices in a cluster to serve as a reference device, responding to a lock acquisition request of the reference device, distributing a lock of the configuration file to be synchronized to the reference device, so that the reference device locks the configuration file to be synchronized before uploading the configuration file to be synchronized, and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized.
Optionally, the method of the embodiment of the present invention further includes: before receiving a configuration file to be synchronized uploaded by a first cluster device in a cluster, modifying the configuration file stored by the first cluster device according to a file modification request of a user so as to enable the first cluster device to store and upload the modified configuration file; the configuration file to be synchronized is a modified configuration file uploaded by the first cluster device.
Optionally, after modifying the configuration file stored by the first cluster device, the method further includes: the configuration file to be synchronized is locked before the first cluster equipment uploads the configuration file to be synchronized, and the configuration file to be synchronized is unlocked after the first cluster equipment uploads the configuration file to be synchronized; or, in response to a lock acquisition request of the first cluster device, distributing the lock of the configuration file to be synchronized for the first cluster device, so that the first cluster device locks the configuration file to be synchronized before uploading the configuration file to be synchronized, and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized.
Optionally, the method of the embodiment of the present invention further includes: determining a target configuration file from all the saved configuration files to be synchronized according to a file rollback request of a user, and generating file rollback information; and sending the file rollback information to all cluster devices in the cluster so as to enable all the cluster devices in the cluster to rollback the configuration file according to the target configuration file.
Optionally, the method of the embodiment of the present invention further includes: and responding to a progress query request of a user, and displaying the synchronization progress of the configuration file to be synchronized.
According to a second aspect of an embodiment of the present invention, there is provided a cluster management device, including: a file synchronization module and a file storage module; wherein,
the file synchronization module receives a configuration file to be synchronized, which is uploaded by first cluster equipment in a cluster; the file storage module stores the configuration file to be synchronized and generates file synchronization information; the file synchronization module sends the file synchronization information to other devices in the cluster so that the other devices synchronize the stored configuration files according to the configuration files to be synchronized;
the other devices refer to cluster devices in the cluster except the first cluster device.
Optionally, the file synchronization information includes: file version information of the configuration file to be synchronized;
the file synchronization module is further configured to: after the file synchronization information is sent to other devices in the cluster, receiving a file downloading request sent by the other devices, and sending a configuration file to be synchronized corresponding to the file downloading request to the other devices;
the file downloading request is generated by the other equipment under the condition that the file version of the stored configuration file is not consistent with the file version information of the configuration file to be synchronized.
Optionally, the file synchronization module is further configured to: after receiving the file downloading request sent by the other equipment, sending file verification information of the configuration file to be synchronized corresponding to the file downloading request to the other equipment, so that the other equipment verifies the configuration file to be synchronized according to the file verification information, and stores the configuration file to be synchronized and the file version information when verification passes.
Optionally, the cluster management device of the embodiment of the present invention further includes a user interaction module, configured to: before the file synchronization module receives a configuration file to be synchronized uploaded by a first cluster device in a cluster, the first cluster device is screened from all cluster devices in the cluster to serve as a reference device according to a file synchronization request of a user, so that the reference device uploads the stored configuration file; the configuration file to be synchronized is the configuration file uploaded by the reference equipment.
Optionally, the file synchronization module is further configured to: after the file receiving module screens a first cluster device from all cluster devices in a cluster to serve as a reference device, responding to a lock acquisition request of the reference device, distributing a lock of the configuration file to be synchronized to the reference device, so that the reference device locks the configuration file to be synchronized before uploading the configuration file to be synchronized, and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized.
Optionally, the cluster management device of the embodiment of the present invention further includes a user interaction module, configured to: before the file receiving module receives a configuration file to be synchronized uploaded by a first cluster device in a cluster, modifying the configuration file stored by the first cluster device according to a file modification request of a user so as to enable the first cluster device to store and upload the modified configuration file; the configuration file to be synchronized is a modified configuration file uploaded by the first cluster device.
Optionally, the file synchronization module is further configured to: after the user interaction module modifies the configuration file stored in the first cluster device, locking the configuration file to be synchronized before the first cluster device uploads the configuration file to be synchronized, and unlocking the configuration file to be synchronized after the first cluster device uploads the configuration file to be synchronized; or, in response to a lock acquisition request of the first cluster device, distributing the lock of the configuration file to be synchronized for the first cluster device, so that the first cluster device locks the configuration file to be synchronized before uploading the configuration file to be synchronized, and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized.
Optionally, the cluster management device of the embodiment of the present invention further includes a user interaction module, configured to: determining a target configuration file from all the saved configuration files to be synchronized according to a file rollback request of a user, and generating file rollback information;
the file synchronization module is further configured to: and sending the file rollback information to all cluster devices in the cluster so as to enable all the cluster devices in the cluster to rollback the configuration file according to the target configuration file.
Optionally, the cluster management device of the embodiment of the present invention further includes a user interaction module, configured to: and responding to a progress query request of a user, and displaying the synchronization progress of the configuration file to be synchronized.
According to a third aspect of an embodiment of the present invention, there is provided a cluster system, including: clustering and managing devices; wherein,
the first cluster device in the cluster uploads the configuration file to be synchronized to the management device;
the management device stores the configuration file to be synchronized, generates file synchronization information and sends the file synchronization information to other devices in the cluster;
the other devices synchronize the stored configuration files according to the configuration files to be synchronized;
The other devices refer to cluster devices in the cluster except the first cluster device.
Optionally, the file synchronization information includes: file version information of the configuration file to be synchronized;
after the management device sends the file synchronization information to other devices in the cluster, the other devices judge whether the file version of the stored configuration file is consistent with the file version information of the configuration file to be synchronized, and generate a file downloading request and send the file downloading request to the management device under the condition that the file version of the stored configuration file is inconsistent with the file version information of the configuration file to be synchronized;
the management device receives a file downloading request sent by the other device and sends a configuration file to be synchronized corresponding to the file downloading request to the other device;
and the other equipment synchronizes the stored configuration files according to the configuration files to be synchronized.
Optionally, after receiving the file downloading request sent by the other device, the management device sends file verification information of the configuration file to be synchronized corresponding to the file downloading request to the other device;
And the other equipment verifies the configuration file to be synchronized according to the file verification information, and stores the configuration file to be synchronized and the file version information when the verification passes.
Optionally, before receiving the configuration file to be synchronized uploaded by the first cluster device in the cluster, the management device screens the first cluster device from all cluster devices in the cluster as a reference device according to a file synchronization request of a user;
the reference device uploads the stored configuration file to the management device; the configuration file to be synchronized is the configuration file uploaded by the reference equipment.
Optionally, after screening the first cluster device from all cluster devices in the cluster to serve as a reference device, the management device responds to a lock acquisition request of the reference device and distributes the lock of the configuration file to be synchronized for the reference device;
and the reference equipment locks the configuration file to be synchronized before uploading the configuration file to be synchronized and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized.
Optionally, before receiving the configuration file to be synchronized uploaded by the first cluster device in the cluster, the management device modifies the configuration file stored by the first cluster device according to a file modification request of a user;
The first cluster equipment stores and uploads the modified configuration file; the configuration file to be synchronized is a modified configuration file uploaded by the first cluster device.
Optionally, after modifying the configuration file stored in the first cluster device, the management device locks the configuration file to be synchronized before the first cluster device uploads the configuration file to be synchronized, and unlocks the configuration file to be synchronized after the first cluster device uploads the configuration file to be synchronized; or after modifying the configuration file stored by the first cluster device, the first cluster device sends a lock acquisition request to the management device, and the management device responds to the lock acquisition request to allocate the lock of the configuration file to be synchronized to the first cluster device;
the first cluster device locks the configuration file to be synchronized before uploading the configuration file to be synchronized, and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized.
Optionally, the management device determines a target configuration file from the saved configuration files to be synchronized according to a file rollback request of a user, and generates file rollback information; transmitting the file rollback information to all cluster devices in the cluster;
And rolling back the configuration files according to the target configuration files by all the cluster devices in the cluster.
Optionally, the management device responds to a progress query request of a user and displays the synchronization progress of the configuration file to be synchronized.
According to a fourth aspect of embodiments of the present invention, there is provided a server for cluster management, comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method provided by the first aspect of the embodiments of the present invention.
According to a fifth aspect of embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program which when executed by a processor implements the method provided by the first aspect of embodiments of the present invention.
One embodiment of the above invention has the following advantages or benefits: by uniformly storing and managing the configuration information of all the cluster devices in the cluster and automatically synchronizing the configuration files to be synchronized, which are uploaded by any one cluster device in the cluster, to other cluster devices in the cluster after receiving the configuration files to be synchronized, manual operation can be avoided, complexity and workload of the cluster device configuration information consistency operation are greatly reduced, and efficiency and accuracy of the consistency operation are improved. And verifying the configuration file according to the file version information and the file verification information, so that the consistency of the configuration information of each cluster device in the cluster can be ensured, and the accuracy of the configuration information consistency operation is further improved. And the configuration files stored by the reference equipment are used as templates for synchronization, so that the consistency of the configuration information of each cluster equipment in the cluster can be efficiently and accurately ensured. Before each time the cluster equipment uploads the configuration file to be synchronized, the configuration file to be synchronized is locked, so that a plurality of cluster equipment can be prevented from operating one configuration file at the same time, and the consistency and accuracy of the configuration information of the whole cluster are improved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main components of a cluster system in accordance with an embodiment of the invention;
FIG. 2 is a schematic diagram of the main flow of a method of cluster management according to an embodiment of the invention;
FIG. 3 is a flow chart of a cluster tool synchronization profile in an alternative embodiment of the invention;
FIG. 4 is a flow chart of a modification profile in some embodiments of the invention;
FIG. 5 is a flow chart of a modification of a configuration file according to still other embodiments of the present invention;
fig. 6 is a schematic diagram of main modules of a cluster management device according to an embodiment of the invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 8 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The embodiment of the invention provides a cluster management method, cluster management equipment for realizing the method and a cluster system for the method. Fig. 1 is a schematic diagram of main components of a cluster system according to an embodiment of the present invention, and as shown in fig. 1, the cluster system includes a cluster and a cluster management device. The cluster management device provides the cluster management method of the embodiment of the invention, and is an execution subject of the cluster management method of the embodiment of the invention.
Fig. 2 is a schematic diagram of main flow of a cluster management method according to an embodiment of the present invention, as shown in fig. 1, where the cluster management method includes: step S201, step S202, and step S203.
In step S201, a configuration file to be synchronized uploaded by a first cluster device in a cluster is received. The cluster comprises two or more cluster devices, and the first cluster device is any cluster device in the cluster.
In some alternative embodiments, the first cluster device is a reference device selected when creating a cluster or performing a configuration information consistency operation on the cluster (an operation for keeping configuration information of individual cluster devices within the cluster consistent). Before receiving the configuration file to be synchronized uploaded by the first cluster device in the cluster, the method further comprises the following steps: screening a first cluster device from all cluster devices in the cluster to serve as a reference device according to a file synchronization request of a user, so that the reference device uploads a stored configuration file; the configuration file to be synchronized is the configuration file uploaded by the reference device. And selecting one reference device, and synchronizing other cluster devices in the cluster by taking the configuration files in the reference device as templates, so that the consistency of the configuration information of each cluster device in the whole cluster can be efficiently and accurately ensured.
Further, after the first cluster device is screened from all cluster devices in the cluster to serve as a reference device, a lock of the configuration file to be synchronized can be allocated to the reference device in response to a lock acquisition request of the reference device, so that the reference device locks the configuration file to be synchronized before uploading the configuration file to be synchronized, and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized.
The management device can record the lock state of each configuration file stored in the management device, including a locked state and an unlocked state, and the configuration file in the locked state can only be modified by the cluster device locked with the management device and cannot be modified by other cluster devices. After unlocking, other devices may modify the configuration file. In this embodiment, a lock is introduced, and the cluster device can modify the configuration file only after obtaining the lock of the configuration file, so that a situation that multiple cluster devices modify the same configuration file at the same time can be avoided, and accuracy of configuration information consistency operation is ensured.
In other alternative embodiments, the first cluster device is any cluster device within the cluster that is to modify configuration information of the cluster. Before receiving a configuration file to be synchronized uploaded by a first cluster device in a cluster, modifying the configuration file stored by the first cluster device according to a file modification request of a user so as to enable the first cluster device to store and upload the modified configuration file; the configuration file to be synchronized is a modified configuration file uploaded by the first cluster device.
After all other cluster devices in the cluster synchronize with the configuration file in the reference device as a template, the cluster device uploads the configuration file after modification to the management device no matter which cluster device locally stores the configuration file, and all other cluster devices in the cluster only need to download and update from the management device.
In this embodiment, the configuration file is modified in any cluster device in the cluster, and the modified configuration file is automatically synchronized to other cluster devices in the cluster through the management device, so that manual operation can be avoided, complexity and workload of the cluster device configuration information consistency operation are greatly reduced, and efficiency and accuracy of the configuration information consistency operation are improved.
Optionally, after modifying the configuration file stored by the first cluster device, the method further includes: the configuration file to be synchronized is locked before the first cluster equipment uploads the configuration file to be synchronized, and the configuration file to be synchronized is unlocked after the first cluster equipment uploads the configuration file to be synchronized; or, in response to a lock acquisition request of the first cluster device, distributing the lock of the configuration file to be synchronized for the first cluster device, so that the first cluster device locks the configuration file to be synchronized before uploading the configuration file to be synchronized, and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized.
FIG. 4 is a flow chart of a modification of a configuration file according to some embodiments of the invention. As shown in fig. 4, the method comprises the following steps: step S401, the management device modifies the configuration file A stored in the first cluster device according to the file modification request of the user; step S402, locking the configuration file A; step S403, the first cluster equipment uploads the modified configuration file A to the management equipment; step S404, the management device stores the modified configuration file A and records the file version information of the configuration file A. The management device can record the lock state of each stored configuration file, including a locked state and an unlocked state, and the configuration file in the locked state can only be modified by the corresponding cluster management device and cannot be modified by other cluster devices. For example, if the user modifies the configuration file a1 of the cluster device a through the management device, only the cluster device a can modify the configuration file a1 after the management device locks the configuration file a1, and other cluster devices cannot modify the configuration file a 1. After unlocking, other cluster devices may modify the configuration file a 1.
FIG. 5 is a flow chart of a modification of a configuration file according to still other embodiments of the present invention. As shown in fig. 5, the method comprises the following steps: step S501, the management device modifies the configuration file A stored in the first cluster device according to the file modification request of the user; step S502, a first cluster device sends a lock acquisition request to a management device; step S503, the management device is a lock of the first cluster device fragment configuration file A; step S504, the first management device locks the configuration file A, and then uploads the modified configuration file A to the management device; step S504, the management device stores the modified configuration file A and records the file version information of the configuration file A. The management device can record the lock state of each configuration file stored in the management device, including a locked state and an unlocked state, and the configuration file in the locked state can only be modified by the cluster device locked with the management device and cannot be modified by other cluster devices. For example, if the user modifies the configuration file a1 of the cluster device b through the management device, only the cluster device b may modify the configuration file a1 after the cluster device b locks the configuration file a1, and other cluster devices may not modify the configuration file a 1. After unlocking, other cluster devices may modify the configuration file a 1.
In this embodiment, a lock is introduced, and the cluster device can modify the configuration file only after obtaining the lock of the configuration file, so that a situation that multiple cluster devices modify the same configuration file at the same time can be avoided, and accuracy of configuration information consistency operation is ensured.
It should be noted that, when uploading the modified configuration file, only the incremental configuration file may be uploaded, or the full configuration file may be uploaded. For example, if only the first configuration information is modified, the configuration file C may be uploaded only by using the modified first configuration information as the configuration file to be synchronized, or may be uploaded by using the modified complete configuration file C as the configuration file to be synchronized. Of course, the delta configuration file and the full configuration file may also be uploaded at the same time. In the actual application process, for a certain version of configuration file, the incremental configuration file can be uploaded first, and then the configuration file including the certain version of configuration file and the corresponding whole of each incremental configuration file are uploaded as the configuration file to be synchronized periodically. Illustratively, the current file version of configuration file D is V2.0, which includes 10 pieces of configuration information. The user modifies the first piece of configuration information in the V2.0 version of configuration file D, and the modified first piece of configuration information is used as the configuration file to be synchronized for uploading; if the user modifies the second piece of configuration information in the V2.0 version of configuration file D again, uploading the modified second piece of configuration information serving as the configuration file to be synchronized; and uploading the V2.0 version of configuration file D and the whole of the configuration file to be synchronized corresponding to each modification as a new configuration file to be synchronized after several modifications or after a set time. In this way, resource consumption can be reduced.
In step S202, the configuration file to be synchronized is saved, and file synchronization information is generated. The file synchronization information includes a unique identification (e.g., file name, file code, etc.) of the file that uniquely represents one of the configuration files to be synchronized. In this step, all the configuration files to be synchronized are saved by the management device. When the configuration file to be synchronized is saved, the configuration file to be synchronized can be saved according to the name of the configuration file to be synchronized or renamed, and the file version information of the configuration file can be recorded at the same time. By recording the file version information of the configuration file, management of each version of the configuration file is facilitated, the history version evolution process of the configuration file is also facilitated to be checked, and version rollback is performed on the configuration file when needed. By recording the file size, the unique file identification, the file verification information and the like of the configuration file to be synchronized, the cluster equipment can conveniently verify the configuration file to be synchronized after downloading the configuration file to be synchronized, so that the correctness and the integrity of the downloaded configuration file to be synchronized are ensured.
In step S203, the file synchronization information is sent to other devices in the cluster, so that the other devices synchronize their stored configuration files according to the configuration files to be synchronized. The other devices refer to cluster devices except the first cluster device in the cluster. By uniformly storing and managing the configuration information of all the cluster devices in the cluster and automatically synchronizing the configuration files to be synchronized, which are uploaded by any one cluster device in the cluster, to other cluster devices in the cluster after receiving the configuration files to be synchronized, manual operation can be avoided, complexity and workload of the cluster device configuration information consistency operation are greatly reduced, and efficiency and accuracy of the consistency operation are improved.
In some alternative embodiments, the file synchronization information includes: file version information of the configuration file to be synchronized; after sending the file synchronization information to other devices in the cluster, the method further comprises: receiving a file downloading request sent by other equipment, and sending a configuration file to be synchronized corresponding to the file downloading request to the other equipment; the file download request is generated by the other device in case that the file version of the configuration file stored by the other device is not consistent with the file version information of the configuration file to be synchronized.
After receiving the file downloading request sent by the other device, the method may further include: and transmitting the file verification information of the configuration file to be synchronized corresponding to the file downloading request to the other equipment, so that the other equipment verifies the configuration file to be synchronized according to the file verification information, and stores the configuration file to be synchronized and the file version information when the verification passes.
Fig. 3 is a schematic flow chart of a cluster device synchronization profile in an alternative embodiment of the present invention, and as shown in fig. 3, the flow chart of the cluster device synchronization profile includes:
step S301, receiving file synchronization information comprising file version information of a configuration file to be synchronized;
step S302, judging whether the file version of the locally stored configuration file is consistent with the file version information of the configuration file to be synchronized; if yes, indicating that the locally stored configuration file is the latest version, and ending the flow; if not, jumping to step S303;
step S303, generating a downloading request and sending the downloading request to the management equipment;
step S303, receiving a configuration file to be synchronized corresponding to a file downloading request returned by the management equipment;
step S305, the configuration file to be synchronized is applied to the local area, and the file version of the configuration file stored locally is updated.
By verifying the file version information of the configuration files to be synchronized before downloading, the configuration files of the latest version can be downloaded and applied in time when the configuration files locally stored in a certain cluster device are not the latest version, and resource consumption caused by repeated downloading of the configuration files of the latest version from the management device when the configuration files locally stored in the cluster device are the latest version can be avoided.
After the configuration file of the latest version is downloaded, the downloaded configuration file is verified according to the file verification information, so that the correctness and the integrity of the downloaded configuration file can be ensured, and the accuracy of the configuration information consistency operation is further improved. The file verification information may be a file size, MD5 (Message Digest Algorithm MD5, fifth version of the message digest algorithm) value of the file, etc.
Optionally, the method of the embodiment of the present invention further includes: determining a target configuration file from all the saved configuration files to be synchronized according to a file rollback request of a user, and generating file rollback information; and sending the file rollback information to all cluster devices in the cluster so as to enable all the cluster devices in the cluster to rollback the configuration file according to the target configuration file.
Illustratively, suppose that profile B maintained in the management device includes three versions, denoted V1.0, V2.0, and V3.0, respectively, and the version of profile B for which the current cluster is used is V3.0. If the user gives up the configuration file B in the V3.0 version, the configuration file B in the V2.0 version may be used as a target configuration file, and file rollback information may be generated and sent to all cluster devices in the cluster, so that all cluster devices in the cluster rollback the version of the configuration file B to the V2.0 version.
Optionally, the method of the embodiment of the present invention further includes: and responding to a progress query request of a user, and displaying the synchronization progress of the configuration file to be synchronized. Through inquiry operation, the user can conveniently know the information such as the synchronous progress of the configuration information. It should be noted that, when the management device stores the file version information, the file size, and the like of the configuration file, the information such as the history version evolution condition of the configuration file may be queried.
The method for cluster management according to the embodiment of the present invention is described in the following by way of example with reference to a specific application scenario. In this example, the cluster system includes a cluster and a cluster management device, where the cluster management device is an execution body for implementing the method of cluster management according to the embodiment of the present invention. The cluster comprises a plurality of cluster devices, and the cluster devices acquire information of a certain configuration file from the management device, wherein the information comprises information such as a lock state of the configuration file, file version information, the size of the file, MD5 and the like. The cluster device acquires a lock of a certain file of the management device, and if other devices lock the configuration file, the configuration file is not allowed to be locked again. After a cluster device acquires a lock of a configuration file, operations such as modifying and uploading the configuration file can be performed. The cluster device can release the lock of the configuration file locked by the cluster device, and other cluster devices can modify, upload and the like the configuration file after releasing the lock. And automatically releasing the lock after the configuration file is successfully uploaded, wherein the version of the configuration file is +1. The management device notifies all devices in the cluster when the version of the configuration file changes, so that the devices in the cluster know that the new version exists. The cluster equipment downloads the configuration file of the corresponding version from the management equipment, and verifies the integrity of the configuration file according to the MD5 value provided by the management equipment.
The cluster equipment periodically acquires information of a certain file from the management equipment, compares the file version of the local configuration file with the file version of the management equipment, and sends a request to the management equipment to download the latest configuration file when the local configuration file is inconsistent with the file version of the management equipment. And after downloading, checking the integrity of the configuration file according to the MD5 value provided by the management equipment.
If the user wants to discard the newly modified configuration information, the user can find the configuration information of the previous version according to the version information of the file recorded in the management device and roll back the version. The management device can inquire the configuration information version of the cluster device and know the synchronization condition of the cluster device.
The specific implementation steps comprise:
(1) On the cluster management equipment, cluster equipment for constructing a cluster is selected through a management interface, and a cluster of reference equipment components which are synchronized for the first time is selected.
(2) The reference device obtains locks for all configuration files from the management device and uploads all configuration files stored locally to the management device.
(3) After uploading the configuration file, the reference device changes the version number of the corresponding configuration file on the management device and unlocks the file, and meanwhile, the information of the configuration file change, namely file synchronization information (including unique identification of the file, version information of the file and size of the file) is notified (a webservice request is sent to the cluster device).
(4) When the cluster equipment receives the file synchronization information, comparing the file synchronization information with a local file version, if the file synchronization information is inconsistent, requesting the latest configuration file from the management equipment, then applying the latest configuration file to the local, and updating the file version of the locally stored configuration file.
(5) An administrator can modify the configuration file of a certain cluster device at the management platform, and lock the corresponding configuration file after modification. The cluster device discovers that the configuration information of the cluster device is manually modified, automatically triggers an upload operation, uploads the modified configuration file to the management device, generates a new file version after the management device receives the modified configuration file, unlocks the configuration file and notifies other cluster devices to enable the other cluster devices to synchronize the configuration file.
(6) An administrator can modify the configuration file of a certain cluster device at the management platform, and the corresponding configuration file is not locked after modification. The cluster device discovers that the configuration file of the cluster device is modified to request the lock of the configuration file from the management device, the cluster device uploads the modified configuration file, the management device generates a new file version after receiving the modified configuration file, unlocks the configuration file and informs other cluster devices.
(7) The administrator can check the historical configuration information on the management platform, roll back the configuration file, change the version after the roll back, reset the lock state (the state comprises a locked state and an unlocked state, and the reset is changed into the unlocked state) of the configuration file and inform each cluster device.
(8) The cluster equipment periodically polls the file version information of the management equipment, compares the file version information with the file version of the corresponding configuration file stored locally after acquiring the file version information, downloads the update from the management equipment if inconsistent conditions occur, and prevents the cluster equipment from not updating due to failure notification of the management equipment when connection is not smooth.
(9) The management platform can inquire (the management device and the cluster device can communicate with each other, and the version of each file of the device can be inquired, and the provided interface can be a full-volume interface for returning all versions or a non-full-volume interface for inquiring the version of a certain file).
According to the embodiment of the invention, after the cluster is established, one reference device is selected, and other devices are synchronized by taking the reference device as a template, so that the consistency of the configuration information of each cluster device in the cluster can be ensured, and when the configuration file of the cluster device is subsequently modified, the modified configuration file is uploaded to the management device, and the other devices only need to be updated in the management device, so that the complexity of the configuration information consistency operation is greatly reduced. Since a large number of configuration files are not required to be manually modified for consistency, labor can be saved, and thus the workload of configuration information consistency operation can be reduced. The manual operation has a plurality of uncertainties, and the embodiment of the invention verifies the configuration file according to the file version information and the file verification information, so that the configuration information of each device is consistent, and the accuracy of the consistency operation of the configuration information is improved. By inquiring the content of the previous configuration file, the previous configuration file can be known, version change can be seen, misoperation is prevented, meanwhile, the file version of the configuration file of the cluster equipment can be seen, the synchronous condition of each equipment can be known, and the safety of the system is improved. When the configuration information of the equipment is wrong, the rollback of the configuration file can be conveniently carried out, and the flexibility of the system is improved. The configuration file is locked before uploading, so that the synchronous operation can be prevented from covering the data, and the accuracy of the data is improved.
According to a second aspect of the embodiment of the present invention, a cluster management device implementing the above method is provided.
Fig. 6 is a schematic diagram of main modules of a cluster management device according to an embodiment of the present invention, and as shown in fig. 6, a cluster management device 600 includes: a file synchronization module 601 and a file save module 602; wherein,
the file synchronization module 601 receives a configuration file to be synchronized, which is uploaded by a first cluster device in a cluster; the file saving module 602 saves the configuration file to be synchronized and generates file synchronization information; the file synchronization module 601 sends the file synchronization information to other devices in the cluster, so that the other devices synchronize the stored configuration files according to the configuration files to be synchronized; the other devices refer to cluster devices in the cluster except the first cluster device.
Optionally, the file synchronization information includes: file version information of the configuration file to be synchronized;
the file synchronization module is further configured to: after the file synchronization information is sent to other devices in the cluster, receiving a file downloading request sent by the other devices, and sending a configuration file to be synchronized corresponding to the file downloading request to the other devices;
The file downloading request is generated by the other equipment under the condition that the file version of the stored configuration file is not consistent with the file version information of the configuration file to be synchronized.
Optionally, the file synchronization module is further configured to: after receiving the file downloading request sent by the other equipment, sending file verification information of the configuration file to be synchronized corresponding to the file downloading request to the other equipment, so that the other equipment verifies the configuration file to be synchronized according to the file verification information, and stores the configuration file to be synchronized and the file version information when verification passes.
Optionally, the cluster management device 600 of the embodiment of the present invention further includes a user interaction module 603, configured to: before the file synchronization module receives a configuration file to be synchronized uploaded by a first cluster device in a cluster, the first cluster device is screened from all cluster devices in the cluster to serve as a reference device according to a file synchronization request of a user, so that the reference device uploads the stored configuration file; the configuration file to be synchronized is the configuration file uploaded by the reference equipment.
Optionally, the file synchronization module is further configured to: after the file receiving module screens a first cluster device from all cluster devices in a cluster to serve as a reference device, responding to a lock acquisition request of the reference device, distributing a lock of the configuration file to be synchronized to the reference device, so that the reference device locks the configuration file to be synchronized before uploading the configuration file to be synchronized, and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized.
Optionally, the cluster management device 600 of the embodiment of the present invention further includes a user interaction module 603, configured to: before the file receiving module receives a configuration file to be synchronized uploaded by a first cluster device in a cluster, modifying the configuration file stored by the first cluster device according to a file modification request of a user so as to enable the first cluster device to store and upload the modified configuration file; the configuration file to be synchronized is a modified configuration file uploaded by the first cluster device.
Optionally, the file synchronization module is further configured to: after the user interaction module modifies the configuration file stored in the first cluster device, locking the configuration file to be synchronized before the first cluster device uploads the configuration file to be synchronized, and unlocking the configuration file to be synchronized after the first cluster device uploads the configuration file to be synchronized; or, in response to a lock acquisition request of the first cluster device, distributing the lock of the configuration file to be synchronized for the first cluster device, so that the first cluster device locks the configuration file to be synchronized before uploading the configuration file to be synchronized, and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized.
Optionally, the cluster management device 600 of the embodiment of the present invention further includes a user interaction module 603, configured to: determining a target configuration file from all the saved configuration files to be synchronized according to a file rollback request of a user, and generating file rollback information;
the file synchronization module is further configured to: and sending the file rollback information to all cluster devices in the cluster so as to enable all the cluster devices in the cluster to rollback the configuration file according to the target configuration file.
Optionally, the cluster management device of the embodiment of the present invention further includes a user interaction module, configured to: and responding to a progress query request of a user, and displaying the synchronization progress of the configuration file to be synchronized.
According to a third aspect of an embodiment of the present invention, there is provided a cluster system, including: clustering and managing devices; wherein,
the first cluster device in the cluster uploads the configuration file to be synchronized to the management device;
the management device stores the configuration file to be synchronized, generates file synchronization information and sends the file synchronization information to other devices in the cluster;
the other devices synchronize the stored configuration files according to the configuration files to be synchronized;
The other devices refer to cluster devices in the cluster except the first cluster device.
Optionally, the file synchronization information includes: file version information of the configuration file to be synchronized;
after the management device sends the file synchronization information to other devices in the cluster, the other devices judge whether the file version of the stored configuration file is consistent with the file version information of the configuration file to be synchronized, and generate a file downloading request and send the file downloading request to the management device under the condition that the file version of the stored configuration file is inconsistent with the file version information of the configuration file to be synchronized;
the management device receives a file downloading request sent by the other device and sends a configuration file to be synchronized corresponding to the file downloading request to the other device;
and the other equipment synchronizes the stored configuration files according to the configuration files to be synchronized.
Optionally, after receiving the file downloading request sent by the other device, the management device sends file verification information of the configuration file to be synchronized corresponding to the file downloading request to the other device;
And the other equipment verifies the configuration file to be synchronized according to the file verification information, and stores the configuration file to be synchronized and the file version information when the verification passes.
Optionally, before receiving the configuration file to be synchronized uploaded by the first cluster device in the cluster, the management device screens the first cluster device from all cluster devices in the cluster as a reference device according to a file synchronization request of a user;
the reference device uploads the stored configuration file to the management device; the configuration file to be synchronized is the configuration file uploaded by the reference equipment.
Optionally, after screening the first cluster device from all cluster devices in the cluster to serve as a reference device, the management device responds to a lock acquisition request of the reference device and distributes the lock of the configuration file to be synchronized for the reference device;
and the reference equipment locks the configuration file to be synchronized before uploading the configuration file to be synchronized and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized.
Optionally, before receiving the configuration file to be synchronized uploaded by the first cluster device in the cluster, the management device modifies the configuration file stored by the first cluster device according to a file modification request of a user;
The first cluster equipment stores and uploads the modified configuration file; the configuration file to be synchronized is a modified configuration file uploaded by the first cluster device.
Optionally, after modifying the configuration file stored in the first cluster device, the management device locks the configuration file to be synchronized before the first cluster device uploads the configuration file to be synchronized, and unlocks the configuration file to be synchronized after the first cluster device uploads the configuration file to be synchronized; or after modifying the configuration file stored by the first cluster device, the first cluster device sends a lock acquisition request to the management device, and the management device responds to the lock acquisition request to allocate the lock of the configuration file to be synchronized to the first cluster device;
the first cluster device locks the configuration file to be synchronized before uploading the configuration file to be synchronized, and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized.
Optionally, the management device determines a target configuration file from the saved configuration files to be synchronized according to a file rollback request of a user, and generates file rollback information; transmitting the file rollback information to all cluster devices in the cluster; and rolling back the configuration files according to the target configuration files by all the cluster devices in the cluster.
Optionally, the management device responds to a progress query request of a user and displays the synchronization progress of the configuration file to be synchronized.
According to a fourth aspect of embodiments of the present invention, there is provided a server for cluster management, comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method provided by the first aspect of the embodiments of the present invention.
According to a fifth aspect of embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program which when executed by a processor implements the method provided by the first aspect of embodiments of the present invention.
Fig. 7 illustrates an exemplary system architecture 700 of a cluster management method or cluster management device to which embodiments of the invention may be applied.
As shown in fig. 7, a system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 is the medium used to provide communication links between the terminal devices 701, 702, 703 and the server 705. The network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 705 via the network 704 using the terminal devices 701, 702, 703 to receive or send messages or the like. Various communication client applications such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 701, 702, 703.
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server (by way of example only) providing support for shopping-type websites browsed by users using the terminal devices 701, 702, 703. The background management server may analyze and process the received data such as the product information query request, and feedback the processing result (e.g., the target push information, the product information—only an example) to the terminal device.
It should be noted that, the method for cluster management provided in the embodiment of the present invention is generally executed by the server 705, and accordingly, the cluster management device is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, there is illustrated a schematic diagram of a computer system 800 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU) 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 801.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor comprising: and the file synchronization module and the file storage module are used for storing the files. The names of these modules do not in any way limit the module itself, for example, a file synchronization module may also be described as a "module that holds a configuration file to be synchronized".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: receiving a configuration file to be synchronized, which is uploaded by first cluster equipment in a cluster; storing the configuration file to be synchronized and generating file synchronization information; sending the file synchronization information to other devices in the cluster so that the other devices synchronize the stored configuration files according to the configuration files to be synchronized; the other devices refer to cluster devices in the cluster except the first cluster device.
According to the technical scheme of the embodiment of the invention, the configuration information of all cluster devices in the cluster is uniformly stored and managed, and the configuration file to be synchronized uploaded by any cluster device in the cluster is automatically synchronized to other cluster devices in the cluster after being received, so that manual operation can be avoided, complexity and workload of the cluster device configuration information consistency operation are greatly reduced, and efficiency and accuracy of the consistency operation are improved. And verifying the configuration file according to the file version information and the file verification information, so that the consistency of the configuration information of each cluster device in the cluster can be ensured, and the accuracy of the configuration information consistency operation is further improved. And the configuration files stored by the reference equipment are used as templates for synchronization, so that the consistency of the configuration information of each cluster equipment in the cluster can be efficiently and accurately ensured. Before each time the cluster equipment uploads the configuration file to be synchronized, the configuration file to be synchronized is locked, so that a plurality of cluster equipment can be prevented from operating one configuration file at the same time, and the consistency and accuracy of the configuration information of the whole cluster are improved.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (11)

1. A method of cluster management, comprising:
receiving a configuration file to be synchronized, which is uploaded by first cluster equipment in a cluster;
storing the configuration file to be synchronized and generating file synchronization information;
sending the file synchronization information to other devices in the cluster so that the other devices synchronize the stored configuration files according to the configuration files to be synchronized;
the other devices refer to cluster devices except the first cluster device in the cluster;
before receiving the configuration file to be synchronized uploaded by the first cluster device in the cluster, the method further comprises the following steps: according to a file synchronization request of a user, screening a first cluster device from all cluster devices in a cluster to serve as a reference device, so that the reference device uploads a stored configuration file; the configuration file to be synchronized is a configuration file uploaded by the reference equipment;
After screening the first cluster device from all cluster devices in the cluster to serve as a reference device, the method further comprises the following steps: responding to a lock acquisition request of the reference equipment, distributing a lock of the configuration file to be synchronized for the reference equipment, so that the reference equipment locks the configuration file to be synchronized before uploading the configuration file to be synchronized and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized;
the method further comprises the steps of: recording the lock state of each stored configuration file, wherein the lock state comprises a locked state and an unlocked state, and the configuration file in the locked state can only be modified by the cluster equipment locked with the configuration file and cannot be modified by other cluster equipment; after unlocking, other devices may modify the configuration file.
2. The method of claim 1, wherein the file synchronization information comprises: file version information of the configuration file to be synchronized;
after sending the file synchronization information to other devices in the cluster, the method further comprises: receiving a file downloading request sent by other equipment, and sending a configuration file to be synchronized corresponding to the file downloading request to the other equipment;
The file downloading request is generated by the other equipment under the condition that the file version of the stored configuration file is not consistent with the file version information of the configuration file to be synchronized.
3. The method of claim 2, further comprising, after receiving the file download request sent by the other device:
and transmitting file verification information of the configuration file to be synchronized corresponding to the file downloading request to the other equipment, so that the other equipment verifies the configuration file to be synchronized according to the file verification information, and stores the configuration file to be synchronized and the file version information when verification passes.
4. A method according to any of claims 1-3, further comprising, prior to receiving the configuration file to be synchronized uploaded by the first cluster device in the cluster: modifying the configuration file stored by the first cluster equipment according to the file modification request of the user so as to enable the first cluster equipment to store and upload the modified configuration file; the configuration file to be synchronized is a modified configuration file uploaded by the first cluster device.
5. The method of claim 4, wherein after modifying the configuration file stored by the first cluster device, further comprising: the configuration file to be synchronized is locked before the first cluster equipment uploads the configuration file to be synchronized, and the configuration file to be synchronized is unlocked after the first cluster equipment uploads the configuration file to be synchronized; or, in response to a lock acquisition request of the first cluster device, distributing the lock of the configuration file to be synchronized for the first cluster device, so that the first cluster device locks the configuration file to be synchronized before uploading the configuration file to be synchronized, and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized.
6. A method according to any one of claims 1-3, further comprising:
determining a target configuration file from all the saved configuration files to be synchronized according to a file rollback request of a user, and generating file rollback information; and sending the file rollback information to all cluster devices in the cluster so as to enable all the cluster devices in the cluster to rollback the configuration file according to the target configuration file.
7. A method according to any one of claims 1-3, further comprising: and responding to a progress query request of a user, and displaying the synchronization progress of the configuration file to be synchronized.
8. A cluster management device, comprising: a file synchronization module and a file storage module; wherein,
the file synchronization module receives a configuration file to be synchronized, which is uploaded by first cluster equipment in a cluster; the file storage module stores the configuration file to be synchronized and generates file synchronization information; the file synchronization module sends the file synchronization information to other devices in the cluster so that the other devices synchronize the stored configuration files according to the configuration files to be synchronized;
the other devices refer to cluster devices except the first cluster device in the cluster;
The cluster management device further comprises a user interaction module for: before the file synchronization module receives the configuration file to be synchronized uploaded by the first cluster device in the cluster, the file synchronization module further comprises: according to a file synchronization request of a user, screening a first cluster device from all cluster devices in a cluster to serve as a reference device, so that the reference device uploads a stored configuration file; the configuration file to be synchronized is a configuration file uploaded by the reference equipment;
the file synchronization module is further configured to: after the user interaction module screens a first cluster device from all cluster devices in a cluster to serve as a reference device, responding to a lock acquisition request of the reference device, distributing a lock of the configuration file to be synchronized for the reference device, so that the reference device locks the configuration file to be synchronized before uploading the configuration file to be synchronized, and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized;
the cluster management device is further configured to: recording the lock state of each stored configuration file, wherein the lock state comprises a locked state and an unlocked state, and the configuration file in the locked state can only be modified by the cluster equipment locked with the configuration file and cannot be modified by other cluster equipment; after unlocking, other devices may modify the configuration file.
9. A cluster system, comprising: clustering and managing devices; wherein,
the first cluster device in the cluster uploads the configuration file to be synchronized to the management device;
the management device stores the configuration file to be synchronized, generates file synchronization information and sends the file synchronization information to other devices in the cluster;
the other devices synchronize the stored configuration files according to the configuration files to be synchronized;
the other devices refer to cluster devices except the first cluster device in the cluster;
before receiving a configuration file to be synchronized uploaded by a first cluster device in a cluster, the management device screens the first cluster device from all cluster devices in the cluster as a reference device according to a file synchronization request of a user; the reference device uploads the stored configuration file to the management device; the configuration file to be synchronized is a configuration file uploaded by the reference equipment;
after screening a first cluster device from all cluster devices in a cluster to serve as a reference device, the management device responds to a lock acquisition request of the reference device and distributes the locks of the configuration files to be synchronized for the reference device; the reference device locks the configuration file to be synchronized before uploading the configuration file to be synchronized, and unlocks the configuration file to be synchronized after uploading the configuration file to be synchronized;
The management device is further configured to: recording the lock state of each stored configuration file, wherein the lock state comprises a locked state and an unlocked state, and the configuration file in the locked state can only be modified by the cluster equipment locked with the configuration file and cannot be modified by other cluster equipment; after unlocking, other devices may modify the configuration file.
10. A server for cluster management, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
11. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202010496617.2A 2020-06-03 2020-06-03 Cluster management method, device and cluster system Active CN111708836B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010496617.2A CN111708836B (en) 2020-06-03 2020-06-03 Cluster management method, device and cluster system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010496617.2A CN111708836B (en) 2020-06-03 2020-06-03 Cluster management method, device and cluster system

Publications (2)

Publication Number Publication Date
CN111708836A CN111708836A (en) 2020-09-25
CN111708836B true CN111708836B (en) 2024-03-22

Family

ID=72539244

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010496617.2A Active CN111708836B (en) 2020-06-03 2020-06-03 Cluster management method, device and cluster system

Country Status (1)

Country Link
CN (1) CN111708836B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113722007B (en) * 2021-08-24 2023-11-03 杭州迪普科技股份有限公司 Configuration method, device and system of VPN branch equipment
CN114116672B (en) * 2021-11-30 2022-11-08 智慧足迹数据科技有限公司 Data synchronization method and related device
CN116955015B (en) * 2023-09-19 2024-01-23 恒生电子股份有限公司 Data backup system and method based on data storage service

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516529A (en) * 2012-06-20 2014-01-15 中兴通讯股份有限公司 Management method, device and system of configuration files
CN109413127A (en) * 2017-08-18 2019-03-01 北京京东尚科信息技术有限公司 A kind of method of data synchronization and device
CN109542865A (en) * 2018-12-03 2019-03-29 郑州云海信息技术有限公司 Distributed cluster system configuration file synchronous method, device, system and medium
CN110138588A (en) * 2019-04-04 2019-08-16 微梦创科网络科技(中国)有限公司 Configuration file automatic management method and system, configuration management platform and client

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10860226B2 (en) * 2018-04-27 2020-12-08 EMC IP Holding Company LLC Systems and methods of synchronizing configuration information in a clustered storage environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516529A (en) * 2012-06-20 2014-01-15 中兴通讯股份有限公司 Management method, device and system of configuration files
CN109413127A (en) * 2017-08-18 2019-03-01 北京京东尚科信息技术有限公司 A kind of method of data synchronization and device
CN109542865A (en) * 2018-12-03 2019-03-29 郑州云海信息技术有限公司 Distributed cluster system configuration file synchronous method, device, system and medium
CN110138588A (en) * 2019-04-04 2019-08-16 微梦创科网络科技(中国)有限公司 Configuration file automatic management method and system, configuration management platform and client

Also Published As

Publication number Publication date
CN111708836A (en) 2020-09-25

Similar Documents

Publication Publication Date Title
CN111708836B (en) Cluster management method, device and cluster system
CN109120678B (en) Method and apparatus for service hosting of distributed storage system
CN107666525B (en) Method and device for IP allocation of cluster container
US9077544B2 (en) Automatic provisioning of authentication credentials
CN112860451A (en) Multi-tenant data processing method and device based on SaaS
WO2013128331A1 (en) On-demand file synchronization
CN110895603B (en) Multi-system account information integration method and device
CN110162334B (en) Code management method, device and storage medium
CN111800468A (en) Cloud-based multi-cluster management method, device, medium and electronic equipment
CN111782235A (en) Data upgrading and querying method and device
CN111666079B (en) Method, apparatus, system, device and computer readable medium for software upgrade
CN110324384B (en) Data pushing method and device
CN110795495A (en) Data processing method and device, electronic equipment and computer readable medium
CN113296828A (en) Method, server and system for issuing application
CN116737662A (en) Method, device, electronic equipment and storage medium for processing business data
CN111984686A (en) Data processing method and device
CN109144991B (en) Method and device for dynamic sub-metering, electronic equipment and computer-storable medium
US10776134B2 (en) Management of application properties
CN114385570A (en) Data synchronization method and device, electronic equipment and readable medium
CN111596933A (en) File processing method and device, electronic equipment and computer readable storage medium
CN113535221A (en) Method and device for managing application version
CN112860505A (en) Method and device for regulating and controlling distributed clusters
CN113765688B (en) Proprietary cloud platform management method and system and proprietary cloud platform
JP6579898B2 (en) Information processing system, information processing apparatus control method, and program
US10917468B2 (en) Systems and methods of re-associating content items

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