Nothing Special   »   [go: up one dir, main page]

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

Cluster management method, device and cluster system Download PDF

Info

Publication number
CN111708836A
CN111708836A CN202010496617.2A CN202010496617A CN111708836A CN 111708836 A CN111708836 A CN 111708836A CN 202010496617 A CN202010496617 A CN 202010496617A CN 111708836 A CN111708836 A CN 111708836A
Authority
CN
China
Prior art keywords
cluster
file
synchronized
configuration file
equipment
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.)
Granted
Application number
CN202010496617.2A
Other languages
Chinese (zh)
Other versions
CN111708836B (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

Images

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: receiving a configuration file to be synchronized 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 equipment in the cluster so that the other equipment synchronizes the configuration files stored by the other equipment according to the configuration files to be synchronized; wherein the other devices refer to cluster devices in the cluster except the first cluster device. The embodiment uniformly stores and manages the configuration information of all cluster equipment in the cluster, and automatically synchronizes the configuration information to be synchronized to other cluster equipment in the cluster after receiving the configuration file to be synchronized uploaded by any one cluster equipment in the cluster, so that manual operation can be avoided, the complexity and the workload of consistent operation of the configuration information of the cluster equipment are greatly reduced, and the efficiency and the accuracy of the consistent 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 cluster management method, a cluster management device, and a cluster system.
Background
In a multi-device cluster environment, configuration information is modified on a certain device in a 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 kept consistent by a manually modified configuration information consistency operation mode, so that the operation is complex, and the efficiency and the accuracy are low.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, a device, and a cluster system for cluster management, which uniformly store and manage configuration information of all cluster devices in a cluster, and automatically synchronize a configuration file to be synchronized, uploaded by any one of the cluster devices in the cluster, to other cluster devices in the cluster after receiving the configuration file, so as to avoid manual operation, greatly reduce complexity and workload of consistent operation of configuration information of the cluster devices, and improve efficiency and accuracy of the consistent operation.
To achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a cluster management method, including:
receiving a configuration file to be synchronized 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 equipment in the cluster so that the other equipment synchronizes the configuration files stored by the other equipment according to the configuration files to be synchronized;
wherein 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 includes: receiving a file downloading request sent by the 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 configuration file stored by the other equipment is not consistent with the file version information of the configuration file to be synchronized.
Optionally, after receiving the file download request sent by the other device, the method further includes:
and 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 the configuration file to be synchronized passes the verification.
Optionally, before receiving the configuration file to be synchronized uploaded by the first cluster device in the cluster, the method further includes: screening first cluster equipment from all cluster equipment in a cluster as reference equipment according to a file synchronization request of a user so as to enable the reference equipment to upload a configuration file stored in the reference equipment; 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 first cluster equipment from all cluster equipment in a cluster as reference equipment, responding to a lock acquisition request of the reference equipment, and allocating a lock of the configuration file to be synchronized to 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.
Optionally, the method of the embodiment of the present invention further includes: before receiving a configuration file to be synchronized uploaded by first cluster equipment in a cluster, modifying the configuration file stored by the first cluster equipment according to a file modification request of a user so that the modified configuration file is stored and uploaded by the first cluster equipment; 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 method further includes: the method comprises the steps that a configuration file to be synchronized is locked before the configuration file to be synchronized is uploaded by first cluster equipment, and the configuration file to be synchronized is unlocked after the configuration file to be synchronized is uploaded by the first cluster equipment; or responding to a lock acquisition request of the first cluster device, and allocating a lock of the configuration file to be synchronized to 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: according to a file rollback request of a user, determining a target configuration file from all stored configuration files to be synchronized, and generating file rollback information; and sending the file rollback information to all cluster equipment in the cluster so as to enable all cluster equipment in the cluster to perform configuration file rollback according to the target configuration file.
Optionally, the method of the embodiment of the present invention further includes: and responding to a progress inquiry request of a user, and displaying the synchronization progress of the configuration files to be synchronized.
According to a second aspect of the embodiments of the present invention, there is provided a cluster management device, including: the file synchronization module and the file storage module; wherein,
the file synchronization module receives a configuration file to be synchronized 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 equipment in the cluster so that the other equipment synchronizes the configuration files stored by the other equipment according to the configuration files to be synchronized;
wherein 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 equipment in the cluster, receiving a file downloading request sent by the 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 configuration file stored by the other equipment 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 a file downloading request sent by 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 the verification is passed.
Optionally, the cluster management device in 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 first cluster equipment in a cluster, screening the first cluster equipment from all the cluster equipment in the cluster as reference equipment according to a file synchronization request of a user so as to enable the reference equipment to upload the configuration file stored in the reference equipment; 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 first cluster equipment from all cluster equipment in a cluster to serve as reference equipment, responding to a lock acquisition request of the reference equipment, and 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.
Optionally, the cluster management device in 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 first cluster equipment in a cluster, modifying the configuration file stored by the first cluster equipment according to a file modification request of a user so that 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, 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 responding to a lock acquisition request of the first cluster device, and allocating a lock of the configuration file to be synchronized to 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 in the embodiment of the present invention further includes a user interaction module, configured to: according to a file rollback request of a user, determining a target configuration file from all stored configuration files to be synchronized, and generating file rollback information;
the file synchronization module is further configured to: and sending the file rollback information to all cluster equipment in the cluster so as to enable all cluster equipment in the cluster to perform configuration file rollback according to the target configuration file.
Optionally, the cluster management device in the embodiment of the present invention further includes a user interaction module, configured to: and responding to a progress inquiry request of a user, and displaying the synchronization progress of the configuration files to be synchronized.
According to a third aspect of the embodiments of the present invention, there is provided a cluster system, including: a cluster and management device; wherein,
uploading a configuration file to be synchronized to the management equipment by the first cluster equipment in the cluster;
the management equipment stores the configuration file to be synchronized, generates file synchronization information and sends the file synchronization information to other equipment in the cluster;
the other equipment synchronizes the configuration files stored by the other equipment according to the configuration files to be synchronized;
wherein 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 versions of the configuration files stored by the other devices are consistent with the file version information of the configuration files to be synchronized, and generate file downloading requests and send the file downloading requests to the management device under the condition that the file versions of the configuration files stored by the other devices are not consistent with the file version information of the configuration files to be synchronized;
the management equipment receives a file downloading request sent by the other equipment and sends a configuration file to be synchronized corresponding to the file downloading request to the other equipment;
and the other equipment synchronizes the configuration files stored by the other equipment according to the configuration files to be synchronized.
Optionally, after receiving the file download request sent by the other device, the management device sends file verification information of the configuration file to be synchronized, which corresponds to the file download 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 is passed.
Optionally, 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 equipment uploads a configuration file stored by the reference equipment to the management equipment; the configuration file to be synchronized is the configuration file uploaded by the reference equipment.
Optionally, after screening a first cluster device from all cluster devices in a cluster as a reference device, the management device allocates a lock of the configuration file to be synchronized to the reference device in response to a lock acquisition request of 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 in 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 in the first cluster device, the first cluster device sends a lock acquisition request to the management device, and the management device allocates a lock of the configuration file to be synchronized to the first cluster device in response to the lock acquisition request;
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 stored configuration files to be synchronized according to a file rollback request of the user, and generates file rollback information; sending the file rollback information to all cluster equipment in the cluster;
and all cluster equipment in the cluster rolls back the configuration files according to the target configuration files.
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 the embodiments of the present invention, a server for providing cluster management includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused 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, on which a computer program is stored, 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 cluster equipment in the cluster and automatically synchronizing the configuration information to be synchronized to other cluster equipment in the cluster after receiving the configuration file to be synchronized uploaded by any cluster equipment in the cluster, the manual operation can be avoided, the complexity and the workload of the consistent operation of the configuration information of the cluster equipment are greatly reduced, and the efficiency and the accuracy of the consistent operation are improved. The configuration file is verified 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 consistency operation accuracy of the configuration information is further improved. 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 effectively and accurately ensured. The configuration file to be synchronized is locked before the cluster equipment uploads the configuration file to be synchronized each time, so that the cluster equipment can be prevented from operating one configuration file at the same time, and the consistency and the accuracy of the whole cluster configuration information are improved.
Further effects of the above-mentioned non-conventional alternatives will be 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 according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a main flow of a cluster management method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a synchronization configuration file of cluster devices according to an alternative embodiment of the present invention;
FIG. 4 is a schematic flow chart of modifying a configuration file in some embodiments of the invention;
FIG. 5 is a schematic flow chart of modifying a configuration file in accordance with further embodiments of the present invention;
fig. 6 is a schematic diagram of the main modules of a cluster management device according to an embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 8 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as 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 realizing 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 main body of the cluster management method of the embodiment of the invention.
Fig. 2 is a schematic diagram of a main flow of a cluster management method according to an embodiment of the present invention, and as shown in fig. 1, the cluster management method includes: step S201, step S202, and step S203.
In step S201, a to-be-synchronized configuration file uploaded by a first cluster device in a cluster is received. Two or more cluster devices are included in the cluster, and the first cluster device is any one cluster device in the cluster.
In some optional embodiments, the first cluster device is a reference device selected when a cluster is created or a configuration information consistency operation (an operation for keeping the configuration information of each cluster device in the cluster consistent) is performed on the cluster. Before receiving the configuration file to be synchronized uploaded by the first cluster device in the cluster, the method further includes: screening first cluster equipment from all cluster equipment in a cluster as reference equipment according to a file synchronization request of a user so that the reference equipment uploads a configuration file stored in the reference equipment; the configuration file to be synchronized is the configuration file uploaded by the reference equipment. And selecting one reference device, and synchronizing other cluster devices in the cluster by taking the configuration file in the reference device as a template, 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 as the reference device, a lock of the configuration file to be synchronized may 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 may record a lock state of each configuration file stored therein, including a locked state and an unlocked state, where the configuration file in the locked state may only be modified by the cluster device that is locked thereto, but may not be modified by other cluster devices. After unlocking, other devices may modify the configuration file. In this embodiment, a lock is introduced, and a cluster device can modify a 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 the accuracy of consistent operation of configuration information is ensured.
In other optional embodiments, the first cluster device is any one of cluster devices in the cluster, which is to modify the configuration information of the cluster. Before receiving a configuration file to be synchronized uploaded by first cluster equipment in a cluster, modifying the configuration file stored by the first cluster equipment according to a file modification request of a user so that the modified configuration file is stored and uploaded by the first cluster equipment; the configuration file to be synchronized is a modified configuration file uploaded by the first cluster device.
For example, after other cluster devices in the cluster synchronize with the configuration file in the reference device as a template, the cluster device uploads the modified configuration file to the management device no matter which cluster device locally stores the configuration file is modified, and the other cluster devices in the cluster only need to download updates from the management device.
In this embodiment, modifying the configuration file in any cluster device in the cluster automatically synchronizes the modified configuration file to other cluster devices in the cluster through the management device, so that manual operation can be avoided, complexity and workload of configuration information consistency operation of the cluster devices are greatly reduced, and efficiency and accuracy of configuration information consistency operation are improved.
Optionally, after modifying the configuration file stored in the first cluster device, the method further includes: the method comprises the steps that a configuration file to be synchronized is locked before the configuration file to be synchronized is uploaded by first cluster equipment, and the configuration file to be synchronized is unlocked after the configuration file to be synchronized is uploaded by the first cluster equipment; or responding to a lock acquisition request of the first cluster device, and allocating a lock of the configuration file to be synchronized to 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 diagram illustrating modification of a configuration file in some embodiments of the invention. As shown in fig. 4, the method comprises the following steps: step S401, the management device modifies a configuration file A stored in the first cluster device according to a file modification request of a user; step S402, locking a configuration file A; step S403, the first cluster equipment uploads the modified configuration file A to the management equipment; step S404, the management device saves the modified configuration file A and records the file version information of the configuration file A. The management device may record a lock state of each configuration file stored therein, including a locked state and an unlocked state, where the configuration file in the locked state may only be modified by the corresponding cluster management device and may not be modified by other cluster devices. For example, if a user modifies the configuration file a1 of cluster device a through the management device, after the management device locks the configuration file a1, only the cluster device a may modify the configuration file a1, and the other cluster devices cannot modify the configuration file a 1. After unlocking, other cluster devices may modify configuration file a 1.
FIG. 5 is a flow chart illustrating modification of a configuration file in accordance with further embodiments of the present invention. As shown in fig. 5, the method comprises the following steps: step S501, modifying a configuration file A stored in first cluster equipment by management equipment according to a file modification request of a user; step S502, the first cluster device sends a lock acquisition request to the management device; step S503, the management device configures a lock of the file A for the first cluster device segment; 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 saves the modified configuration file A and records the file version information of the configuration file A. The management device may record a lock state of each configuration file stored therein, including a locked state and an unlocked state, where the configuration file in the locked state may only be modified by the cluster device that is locked thereto, but may not be modified by other cluster devices. For example, if a user modifies the configuration file a1 of cluster device b through the management device, after the cluster device b locks the configuration file a1, only the cluster device b can modify the configuration file a1, and other cluster devices cannot modify the configuration file a 1. After unlocking, other cluster devices may modify configuration file a 1.
In this embodiment, a lock is introduced, and a cluster device can modify a 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 the accuracy of consistent operation of configuration information 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, the configuration file C includes 10 pieces of configuration information, and if only the first piece of configuration information is modified, only the modified first piece of configuration information may be uploaded as the configuration file to be synchronized, or the configuration file C including the complete configuration file after modification may be uploaded as the configuration file to be synchronized. Of course, both the incremental and full profiles may be uploaded simultaneously. In the actual application process, for a certain version of configuration file, the incremental configuration file may be uploaded first, and then the whole including the certain version of configuration file and corresponding incremental configuration files may be uploaded as the configuration file to be synchronized periodically. Illustratively, the current file version of the configuration file D is V2.0, and includes 10 pieces of configuration information. A user modifies the first piece of configuration information in the configuration file D of the V2.0 version, and at the moment, the modified first piece of configuration information is used as a configuration file to be synchronized for uploading; if the user modifies the second piece of configuration information in the configuration file D of the V2.0 version again, the modified second piece of configuration information is taken as a configuration file to be synchronized for uploading; after several times of modification or after set time, uploading the configuration file D of the V2.0 version and the whole configuration file to be synchronized corresponding to each time of modification as a new configuration file to be synchronized. Thus, 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 file unique identifier (e.g., file name, file code, etc.) uniquely representing a configuration file 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 stored, the configuration file to be synchronized may be stored according to the name of the configuration file to be synchronized or renamed, and file version information of the corresponding configuration file may also be recorded at the same time. By recording the file version information of the configuration file, the management of each version of the configuration file is facilitated, the historical version evolution process of the configuration file is conveniently checked, and the version rollback of the configuration file is facilitated when needed. By recording the file size, the file unique 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 file to be synchronized. The other devices refer to cluster devices within the cluster other than the first cluster device. By uniformly storing and managing the configuration information of all cluster equipment in the cluster and automatically synchronizing the configuration information to be synchronized to other cluster equipment in the cluster after receiving the configuration file to be synchronized uploaded by any cluster equipment in the cluster, the manual operation can be avoided, the complexity and the workload of the consistent operation of the configuration information of the cluster equipment are greatly reduced, and the efficiency and the accuracy of the consistent operation are improved.
In some optional 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 includes: 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 of confirming that the file version of the configuration file stored by the other device is inconsistent with the file version information of the configuration file to be synchronized.
After receiving the file download request sent by the other device, the method may further include: and sending 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 is passed.
Fig. 3 is a schematic flowchart of a cluster device synchronization configuration file in an alternative embodiment of the present invention, and as shown in fig. 3, the flowchart of the cluster device synchronization configuration file includes:
step S301, receiving file synchronization information including 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 so, indicating that the locally stored configuration file is the latest version, and ending the process; 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 the file downloading request returned by the management equipment;
step S305, the configuration file to be synchronized is applied to the local, and the file version of the configuration file stored locally is updated.
By verifying the file version information of the configuration file to be synchronized before downloading, the configuration file of the latest version can be downloaded and applied in time when the configuration file locally stored by certain cluster equipment is not the latest version, and resource consumption caused by repeated downloading of the configuration file of the latest version from the management equipment when the configuration file locally stored by the cluster equipment is 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 consistency operation of the configuration information is further improved. The file authentication information may be a file size, a MD5(Message Digest Algorithm MD5, fifth edition of Message Digest Algorithm) value of the file, and the like.
Optionally, the method of the embodiment of the present invention further includes: according to a file rollback request of a user, determining a target configuration file from all stored configuration files to be synchronized, and generating file rollback information; and sending the file rollback information to all cluster equipment in the cluster so as to enable all cluster equipment in the cluster to perform configuration file rollback according to the target configuration file.
Illustratively, it is assumed that the configuration file B saved in the management device includes three versions, which are respectively denoted as V1.0, V2.0, and V3.0, and the version of the configuration file B used by the current cluster is V3.0. If the user abandons the configuration file B of the V3.0 version, the configuration file B of the V2.0 version can be used as a target configuration file, file rollback information is generated and sent to all cluster equipment in the cluster, and therefore all cluster equipment in the cluster can roll back 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 inquiry request of a user, and displaying the synchronization progress of the configuration files to be synchronized. Through query operation, a user can conveniently know information such as the synchronous progress of the configuration information. It should be noted that, when the file version information, the file size, and the like of the configuration file are stored in the management device, information such as a history version evolution condition of the configuration file may also be queried.
The following describes an exemplary method for cluster management according to an embodiment of the present invention with reference to a specific application scenario. In this example, the cluster system includes a cluster and a cluster management device, and the cluster management device is an execution subject for implementing the cluster management method 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, including information such as the lock state of the configuration file, file version information, the size of the file, and the MD 5. The cluster device obtains a lock for managing a file of the device, and if the configuration file is locked by other devices, the configuration file is not allowed to be locked again. After a certain cluster device acquires the lock of a configuration file, the configuration file can be modified and uploaded. The cluster device may release the lock of the configuration file locked by itself, and after release, other cluster devices may modify, upload, and the like the configuration file. And automatically releasing the lock after the configuration file is uploaded successfully, wherein the configuration file is in the version + 1. When the version of the configuration file changes, the management device notifies all devices in the cluster, so that the devices in the cluster know that the new version exists. The cluster device downloads the configuration file of the corresponding version from the management device, and checks the integrity of the configuration file according to the MD5 value provided by the management device.
The cluster equipment acquires the information of a certain file from the management equipment regularly, 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 inconsistency is found. After downloading, the integrity of the configuration file is checked according to the MD5 value provided by the management device.
If the user wants to give up the newly modified configuration information, the configuration information of the previous version can be found according to the file version information recorded in the management device, and the version is rolled back. The management device can query the configuration information version of the cluster device to know the synchronization condition of the cluster device.
The concrete implementation steps comprise:
(1) on the cluster management equipment, cluster equipment for building a cluster is selected through a management interface, and a cluster of first-time synchronous reference equipment components is selected.
(2) The reference device acquires the locks of all the configuration files from the management device and uploads all the configuration files stored locally to the management device.
(3) After the reference device uploads the configuration file, the version number of the corresponding configuration file on the management device changes and unlocks the file, and meanwhile, the information of the change of the configuration file, that is, file synchronization information (including a file unique identifier, file version information, and file size), is notified (a web service request is sent to the cluster device).
(4) When the cluster equipment receives the file synchronization information, the cluster equipment compares the file synchronization information with the local file version, if the file synchronization information is inconsistent with the local file version, the cluster equipment requests the latest configuration file from the management equipment, then the latest configuration file is applied to the local, and the file version of the configuration file stored locally is updated.
(5) An administrator can modify the configuration file of a certain cluster device on the management platform, and lock the corresponding configuration file after modification. The cluster device finds that the configuration information of the cluster device is manually modified, automatically triggers an uploading action, uploads the modified configuration file to the management device, and after receiving the modified configuration file, the management device generates a new file version, unlocks the configuration file and informs other cluster devices so as to synchronize the configuration files of other cluster devices.
(6) An administrator can modify the configuration file of a certain cluster device on the management platform, and the corresponding configuration file is not locked after modification. The cluster device finds that the configuration file of the cluster device is modified and requests the management device for locking the configuration file, 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 notifies other cluster devices.
(7) The administrator can check the historical configuration information on the management platform, can perform rollback on the configuration file, change the version after the rollback, reset the lock state of the configuration file (the state includes the lock state and the unlock state, and the reset state is changed into the unlock state), and notify 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, downloads the update from the management equipment if the file version information is inconsistent with the file version of the corresponding configuration file stored locally, and prevents the cluster equipment from not updating due to failure notification of the management equipment when the connection is not smooth.
(9) The management platform can inquire (communication can be carried out between the management device and the cluster device, the version of each file of the device can be inquired, the provided interface can be a full interface for returning all the versions, and can also be an interface for inquiring the version of a certain file in a non-full mode) the updating condition of the configuration information of the cluster device.
The embodiment of the invention selects one reference device and other devices as the reference devices for synchronization after the cluster is established, can ensure the consistency of the configuration information of each cluster device in the cluster, and can upload the modified configuration file to the management device when the configuration file of the cluster device is subsequently modified, and the other devices only need to be updated in the management device, thereby greatly reducing the complexity of the consistency operation of the configuration information. Because a large amount of configuration files do not need to be modified manually for consistency, the labor can be saved, and the workload of the consistency operation of the configuration information can be reduced. The manual operation has a plurality of uncertainties, and the configuration file is verified 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, the version change can be seen, misoperation is prevented, and the file version of the cluster equipment configuration file can be seen, so that the synchronization condition of each equipment can be known, and the safety of the system is improved. When the equipment configuration information is wrong, the configuration file can be conveniently rolled back, 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 embodiments of the present invention, a cluster management device for 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, the cluster management device 600 includes: a file synchronization module 601 and a file saving module 602; wherein,
a file synchronization module 601 receives a configuration file to be synchronized uploaded by first cluster equipment 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 their stored configuration files according to the configuration file to be synchronized; wherein 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 equipment in the cluster, receiving a file downloading request sent by the 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 configuration file stored by the other equipment 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 a file downloading request sent by 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 the verification is passed.
Optionally, the cluster management device 600 in 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 first cluster equipment in a cluster, screening the first cluster equipment from all the cluster equipment in the cluster as reference equipment according to a file synchronization request of a user so as to enable the reference equipment to upload the configuration file stored in the reference equipment; 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 first cluster equipment from all cluster equipment in a cluster to serve as reference equipment, responding to a lock acquisition request of the reference equipment, and 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.
Optionally, the cluster management device 600 in 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 first cluster equipment in a cluster, modifying the configuration file stored by the first cluster equipment according to a file modification request of a user so that 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, 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 responding to a lock acquisition request of the first cluster device, and allocating a lock of the configuration file to be synchronized to 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 in the embodiment of the present invention further includes a user interaction module 603, configured to: according to a file rollback request of a user, determining a target configuration file from all stored configuration files to be synchronized, and generating file rollback information;
the file synchronization module is further configured to: and sending the file rollback information to all cluster equipment in the cluster so as to enable all cluster equipment in the cluster to perform configuration file rollback according to the target configuration file.
Optionally, the cluster management device in the embodiment of the present invention further includes a user interaction module, configured to: and responding to a progress inquiry request of a user, and displaying the synchronization progress of the configuration files to be synchronized.
According to a third aspect of the embodiments of the present invention, there is provided a cluster system, including: a cluster and management device; wherein,
uploading a configuration file to be synchronized to the management equipment by the first cluster equipment in the cluster;
the management equipment stores the configuration file to be synchronized, generates file synchronization information and sends the file synchronization information to other equipment in the cluster;
the other equipment synchronizes the configuration files stored by the other equipment according to the configuration files to be synchronized;
wherein 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 versions of the configuration files stored by the other devices are consistent with the file version information of the configuration files to be synchronized, and generate file downloading requests and send the file downloading requests to the management device under the condition that the file versions of the configuration files stored by the other devices are not consistent with the file version information of the configuration files to be synchronized;
the management equipment receives a file downloading request sent by the other equipment and sends a configuration file to be synchronized corresponding to the file downloading request to the other equipment;
and the other equipment synchronizes the configuration files stored by the other equipment according to the configuration files to be synchronized.
Optionally, after receiving the file download request sent by the other device, the management device sends file verification information of the configuration file to be synchronized, which corresponds to the file download 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 is passed.
Optionally, 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 equipment uploads a configuration file stored by the reference equipment to the management equipment; the configuration file to be synchronized is the configuration file uploaded by the reference equipment.
Optionally, after screening a first cluster device from all cluster devices in a cluster as a reference device, the management device allocates a lock of the configuration file to be synchronized to the reference device in response to a lock acquisition request of 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 in 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 in the first cluster device, the first cluster device sends a lock acquisition request to the management device, and the management device allocates a lock of the configuration file to be synchronized to the first cluster device in response to the lock acquisition request;
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 stored configuration files to be synchronized according to a file rollback request of the user, and generates file rollback information; sending the file rollback information to all cluster equipment in the cluster; and all cluster equipment in the cluster rolls back the configuration files according to the target configuration files.
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 the embodiments of the present invention, a server for providing cluster management includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused 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, on which a computer program is stored, which when executed by a processor, implements the method provided by the first aspect of embodiments of the present invention.
Fig. 7 shows an exemplary system architecture 700 of a cluster management apparatus or a method of cluster management to which embodiments of the invention may be applied.
As shown in fig. 7, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 serves to provide a medium for communication links between the terminal devices 701, 702, 703 and the server 705. Network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 701, 702, 703 to interact with a server 705 over a network 704, to receive or send messages or the like. The terminal devices 701, 702, 703 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only).
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 701, 702, 703. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the cluster management method 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, shown is a block diagram of a computer system 800 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments 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 in accordance with 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 necessary for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and 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. A drive 810 is also connected to the I/O interface 805 as necessary. 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 necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the 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 illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 present invention, 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, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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 flowchart 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 described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprising: the file synchronization module and the file storage module. The names of these modules do not in some cases constitute a limitation on the modules themselves, 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 separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: receiving a configuration file to be synchronized 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 equipment in the cluster so that the other equipment synchronizes the configuration files stored by the other equipment according to the configuration files to be synchronized; wherein 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 equipment in the cluster is uniformly stored and managed, and the configuration file to be synchronized uploaded by any cluster equipment in the cluster is automatically synchronized to other cluster equipment in the cluster after being received, so that the manual operation can be avoided, the complexity and the workload of the consistent operation of the configuration information of the cluster equipment are greatly reduced, and the efficiency and the accuracy of the consistent operation are improved. The configuration file is verified 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 consistency operation accuracy of the configuration information is further improved. 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 effectively and accurately ensured. The configuration file to be synchronized is locked before the cluster equipment uploads the configuration file to be synchronized each time, so that the cluster equipment can be prevented from operating one configuration file at the same time, and the consistency and the accuracy of the whole cluster configuration information are improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (13)

1. A method of cluster management, comprising:
receiving a configuration file to be synchronized 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 equipment in the cluster so that the other equipment synchronizes the configuration files stored by the other equipment according to the configuration files to be synchronized;
wherein the other devices refer to cluster devices in the cluster except the first cluster device.
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 includes: receiving a file downloading request sent by the 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 configuration file stored by the other equipment is not consistent with the file version information of the configuration file to be synchronized.
3. The method of claim 2, wherein after receiving the file download request sent by the other device, further comprising:
and 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 the configuration file to be synchronized passes the verification.
4. The method of any of claims 1-3, wherein prior to receiving the configuration file to be synchronized uploaded by the first cluster device within the cluster, further comprising: screening first cluster equipment from all cluster equipment in a cluster as reference equipment according to a file synchronization request of a user so as to enable the reference equipment to upload a configuration file stored in the reference equipment; the configuration file to be synchronized is the configuration file uploaded by the reference equipment.
5. The method of claim 4, wherein after screening the first cluster device from all cluster devices in the cluster as the reference device, further comprising:
responding to the lock acquisition request of the reference equipment, allocating a lock of the configuration file to be synchronized to 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.
6. The method of any of claims 1-3, wherein prior to receiving the configuration file to be synchronized uploaded by the first cluster device within the cluster, further comprising: modifying the configuration file stored in the first cluster equipment according to the file modification request of the user so that the modified configuration file is stored and uploaded by the first cluster equipment; the configuration file to be synchronized is a modified configuration file uploaded by the first cluster device.
7. The method of claim 6, wherein after modifying the configuration file stored by the first cluster device, further comprising: the method comprises the steps that a configuration file to be synchronized is locked before the configuration file to be synchronized is uploaded by first cluster equipment, and the configuration file to be synchronized is unlocked after the configuration file to be synchronized is uploaded by the first cluster equipment; or responding to a lock acquisition request of the first cluster device, and allocating a lock of the configuration file to be synchronized to 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.
8. The method of any of claims 1-3, further comprising:
according to a file rollback request of a user, determining a target configuration file from all stored configuration files to be synchronized, and generating file rollback information; and sending the file rollback information to all cluster equipment in the cluster so as to enable all cluster equipment in the cluster to perform configuration file rollback according to the target configuration file.
9. The method of any of claims 1-3, further comprising: and responding to a progress inquiry request of a user, and displaying the synchronization progress of the configuration files to be synchronized.
10. A cluster management device, comprising: the file synchronization module and the file storage module; wherein,
the file synchronization module receives a configuration file to be synchronized 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 equipment in the cluster so that the other equipment synchronizes the configuration files stored by the other equipment according to the configuration files to be synchronized;
wherein the other devices refer to cluster devices in the cluster except the first cluster device.
11. A cluster system, comprising: a cluster and management device; wherein,
uploading a configuration file to be synchronized to the management equipment by the first cluster equipment in the cluster;
the management equipment stores the configuration file to be synchronized, generates file synchronization information and sends the file synchronization information to other equipment in the cluster;
the other equipment synchronizes the configuration files stored by the other equipment according to the configuration files to be synchronized;
wherein the other devices refer to cluster devices in the cluster except the first cluster device.
12. A cluster managed server, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
13. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-9.
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 true CN111708836A (en) 2020-09-25
CN111708836B 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113722007A (en) * 2021-08-24 2021-11-30 杭州迪普科技股份有限公司 Configuration method, device and system of VPN branch equipment
CN114003263A (en) * 2021-11-16 2022-02-01 山石网科通信技术股份有限公司 System configuration method and device, electronic equipment and storage medium
CN114116672A (en) * 2021-11-30 2022-03-01 智慧足迹数据科技有限公司 Data synchronization method and related device
CN114398208A (en) * 2022-01-17 2022-04-26 上海道客网络科技有限公司 Cross-cluster backup method, system, medium and equipment for stateless application
CN116955015A (en) * 2023-09-19 2023-10-27 恒生电子股份有限公司 Data backup system and method based on data storage service

Citations (5)

* 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
US20190332297A1 (en) * 2018-04-27 2019-10-31 EMC IP Holding Company LLC Systems and Methods of Synchronizing Configuration Information in a Clustered Storage Environment

Patent Citations (5)

* 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
US20190332297A1 (en) * 2018-04-27 2019-10-31 EMC IP Holding Company LLC Systems and Methods of Synchronizing Configuration Information in a Clustered Storage Environment
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

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113722007A (en) * 2021-08-24 2021-11-30 杭州迪普科技股份有限公司 Configuration method, device and system of VPN branch equipment
CN113722007B (en) * 2021-08-24 2023-11-03 杭州迪普科技股份有限公司 Configuration method, device and system of VPN branch equipment
CN114003263A (en) * 2021-11-16 2022-02-01 山石网科通信技术股份有限公司 System configuration method and device, electronic equipment and storage medium
CN114116672A (en) * 2021-11-30 2022-03-01 智慧足迹数据科技有限公司 Data synchronization method and related device
CN114116672B (en) * 2021-11-30 2022-11-08 智慧足迹数据科技有限公司 Data synchronization method and related device
CN114398208A (en) * 2022-01-17 2022-04-26 上海道客网络科技有限公司 Cross-cluster backup method, system, medium and equipment for stateless application
CN116955015A (en) * 2023-09-19 2023-10-27 恒生电子股份有限公司 Data backup system and method based on data storage service
CN116955015B (en) * 2023-09-19 2024-01-23 恒生电子股份有限公司 Data backup system and method based on data storage service

Also Published As

Publication number Publication date
CN111708836B (en) 2024-03-22

Similar Documents

Publication Publication Date Title
CN111708836B (en) Cluster management method, device and cluster system
CN107666525B (en) Method and device for IP allocation of cluster container
CN109683826B (en) Capacity expansion method and device for distributed storage system
CN109120678B (en) Method and apparatus for service hosting of distributed storage system
CN109522363B (en) Cloud platform synchronization method, system, equipment and storage medium based on block chain
CN110895603B (en) Multi-system account information integration method and device
CN109245908B (en) Method and device for switching master cluster and slave cluster
US20170193070A1 (en) System and method for a distributed replication lock for active-active geo-redundant systems
CN111782235B (en) Data upgrading and inquiring method and device
CN111800468A (en) Cloud-based multi-cluster management method, device, medium and electronic equipment
CN110795495A (en) Data processing method and device, electronic equipment and computer readable medium
CN111666134A (en) Method and system for scheduling distributed tasks
CN112579353A (en) Automatic operation and maintenance method and device and big data platform
US10776134B2 (en) Management of application properties
CN115878138B (en) Application pre-download method, device, computer and storage medium
CN111177260A (en) Database remote copying method and device and electronic equipment
CN111984686A (en) Data processing method and device
US10394677B2 (en) Method to efficiently and reliably process ordered user account events in a cluster
CN116737662A (en) Method, device, electronic equipment and storage medium for processing business data
CN113094211B (en) Backup data processing method and device
CN115022307A (en) File downloading method and device, storage medium and electronic equipment
CN110609734A (en) Method and device for scheduling timed tasks
CN110661857B (en) Data synchronization method and device
CN114385570A (en) Data synchronization method and device, electronic equipment and readable medium
CN109582288B (en) Method, system and storage medium for producing configuration reflux

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