CN111193622B - Asymmetric configuration management method, device and equipment and readable storage medium - Google Patents

Asymmetric configuration management method, device and equipment and readable storage medium Download PDF

Info

Publication number
CN111193622B
CN111193622B CN201911398117.9A CN201911398117A CN111193622B CN 111193622 B CN111193622 B CN 111193622B CN 201911398117 A CN201911398117 A CN 201911398117A CN 111193622 B CN111193622 B CN 111193622B
Authority
CN
China
Prior art keywords
target node
node
configuration file
configuration
asymmetric
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
CN201911398117.9A
Other languages
Chinese (zh)
Other versions
CN111193622A (en
Inventor
邵宁
孟祥瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201911398117.9A priority Critical patent/CN111193622B/en
Publication of CN111193622A publication Critical patent/CN111193622A/en
Priority to PCT/CN2020/110946 priority patent/WO2021135279A1/en
Application granted granted Critical
Publication of CN111193622B publication Critical patent/CN111193622B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

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

Abstract

The invention discloses a management method, a device, equipment and a computer readable storage medium for asymmetric configuration, wherein the method comprises the following steps: when a target node is configured, acquiring a symmetrical configuration file corresponding to all preset nodes stored by a configuration management server; the symmetric configuration file comprises asymmetric configuration information of all preset nodes, and the target node is any preset node; converting the symmetrical configuration file into an asymmetrical configuration file corresponding to the target node according to the asymmetrical configuration information and the specific information of the target node, so that the target node completes configuration by using the asymmetrical configuration file; the invention converts the symmetrical configuration file stored in the configuration management server into the asymmetrical configuration file, so that each preset node can complete configuration by utilizing the corresponding asymmetrical configuration file; and the configuration management server can carry out the management of asymmetric configuration according to the management mode of symmetric configuration, thereby reducing the workload of a user and better realizing automation.

Description

Asymmetric configuration management method, device and equipment and readable storage medium
Technical Field
The present invention relates to the field of cluster configuration technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for managing asymmetric configuration.
Background
With the development of modern society science and technology, the use of computer clusters is more and more extensive. When the maintainers configure various functions (such as a network clock synchronization function, an information distribution function and the like) of the cluster, the maintainers prefer to use simple and convenient symmetrical configuration, that is, a certain configuration item or configuration file is completely the same on all nodes of the cluster; on the contrary to the symmetric configuration, the asymmetric configuration in which a certain configuration item or configuration file is not completely the same on all nodes of the cluster is not preferred by the maintenance personnel due to the complicated configuration process.
For example, when a cluster of a Linux system is configured symmetrically, the/etc/hosts configuration file may be as follows:
192.168.1.1 server01
192.168.1.2 server02
192.168.1.3 server03
so that the/etc/hosts configuration file can store the corresponding relation between the node names and the IP addresses of all the members of the cluster, and the file is the same in all the nodes generally;
when the Linux system is configured asymmetrically, for example, a configuration with a network clock synchronization function needs to configure all nodes to perform clock synchronization through ntp (network time protocol); one of the nodes in the cluster may act as an ntp server node (say server01), and the other nodes may act as ntp client nodes, with the/etc/step-tickets profile being used to store the IP address of the ntp server; then step-tickets should be configured on server01 as: 127.127.1.0, the local clock address of the ntp server node; and step-tickets should be configured on other nodes as follows: 192.168.1.1, i.e., the IP address of the ntp server node.
In summary, symmetric configurations are easier to manage and automate than asymmetric configurations, and configurations in a production environment are generally more complex and larger than in the above examples. Manual configuration is labor intensive and error prone, so the need for automation of configuration management is more acute. Therefore, how to enable the user to manage the asymmetric configuration more easily, better realize automation, and improve user experience is a problem which needs to be solved urgently nowadays.
Disclosure of Invention
The invention aims to provide a management method, a device and equipment for asymmetric configuration and a computer readable storage medium, so as to realize automatic conversion from a symmetric configuration file to an asymmetric configuration file, facilitate user management and improve user experience.
In order to solve the above technical problem, the present invention provides a method for managing asymmetric configuration, comprising:
when a target node is configured, acquiring a symmetrical configuration file corresponding to all the preset nodes stored by a configuration management server; the symmetric configuration file comprises asymmetric configuration information of all the preset nodes, and the target node is any one of the preset nodes;
and converting the symmetric configuration file into an asymmetric configuration file corresponding to the target node according to the asymmetric configuration information and the specific information of the target node, so that the target node completes configuration by using the asymmetric configuration file.
Optionally, when configuring the target node, acquiring the symmetric configuration files corresponding to all the preset nodes stored by the configuration management server includes:
when the configuration management server configures the target node, the stored symmetric configuration file is obtained;
correspondingly, after the converting the symmetric configuration file into the asymmetric configuration file corresponding to the target node, the method further includes:
sending the asymmetric configuration file to the target node.
Optionally, when configuring the target node, acquiring the symmetric configuration files corresponding to all the preset nodes stored by the configuration management server includes:
and the target node receives the symmetric configuration file sent by the configuration management server.
Optionally, when the symmetric configuration file includes configuration files of client nodes corresponding to a preset number of server nodes, the converting the symmetric configuration file into an asymmetric configuration file corresponding to the target node according to the asymmetric configuration information and the specific information of the target node includes:
judging whether the target node is the server node or not according to the server node identity information and the target node identity information in the asymmetric configuration information;
if the target node is the server node, obtaining an asymmetric configuration file corresponding to the target node by adjusting a configuration file of a client node corresponding to the target node in the symmetric configuration file according to node configuration information of the target node; wherein the specific information comprises the identity information and the node configuration information;
and if the target node is the client node, taking the configuration file of the target node in the symmetric configuration file as an asymmetric configuration file corresponding to the target node.
Optionally, when the symmetric configuration file is an ntp symmetric configuration file and the preset number is 1, the symmetric configuration file is a step-tickets file containing an IP address of an ntp server node;
correspondingly, the determining whether the target node is the server node according to the server node identity information in the asymmetric configuration information and the identity information of the target node includes:
judging whether the target node is the ntp server node or not according to the IP address of the ntp server node and the IP address of the target node;
if the target node is the ntp server node, replacing the IP address of the ntp server node in the step-tickets file with the local clock address of the target node to obtain an asymmetric configuration file corresponding to the target node;
and if the target node is the ntp client node, taking the step-tickets file as an asymmetric configuration file corresponding to the target node.
The invention also provides a management device for asymmetric configuration, which comprises:
the acquisition module is used for acquiring the symmetrical configuration files corresponding to all the preset nodes stored by the configuration management server when the target nodes are configured; the symmetric configuration file comprises asymmetric configuration information of all the preset nodes, and the target node is any one of the preset nodes;
and the conversion module is used for converting the symmetrical configuration file into an asymmetrical configuration file corresponding to the target node according to the asymmetrical configuration information and the specific information of the target node, so that the target node completes configuration by using the asymmetrical configuration file.
Optionally, when the symmetric configuration file includes configuration files of client nodes corresponding to respective preset number of server nodes, the converting module includes:
the judging submodule is used for judging whether the target node is the server node or not according to the server node identity information in the asymmetric configuration information and the identity information of the target node;
the adjustment submodule is used for adjusting a configuration file of a client node corresponding to the target node in the symmetric configuration file according to the node configuration information of the target node to obtain an asymmetric configuration file corresponding to the target node if the target node is the server node; wherein the specific information comprises the identity information and the node configuration information;
and the determining submodule is used for taking the configuration file of the target node in the symmetric configuration file as the asymmetric configuration file corresponding to the target node if the target node is the client node.
Optionally, when the symmetric configuration file is an ntp symmetric configuration file and the preset number is 1, the symmetric configuration file is a step-tickets file containing an IP address of an ntp server node;
correspondingly, the judging submodule is specifically configured to judge whether the target node is the ntp server node according to the IP address of the ntp server node and the IP address of the target node;
the adjusting submodule is specifically configured to, if the target node is the ntp server node, replace the IP address of the ntp server node in the step-tickets file with the local clock address of the target node to obtain an asymmetric configuration file corresponding to the target node;
the determining submodule is specifically configured to, if the target node is the ntp client node, use the step-tickets file as an asymmetric configuration file corresponding to the target node.
The present invention also provides an asymmetrically configured management device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method for managing an asymmetric configuration as described above when executing said computer program.
The invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of managing an asymmetric configuration as described above.
The invention provides a management method of asymmetric configuration, which comprises the following steps: when a target node is configured, acquiring a symmetrical configuration file corresponding to all preset nodes stored by a configuration management server; the symmetric configuration file comprises asymmetric configuration information of all preset nodes, and the target node is any preset node; converting the symmetrical configuration file into an asymmetrical configuration file corresponding to the target node according to the asymmetrical configuration information and the specific information of the target node, so that the target node completes configuration by using the asymmetrical configuration file;
therefore, the symmetrical configuration file is converted into the asymmetrical configuration file corresponding to the target node according to the asymmetrical configuration information and the specific information of the target node, and the symmetrical configuration file stored in the configuration management server can be converted into the asymmetrical configuration file, so that each preset node can complete configuration by utilizing the corresponding asymmetrical configuration file; and the configuration management server can manage the asymmetric configuration according to the management mode of the symmetric configuration, so that the workload of a user is reduced, the automation can be better realized, and the user experience is improved. In addition, the invention also provides a management device, equipment and a computer readable storage medium with asymmetric configuration, which also have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for managing asymmetric configurations according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the distribution of an asymmetric profile in the prior art;
fig. 3 is a schematic diagram illustrating distribution of an asymmetric configuration file in an asymmetric configuration management method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a symmetric configuration file conversion process of another asymmetric configuration management method according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating a symmetric configuration file conversion process of another asymmetric configuration management method according to an embodiment of the present invention;
fig. 6 is a block diagram of an asymmetrically configured management apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating an asymmetric configuration management method according to an embodiment of the present invention. The method can comprise the following steps:
step 101: when a target node is configured, acquiring a symmetrical configuration file corresponding to all preset nodes stored by a configuration management server; the symmetric configuration file comprises asymmetric configuration information of all preset nodes, and the target node is any preset node.
The preset nodes in this step may be nodes in a cluster that the configuration management server needs to configure by using a symmetric configuration file; the target node in this step may be any one of all preset nodes configured by using the symmetric configuration file.
It can be understood that an object of this embodiment may be to convert a symmetric configuration file stored by the configuration management server into an asymmetric configuration file corresponding to a target node, so that the target node may complete configuration by using the corresponding asymmetric configuration file, such as network clock synchronization function configuration or information distribution function configuration, that is, each preset node may complete configuration by using the corresponding asymmetric configuration file converted by the symmetric configuration file. As long as the above object can be achieved, for the selection of the execution subject of the method provided by the present embodiment, can be set by designers according to practical scenes and user requirements, for example, the executive body can be a configuration management server, that is, the processor of the configuration management server, when configuring the target node, obtains the stored symmetric configuration file, and after the symmetrical configuration file is converted into an asymmetrical configuration file corresponding to the target node, the asymmetrical configuration file is sent to the target node, so that the target node can directly complete configuration by using the asymmetrical configuration file, as shown in fig. 3, the configuration management server may convert the symmetric configuration file into the asymmetric configuration files (asymmetric configuration file 1 to asymmetric configuration file n) corresponding to the preset nodes (node 1 to node n) by using the conversion module, and then distribute the asymmetric configuration files to the preset nodes; the execution subject may also be a target node, for example, when the processor of the target node configures the target node, the processor of the target node may convert the symmetric configuration file into an asymmetric configuration file corresponding to the target node by using the symmetric configuration file sent by the configuration management server, and complete its own configuration through the asymmetric configuration file. The present embodiment does not set any limit to this as long as the object of the present embodiment can be achieved.
Specifically, the symmetric configuration file in this step may be a file in a symmetric configuration format that is stored in the configuration management server and is required for configuring all the preset nodes, and the symmetric configuration file may include asymmetric configuration information of all the preset nodes, so that the configuration management server or the target node (i.e., each preset node) may convert the symmetric configuration file into an asymmetric configuration file corresponding to the target node by using the asymmetric configuration information and specific information of the target node, thereby enabling the target node to complete configuration by using the asymmetric configuration file. For the specific content of the symmetric configuration file, the content may be set by a designer according to a practical scenario and a user requirement, for example, the symmetric configuration file may include configuration files of client nodes corresponding to a preset number of server nodes, that is, the symmetric configuration file may include configuration files of a preset number, and the asymmetric configuration information in the symmetric configuration file may include server node identity information or server node identity information and server node configuration information, so that the configuration management server or the target node may determine whether the target node is a server node by using the server node identity information; when the target node is a server node, adjusting a configuration file of a client node corresponding to the server node in the symmetric configuration file by using the configuration information of the server node or the configuration information of the node sent by the target node to obtain an asymmetric configuration file corresponding to the target node; and when the target node is the client node, directly taking the configuration file of the client node in the symmetric configuration file as the asymmetric configuration file corresponding to the target node. For example, the symmetric configuration file is an ntp symmetric configuration file, that is, the symmetric configuration file is used to perform network synchronization function configuration on each preset node, and when the preset number is 1, the symmetric configuration file may be specifically a step-tickets file containing an IP address of an ntp server node. As long as the configuration management server or the target node can convert the symmetric configuration file into the asymmetric configuration file corresponding to the target node by using the asymmetric configuration information in the symmetric configuration file and the specific information of the target node, this embodiment does not limit this.
Step 102: and converting the symmetrical configuration file into an asymmetrical configuration file corresponding to the target node according to the asymmetrical configuration information and the specific information of the target node, so that the target node completes configuration by using the asymmetrical configuration file.
It can be understood that the purpose of this step may be to convert the symmetric configuration file into an asymmetric configuration file corresponding to the target node by using the asymmetric configuration information in the symmetric configuration file and the specific information of the target node, so that the target node may complete configuration by using the obtained asymmetric configuration file.
Specifically, the specific content of the asymmetric configuration information in the symmetric configuration file in this step may be set by a designer, for example, the asymmetric configuration information may include server node identity information including identity information of a preset number of servers, for example, when the preset number is 1 and the symmetric configuration file is an ntp symmetric configuration file, the asymmetric configuration information may be an IP address of an ntp server node in a step-tickets file.
Correspondingly, the specific information of the target node in this step may be information of the target node that needs to be used when the symmetric configuration file is converted into the asymmetric configuration file corresponding to the target node, such as identity information (e.g., an IP address) of the target node and node configuration information, that is, information in the configuration file that is different from configuration files of other preset nodes, such as a local clock address of the server node. The specific information of the target node may be in the asymmetric configuration information in the symmetric configuration file, or may be information actually collected by the configuration management server or the target node, for example, the configuration management server may receive the specific information sent by the target node, so as to convert the symmetric configuration file into the asymmetric configuration file corresponding to the target node, and send the asymmetric configuration file to the target node.
It should be noted that, for the specific manner in which the processor converts the symmetric configuration file into the asymmetric configuration file corresponding to the target node according to the asymmetric configuration information and the specific information of the target node in this step, the specific manner may be set by a designer, for example, when the symmetric configuration file includes configuration files of client nodes corresponding to a preset number of server nodes, the processor may determine whether the target node is a server node according to the server node identity information and the identity information of the target node in the asymmetric configuration information; if the target node is a server node, obtaining an asymmetric configuration file corresponding to the target node by adjusting a configuration file of a client node corresponding to the target node in the symmetric configuration file according to the node configuration information of the target node; the specific information comprises identity information and node configuration information; and if the target node is the client node, taking the configuration file of the target node in the symmetrical configuration file as the asymmetrical configuration file corresponding to the target node.
For example, when the symmetric configuration file is a step-tickets file containing an IP address of an ntp server node (e.g., 192.168.1.1), the processor in this step may determine whether the IP address of the ntp server node in the step-tickets file is consistent with the IP address of the target node; if the two step-tokens are consistent, the target node is an ntp server node, the IP address of the ntp server node in the step-tokens file can be replaced by the local clock address (such as 127.127.1.0) of the target node, and an asymmetric configuration file corresponding to the target node, namely, a step-tokens file containing the local clock address, is obtained, so that the target node can cover the step-tokens file over the old step-tokens file thereof, and the network clock synchronization function configuration of the ntp server node is completed; if the two files are not consistent, the target node is the ntp client node, and the step-tickets file can be used as an asymmetric configuration file corresponding to the target node, so that the target node can cover the step-tickets file in the old step-tickets file to complete the network clock synchronization function configuration of the ntp client node.
It should be noted that, in this embodiment, the symmetric configuration file stored in the configuration management server is converted into the asymmetric configuration file corresponding to the target node, so that the configuration management server can maintain the symmetric configuration file, for example, the configuration management server can maintain a step-tickets file containing an IP address (e.g., 192.168.1.1) of an ntp server node, instead of maintaining a plurality of asymmetric configuration files as in the prior art shown in fig. 2; through the automatic conversion from the symmetric configuration file to the asymmetric configuration file corresponding to the target node, the asymmetric configuration file corresponding to each preset node is not required to be selected by a user for redistribution, but the symmetric configuration file is automatically converted into the asymmetric configuration file corresponding to the target node in the distribution process as shown in fig. 3, or the symmetric configuration file is directly distributed to the target node, and the symmetric configuration file is automatically converted into the asymmetric configuration file by the target node; the workload of the user is reduced, the automation can be better realized, and the user experience is improved.
Specifically, this embodiment is exemplified by any one of all the preset nodes (i.e., a target node), that is, the asymmetric configuration files corresponding to all the preset nodes that the configuration management server needs to configure may be implemented in the same or similar manner as the method provided in this embodiment, so as to complete the configuration of all the preset nodes, which is not limited in this embodiment.
In this embodiment, according to the asymmetric configuration information and the specific information of the target node, the symmetric configuration file is converted into the asymmetric configuration file corresponding to the target node, so that the symmetric configuration file stored in the configuration management server can be converted into the asymmetric configuration file, and each preset node can complete configuration by using the corresponding asymmetric configuration file; and the configuration management server can manage the asymmetric configuration according to the management mode of the symmetric configuration, so that the workload of a user is reduced, the automation can be better realized, and the user experience is improved.
Based on the above embodiment, when the symmetric configuration file includes configuration files of client nodes corresponding to the preset number of server nodes, the symmetric configuration file may be converted into an asymmetric configuration file corresponding to the target node by the method provided in this embodiment. Specifically, referring to fig. 4, fig. 4 is a flowchart illustrating a symmetrical configuration file conversion process of another asymmetrical configuration management method according to an embodiment of the present invention. The symmetric profile conversion process may include:
step 201: judging whether the target node is a server node or not according to the server node identity information and the target node identity information in the asymmetric configuration information in the symmetric configuration file; if yes, go to step 202; if not, go to step 203.
In this embodiment, the symmetric configuration file includes configuration files of client nodes corresponding to a preset number of server nodes; for example, the symmetric configuration file may include a preset number of configuration files, that is, the same configuration file may be used by a plurality of client nodes corresponding to each server node. The asymmetric configuration information in the symmetric configuration file may include server node identity information, such as a server node IP address.
It is understood that the purpose of this step may be to determine whether the target node is a server node by using the server node identity information in the asymmetric configuration information in the symmetric configuration file and the identity information of the target node in the specific information of the target node.
Step 202: and according to the node configuration information of the target node, obtaining an asymmetric configuration file corresponding to the target node by adjusting the configuration file of the client node corresponding to the target node in the symmetric configuration file.
In this embodiment, when the target node is a server node, the specific information of the target node may include identity information of the target node and node configuration information of the target node. The node configuration information of the target node may be information required for adjusting a configuration file of a client node corresponding to the target node (i.e., a server node) in the symmetric configuration file, such as a local clock address of the target node.
It can be understood that, in this step, the purpose may be to, when the target node is a server node, adjust the configuration file of the client node corresponding to the target node in the symmetric configuration file to the asymmetric configuration file corresponding to the target node by using the node configuration information of the target node, for example, replace the IP address of the target node, i.e., the IP address of the server node, in the configuration file of the client node corresponding to the target node in the symmetric configuration file by using the local clock address of the target node.
Step 203: and taking the configuration file of the target node in the symmetrical configuration file as the asymmetrical configuration file corresponding to the target node.
It can be understood that, in this step, when the target node is a client node, the configuration file of the target node in the symmetric configuration file may be directly used as the asymmetric configuration file corresponding to the target node, that is, the asymmetric configuration file corresponding to the client node may be the configuration file of the client node in the symmetric configuration file.
Based on the above embodiment, when the symmetric configuration file includes a step-tickets file of an IP address (e.g., 192.168.1.1) of an ntp server node, the symmetric configuration file may be converted into an asymmetric configuration file corresponding to a target node by the method provided in this embodiment, so as to complete the network clock synchronization function configuration. Specifically, referring to fig. 5, fig. 5 is a flowchart illustrating a symmetrical configuration file conversion process of another asymmetrical configuration management method according to an embodiment of the present invention. The symmetric profile conversion process may include:
step 301: judging whether the IP address of the ntp server node in the step-tickets file is consistent with the IP address of the target node; if yes, go to step 302; if not, go to step 303.
It is understood that, in this step, it is determined whether the target node is an ntp server node or an ntp client node by determining the IP address of the ntp server node and the IP address of the target node in the step-tickets file.
Step 302: and replacing the IP address of the ntp server node in the step-tickets file with the local clock address of the target node, so that the target node completes the network clock synchronization function configuration of the ntp server node by using the replaced step-tickets file.
The purpose of this step may be to determine that the target node is the ntp server node when the IP address of the ntp server node in the step-tickets file is consistent with the IP address of the target node, and obtain an asymmetric configuration file corresponding to the target node, that is, the step-tickets file including the local clock address, by replacing the IP address of the ntp server node in the step-tickets file with the local clock address (e.g., 127.127.1.0) of the target node, so that the target node can overlay the step-tickets file over its old step-tickets file, thereby completing the network clock synchronization function configuration of the ntp server node.
Step 303: and taking the step-tickets file as an asymmetric configuration file corresponding to the target node, so that the target node completes the network clock synchronization function configuration of the ntp client node by using the step-tickets file.
It can be understood that the purpose of this step may be to determine that the target node is the ntp client node when the IP address of the ntp server node in the step-tickets file is inconsistent with the IP address of the target node, and by using the step-tickets file as the asymmetric configuration file corresponding to the target node, the target node may overlay the step-tickets file over its old step-tickets file, thereby completing the network clock synchronization function configuration of the ntp client node.
Referring to fig. 6, fig. 6 is a block diagram illustrating an asymmetric management apparatus according to an embodiment of the present invention, where the apparatus includes:
the acquiring module 10 is configured to acquire a symmetric configuration file corresponding to all preset nodes stored by the configuration management server when the target node is configured; the symmetric configuration file comprises asymmetric configuration information of all preset nodes, and the target node is any preset node;
and a conversion module 20, configured to convert the symmetric configuration file into an asymmetric configuration file corresponding to the target node according to the asymmetric configuration information and the specific information of the target node, so that the target node completes configuration by using the asymmetric configuration file.
Optionally, when the symmetric configuration file includes configuration files of client nodes corresponding to respective preset number of server nodes, the converting module 20 may include:
the judging submodule is used for judging whether the target node is the server node or not according to the server node identity information and the target node identity information in the asymmetric configuration information;
the adjustment submodule is used for obtaining an asymmetric configuration file corresponding to the target node by adjusting a configuration file of a client node corresponding to the target node in the symmetric configuration file according to the node configuration information of the target node if the target node is the server node; the specific information comprises identity information and node configuration information;
and the determining submodule is used for taking the configuration file of the target node in the symmetrical configuration file as the asymmetrical configuration file corresponding to the target node if the target node is the client node.
Optionally, when the symmetric configuration file is an ntp symmetric configuration file and the preset number is 1, the symmetric configuration file is a step-tickets file containing an IP address of the ntp server node;
correspondingly, the judging submodule can be specifically used for judging whether the target node is the ntp server node or not according to the IP address of the ntp server node and the IP address of the target node;
the adjusting submodule can be specifically used for replacing an IP address of the ntp server node in the step-tickets file with a local clock address of the target node to obtain an asymmetric configuration file corresponding to the target node if the target node is the ntp server node;
the determining submodule can be specifically used for taking the step-tickets file as the asymmetric configuration file corresponding to the target node if the target node is the ntp client node.
In this embodiment, the conversion module 20 converts the symmetric configuration file into an asymmetric configuration file corresponding to the target node according to the asymmetric configuration information and the specific information of the target node, and may convert the symmetric configuration file stored in the configuration management server into an asymmetric configuration file, so that each preset node may complete configuration by using the corresponding asymmetric configuration file; and the configuration management server can manage the asymmetric configuration according to the management mode of the symmetric configuration, so that the workload of a user is reduced, the automation can be better realized, and the user experience is improved.
An embodiment of the present invention further provides a management device for asymmetric configuration, including:
a memory for storing a computer program;
a processor for implementing the steps of the management method for asymmetric configuration as provided in the above embodiments when executing the computer program.
The memory in this embodiment includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory may in some embodiments be an internal storage unit of an asymmetrically configured management device, e.g. a hard disk of a server, such as a configuration management server or a node server. The memory may also be an external storage device of the asymmetrically configured management device in other embodiments, such as a plug-in hard disk provided on the server, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory may also include both internal storage units of the distributed device and external storage devices. The memory can be used for storing application software installed in the asymmetrically configured management device and various data, such as: the code of the program or the like, which executes the asymmetrically configured management method, may also be used to temporarily store data that has been output or is to be output.
The processor in this embodiment may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip in some embodiments, and is configured to run program code stored in a memory or process data, such as code of a program that executes an asymmetrically configured management method.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the management method for asymmetric configuration provided in the foregoing embodiment are implemented.
Wherein the computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device, the apparatus and the computer-readable storage medium disclosed in the embodiments correspond to the method disclosed in the embodiments, so that the description is simple, and the relevant points can be referred to the description of the method.
The present invention provides a method, an apparatus, a device and a computer readable storage medium for managing asymmetric configurations. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (8)

1. A method for managing an asymmetric configuration, comprising:
when a target node is configured, acquiring a symmetrical configuration file corresponding to all preset nodes stored by a configuration management server; the symmetric configuration file comprises asymmetric configuration information of all the preset nodes, and the target node is any one of the preset nodes;
converting the symmetric configuration file into an asymmetric configuration file corresponding to the target node according to the asymmetric configuration information and the specific information of the target node, so that the target node completes configuration by using the asymmetric configuration file;
when the symmetric configuration file includes configuration files of client nodes corresponding to a preset number of server nodes, the converting the symmetric configuration file into an asymmetric configuration file corresponding to the target node according to the asymmetric configuration information and the specific information of the target node includes:
judging whether the target node is the server node or not according to the server node identity information and the target node identity information in the asymmetric configuration information;
if the target node is the server node, obtaining an asymmetric configuration file corresponding to the target node by adjusting a configuration file of a client node corresponding to the target node in the symmetric configuration file according to node configuration information of the target node; wherein the specific information comprises the identity information and the node configuration information;
and if the target node is the client node, taking the configuration file of the target node in the symmetric configuration file as an asymmetric configuration file corresponding to the target node.
2. The method for managing asymmetric configuration according to claim 1, wherein the obtaining a symmetric configuration file corresponding to all the preset nodes stored by the configuration management server when configuring the target node includes:
when the configuration management server configures the target node, the stored symmetric configuration file is obtained;
correspondingly, after the converting the symmetric configuration file into the asymmetric configuration file corresponding to the target node, the method further includes:
sending the asymmetric configuration file to the target node.
3. The method for managing asymmetric configuration according to claim 1, wherein the obtaining a symmetric configuration file corresponding to all the preset nodes stored by the configuration management server when configuring the target node includes:
and the target node receives the symmetric configuration file sent by the configuration management server.
4. The asymmetric configuration management method according to claim 1, wherein when the symmetric configuration file is an ntp symmetric configuration file and the preset number is 1, the symmetric configuration file is a step-tickets file containing an IP address of an ntp server node;
correspondingly, the determining whether the target node is the server node according to the server node identity information in the asymmetric configuration information and the identity information of the target node includes:
judging whether the target node is the ntp server node or not according to the IP address of the ntp server node and the IP address of the target node;
if the target node is the ntp server node, replacing the IP address of the ntp server node in the step-tickets file with the local clock address of the target node to obtain an asymmetric configuration file corresponding to the target node;
and if the target node is the ntp client node, taking the step-tickets file as an asymmetric configuration file corresponding to the target node.
5. An asymmetrically configured management device, comprising:
the acquisition module is used for acquiring the symmetrical configuration files corresponding to all the preset nodes stored by the configuration management server when the target node is configured; the symmetric configuration file comprises asymmetric configuration information of all the preset nodes, and the target node is any one of the preset nodes;
a conversion module, configured to convert the symmetric configuration file into an asymmetric configuration file corresponding to the target node according to the asymmetric configuration information and the specific information of the target node, so that the target node completes configuration by using the asymmetric configuration file;
when the symmetric configuration file includes configuration files of client nodes corresponding to the preset number of server nodes, the conversion module includes:
the judging submodule is used for judging whether the target node is the server node or not according to the server node identity information in the asymmetric configuration information and the identity information of the target node;
the adjustment submodule is used for adjusting a configuration file of a client node corresponding to the target node in the symmetric configuration file according to the node configuration information of the target node to obtain an asymmetric configuration file corresponding to the target node if the target node is the server node; wherein the specific information comprises the identity information and the node configuration information;
and the determining submodule is used for taking the configuration file of the target node in the symmetric configuration file as the asymmetric configuration file corresponding to the target node if the target node is the client node.
6. The asymmetric configuration management device according to claim 5, wherein when the symmetric configuration file is an ntp symmetric configuration file and the preset number is 1, the symmetric configuration file is specifically a step-tickets file containing an IP address of an ntp server node;
correspondingly, the judging submodule is specifically configured to judge whether the target node is the ntp server node according to the IP address of the ntp server node and the IP address of the target node;
the adjusting submodule is specifically configured to, if the target node is the ntp server node, replace the IP address of the ntp server node in the step-tickets file with the local clock address of the target node to obtain an asymmetric configuration file corresponding to the target node;
the determining submodule is specifically configured to, if the target node is the ntp client node, use the step-tickets file as an asymmetric configuration file corresponding to the target node.
7. An asymmetrically configured management device, comprising:
a memory for storing a computer program;
processor for implementing the steps of the asymmetrically configured management method as claimed in any of claims 1 to 4 when executing said computer program.
8. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps of the method for managing an asymmetric configuration according to any one of claims 1 to 4.
CN201911398117.9A 2019-12-30 2019-12-30 Asymmetric configuration management method, device and equipment and readable storage medium Active CN111193622B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911398117.9A CN111193622B (en) 2019-12-30 2019-12-30 Asymmetric configuration management method, device and equipment and readable storage medium
PCT/CN2020/110946 WO2021135279A1 (en) 2019-12-30 2020-08-25 Asymmetric configuration management method, apparatus and device, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911398117.9A CN111193622B (en) 2019-12-30 2019-12-30 Asymmetric configuration management method, device and equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111193622A CN111193622A (en) 2020-05-22
CN111193622B true CN111193622B (en) 2021-11-09

Family

ID=70709665

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911398117.9A Active CN111193622B (en) 2019-12-30 2019-12-30 Asymmetric configuration management method, device and equipment and readable storage medium

Country Status (2)

Country Link
CN (1) CN111193622B (en)
WO (1) WO2021135279A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111193622B (en) * 2019-12-30 2021-11-09 浪潮电子信息产业股份有限公司 Asymmetric configuration management method, device and equipment and readable storage medium
CN113794587A (en) * 2021-08-31 2021-12-14 新华三云计算技术有限公司 Port configuration method and device
CN116795636B (en) * 2023-06-21 2024-02-13 广州市玄武无线科技股份有限公司 Service system data monitoring method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102455936A (en) * 2010-11-25 2012-05-16 中标软件有限公司 Trunk quick allocation method
CN103634144A (en) * 2013-11-15 2014-03-12 新浪网技术(中国)有限公司 Method, system and equipment for managing multi-IDC (internet data center) cluster configuration file
CN107454140A (en) * 2017-06-27 2017-12-08 北京溢思得瑞智能科技研究院有限公司 A kind of Ceph cluster automatically dispose method and system based on big data platform

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603281A (en) * 2016-12-07 2017-04-26 乐视控股(北京)有限公司 Configuration file management method and system
US10432513B2 (en) * 2017-07-14 2019-10-01 Nicira, Inc. Asymmetric network elements sharing an anycast address
CN107483250A (en) * 2017-08-21 2017-12-15 郑州云海信息技术有限公司 Decentralized configuration management method, device and the system for realizing decentralized configuration management
CN108600029B (en) * 2018-05-09 2022-11-08 深圳壹账通智能科技有限公司 Configuration file updating method and device, terminal equipment and storage medium
CN110138588B (en) * 2019-04-04 2022-07-08 微梦创科网络科技(中国)有限公司 Method and system for automatically managing configuration files, configuration management platform and client
CN111193622B (en) * 2019-12-30 2021-11-09 浪潮电子信息产业股份有限公司 Asymmetric configuration management method, device and equipment and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102455936A (en) * 2010-11-25 2012-05-16 中标软件有限公司 Trunk quick allocation method
CN103634144A (en) * 2013-11-15 2014-03-12 新浪网技术(中国)有限公司 Method, system and equipment for managing multi-IDC (internet data center) cluster configuration file
CN107454140A (en) * 2017-06-27 2017-12-08 北京溢思得瑞智能科技研究院有限公司 A kind of Ceph cluster automatically dispose method and system based on big data platform

Also Published As

Publication number Publication date
WO2021135279A1 (en) 2021-07-08
CN111193622A (en) 2020-05-22

Similar Documents

Publication Publication Date Title
CN111193622B (en) Asymmetric configuration management method, device and equipment and readable storage medium
US11704144B2 (en) Creating virtual machine groups based on request
CN110719209B (en) Cluster network configuration method, system, equipment and readable storage medium
CN110572464A (en) Bottom layer resource state synchronization method and device, cloud platform system and storage medium
CN111399764B (en) Data storage method, data reading device, data storage equipment and data storage medium
CN113656503A (en) Data synchronization method, device and system and computer readable storage medium
CN111064626B (en) Configuration updating method, device, server and readable storage medium
CN112422977A (en) Distribution method and distribution device for audio and video transcoding tasks
CN111124382A (en) Attribute assignment method and device in Java and server
CN114153910A (en) Data acquisition method and device, electronic device and computer program product
CN106101710A (en) A kind of distributed video transcoding method and device
CN116450353A (en) Processor core matching method and device, electronic equipment and storage medium
CN112416568A (en) Duration estimation method and duration estimation device for audio and video transcoding task
CN110990360A (en) File synchronization method based on network storage device and related components
CN113934710B (en) Data acquisition method and device
CN112667393B (en) Method and device for building distributed task computing scheduling framework and computer equipment
CN108574719B (en) Cloud host creation method and device
CN115189931A (en) Distributed key management method, device, equipment and storage medium
CN110515907B (en) Data synchronization method and related device for distributed storage nodes
CN103686224A (en) Method and system for transcoding task obtaining on basis of distributed locks
CN107332679B (en) Centerless information synchronization method and device
CN112765265A (en) Data synchronization method and device, computer equipment and readable storage medium
CN112579189A (en) Configuration file updating method and device
CN112395081A (en) Resource online automatic recovery method, system, server and storage medium
CN109165200B (en) Data synchronization method and device, computing equipment and computer storage medium

Legal Events

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