CN110098960B - Secret-free automatic configuration method and device for distributed block storage system - Google Patents

Secret-free automatic configuration method and device for distributed block storage system Download PDF

Info

Publication number
CN110098960B
CN110098960B CN201910332789.3A CN201910332789A CN110098960B CN 110098960 B CN110098960 B CN 110098960B CN 201910332789 A CN201910332789 A CN 201910332789A CN 110098960 B CN110098960 B CN 110098960B
Authority
CN
China
Prior art keywords
configuration
configuration file
file
node
configuration information
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
CN201910332789.3A
Other languages
Chinese (zh)
Other versions
CN110098960A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201910332789.3A priority Critical patent/CN110098960B/en
Publication of CN110098960A publication Critical patent/CN110098960A/en
Application granted granted Critical
Publication of CN110098960B publication Critical patent/CN110098960B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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/0889Techniques to speed-up the configuration process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The technical scheme of the invention innovatively provides a secret-free automatic configuration method of a distributed block storage system, when a target command is created, whether a system network configuration file contains IP address information of a configuration node or not can be detected and compared with the IP address information of the configuration node in a pre-configured configuration file, the scheme also provides a secret-free automatic configuration device of the distributed block storage system, which can perfect the secret-free automatic configuration process of the distributed block storage system, avoid the problem that cross-node configuration IPSAN service cannot be carried out because the IP of the configuration node in the system network configuration file is not available or incorrect, reduce the implementation time cost of engineers and improve the working efficiency when the number of nodes is large.

Description

Secret-free automatic configuration method and device for distributed block storage system
Technical Field
The invention relates to the field of system configuration, in particular to a secret-free automatic configuration method and device for a distributed block storage system.
Background
The distributed block storage system can provide block services on each node, in order to realize cross-node configuration of a distributed block cluster IPSAN (IP-storage area network) service target (providing end of the IP-based storage area network service), operation of target management needs to be pushed to all cluster nodes needing to configure the IPSAN service, and the cross-node configuration is realized by adding a key word of 'push' in a target management command. Cross-node configuration of the IPSAN requires setting all IPs to configure the IPSAN service node to a specified configuration file/etc/tgt/configuration/info. At present, the distributed block cluster creation target is created through an internally packaged command line, but the exclusive configuration of the IPSAN is not detected in the creation process, which causes command execution failure possibly when the cross-node creation target is created, and meanwhile, when the number of nodes is large, the implementation time cost of an engineer is greatly consumed, which is not beneficial to improving the working efficiency.
Disclosure of Invention
The invention aims to solve the problems in the prior art, and innovatively provides a secret-free automatic configuration method and a secret-free automatic configuration device for a distributed block storage system, which can perfect the secret-free automatic configuration process of the distributed block storage system, reduce the implementation time cost of engineers and improve the working efficiency when the number of nodes is large.
The invention provides a secret-free automatic configuration method of a distributed block storage system in a first aspect, which comprises the following steps:
detecting whether first configuration information of a configuration node in a first configuration file exists or not;
if the first configuration information exists, comparing the first configuration information with second configuration information of configuration nodes in a second configuration file, and if the comparison is consistent, synchronizing the first configuration file to each node of the cluster; if the comparison is inconsistent, deleting the first configuration information of the configuration nodes in the first configuration file, rewriting the second configuration information of the configuration nodes in the second configuration file into the first configuration file, and synchronizing the first configuration file to each node of the cluster;
and if the first configuration information does not exist, writing the second configuration information of the configuration nodes in the second configuration file into the first configuration file, and synchronizing the first configuration file to each node of the cluster.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the first configuration profile is a distributed block storage system network configuration profile.
With reference to the first aspect, in a second possible implementation manner of the first aspect, the second configuration file is a configuration file preconfigured by a distributed block storage system.
With reference to the first aspect, in a third possible implementation manner of the first aspect, the writing of the second configuration information in the second configuration file into the first configuration file is specifically implemented by a python file operation function.
With reference to the first aspect, in a fourth possible implementation manner of the first aspect, the synchronizing of the first configuration file to each node of the cluster is specifically implemented by a scp remote copy command.
With reference to the first aspect, in a fifth possible implementation manner of the first aspect, the first configuration information and the second configuration information are both IP addresses.
The second aspect of the present invention provides a secret-free automatic configuration device for a distributed block storage system, including:
the detection module is used for detecting whether first configuration information of the configuration nodes exists in the first configuration file;
the comparison module is used for comparing whether the first configuration information is consistent with the second configuration information of the configuration nodes in the second configuration file or not if the detection result is that the first configuration information exists according to the detection result of the detection module, and synchronizing the first configuration file to each node of the cluster if the first configuration information is consistent with the second configuration information of the configuration nodes in the second configuration file; if the comparison is inconsistent, deleting the first configuration information of the configuration nodes in the first configuration file, rewriting the second configuration information of the configuration nodes in the second configuration file into the first configuration file, and synchronizing the first configuration file to each node of the cluster;
and the writing module writes the second configuration information in the second configuration file into the first configuration file and synchronizes the first configuration file to each node of the cluster if the detection result is that the first configuration information does not exist according to the detection result of the detection module.
The technical scheme adopted by the invention comprises the following technical effects:
the technical scheme of the invention can improve the secret-free automatic configuration process of the distributed block storage system, avoid the problem that cross-node configuration IPSAN service cannot be carried out because the IP of the configuration node in the system network configuration file is not or incorrect, reduce the implementation time cost of engineers and improve the working efficiency when the number of nodes is more.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without any creative effort.
Fig. 1 is a schematic flowchart of a secret-free automatic configuration method for a distributed block storage system according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a secret-free automation configuration apparatus of a distributed block storage system according to an embodiment of the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
Example one
As shown in fig. 1, the technical solution of the present invention provides a secret-free automatic configuration method for a distributed block storage system, where the method includes:
s1, detecting whether the first configuration information of the configuration node in the first configuration file exists, if so, executing the step S2, and if not, executing the step S3;
s2, comparing the first configuration information with the second configuration information of the configuration node in the second configuration file to see if they are consistent, if yes, executing step S4; if the judgment result is no, executing step S5;
s3, writing the second configuration information of the configuration nodes in the second configuration file into the first configuration file, and synchronizing the first configuration file to each node of the cluster;
s4, synchronizing the first configuration file to each node of the cluster;
s5, delete the first configuration information of the configuration node in the first configuration file, rewrite the second configuration information of the configuration node in the second configuration file into the first configuration file, and synchronize the first configuration file to each node of the cluster.
In step S1, the currently distributed block cluster creation target is created through an internally packaged command line, and when the implementer executes the command to create the target, it is specifically implemented through a system command ifconfig to automatically detect whether first configuration information of a configuration node in a first configuration file exists, where the first configuration file is a system network configuration file (a configuration file for target service), specifically/etc/tgt/configuration/info.
In step S2, the second configuration file is a configuration file pre-configured by the distributed block storage system, and the configuration information of all nodes of the distributed block cluster is configured in the second configuration file, specifically/etc/hosts.
In steps S3 and S5, writing the second configuration information of the configuration node in the second configuration file into the first configuration file is specifically realized by a python file operation function.
In steps S3, S4, S5, the synchronization of the first configuration file to each node of the cluster is specifically realized by a scp remote copy command.
In steps S1-S5, the first configuration information and the second configuration information are IP address information of the configuration node.
Example two
As shown in fig. 2, the technical solution of the present invention further provides a secret-free automatic configuration device for a distributed block storage system, including:
the detection module 101 detects whether first configuration information of a configuration node in a first configuration file exists;
a comparison module 102, configured to compare, according to the detection result of the detection module 101, whether the first configuration information is consistent with second configuration information of configuration nodes in a second configuration file if the detection result is that the first configuration information exists, and synchronize the first configuration file to each node of the cluster if the first configuration information is consistent with the second configuration information of the configuration nodes in the second configuration file; if the comparison is inconsistent, deleting the first configuration information of the configuration nodes in the first configuration file, rewriting the second configuration information of the configuration nodes in the second configuration file into the first configuration file, and synchronizing the first configuration file to each node of the cluster;
and a writing module 103, configured to write the second configuration information in the second configuration file into the first configuration file and synchronize the first configuration file to each node of the cluster according to the detection result of the detecting module 101, if the detection result indicates that the first configuration information does not exist.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (4)

1. A secret-free automatic configuration method for a distributed block storage system is characterized by comprising the following steps:
detecting whether first configuration information of a configuration node in a first configuration file exists or not;
if the first configuration information exists, comparing the first configuration information with second configuration information of configuration nodes in a second configuration file, and if the comparison is consistent, synchronizing the first configuration file to each node of the cluster; if the comparison is inconsistent, deleting the first configuration information of the configuration nodes in the first configuration file, rewriting the second configuration information of the configuration nodes in the second configuration file into the first configuration file, and synchronizing the first configuration file to each node of the cluster; the first configuration information and the second configuration information are both IP addresses;
if the first configuration information does not exist, writing second configuration information of configuration nodes in the second configuration file into the first configuration file, and synchronizing the first configuration file to each node of the cluster; the first configuration file is a network configuration file of the distributed block storage system, and the second configuration file is a pre-configured configuration file of the distributed block storage system.
2. The secret-less automation configuration method for the distributed block storage system according to claim 1, wherein the writing of the second configuration information of the configuration node in the second configuration file into the first configuration file is implemented by a python file operation function.
3. The method as claimed in claim 1, wherein the synchronization of the first configuration file to each node of the cluster is implemented by a scp remote copy command.
4. The utility model provides a secret automatic configuration device is exempted from to distributed block memory system which characterized by includes:
the detection module is used for detecting whether first configuration information of the configuration nodes exists in the first configuration file;
the comparison module is used for comparing whether the first configuration information is consistent with the second configuration information of the configuration nodes in the second configuration file or not according to the detection result of the detection module if the detection result is that the first configuration information exists, and synchronizing the first configuration file to each node of the cluster if the first configuration information is consistent with the second configuration information of the configuration nodes in the second configuration file; if the comparison is inconsistent, deleting the first configuration information of the configuration nodes in the first configuration file, rewriting the second configuration information of the configuration nodes in the second configuration file into the first configuration file, and synchronizing the first configuration file to each node of the cluster; the first configuration information and the second configuration information are both IP addresses;
the writing module is used for writing the second configuration information in the second configuration file into the first configuration file and synchronizing the first configuration file to each node of the cluster if the detection result is that the first configuration information does not exist according to the detection result of the detection module; the first configuration file is a network configuration file of the distributed block storage system, and the second configuration file is a pre-configured configuration file of the distributed block storage system.
CN201910332789.3A 2019-04-24 2019-04-24 Secret-free automatic configuration method and device for distributed block storage system Active CN110098960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910332789.3A CN110098960B (en) 2019-04-24 2019-04-24 Secret-free automatic configuration method and device for distributed block storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910332789.3A CN110098960B (en) 2019-04-24 2019-04-24 Secret-free automatic configuration method and device for distributed block storage system

Publications (2)

Publication Number Publication Date
CN110098960A CN110098960A (en) 2019-08-06
CN110098960B true CN110098960B (en) 2022-07-08

Family

ID=67445699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910332789.3A Active CN110098960B (en) 2019-04-24 2019-04-24 Secret-free automatic configuration method and device for distributed block storage system

Country Status (1)

Country Link
CN (1) CN110098960B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111147542A (en) * 2019-11-24 2020-05-12 浪潮电子信息产业股份有限公司 Secret-free access setting method, device, equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105162824A (en) * 2015-07-07 2015-12-16 浪潮(北京)电子信息产业有限公司 Host multi-path disposition method in cloud storage system, and system
CN105897827A (en) * 2015-11-27 2016-08-24 乐视云计算有限公司 Server node, local area network server cluster and realizing method thereof
CN108600029A (en) * 2018-05-09 2018-09-28 深圳壹账通智能科技有限公司 A kind of configuration file update method, device, terminal device and storage medium
CN108900347A (en) * 2018-07-09 2018-11-27 郑州云海信息技术有限公司 Cluster initiated configuration method, device, system, equipment and readable storage medium storing program for executing
CN109039764A (en) * 2018-08-28 2018-12-18 郑州云海信息技术有限公司 A kind of network parameter configuration method of distributed memory system
CN109542865A (en) * 2018-12-03 2019-03-29 郑州云海信息技术有限公司 Distributed cluster system configuration file synchronous method, device, system and medium
CN109600260A (en) * 2018-12-11 2019-04-09 浪潮(北京)电子信息产业有限公司 Distributed memory system High Availabitity arrrangement method, system and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10425275B2 (en) * 2015-02-12 2019-09-24 Advanced Micro Devices, Inc. Centralized distribution of configuration parameters for a cluster server

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105162824A (en) * 2015-07-07 2015-12-16 浪潮(北京)电子信息产业有限公司 Host multi-path disposition method in cloud storage system, and system
CN105897827A (en) * 2015-11-27 2016-08-24 乐视云计算有限公司 Server node, local area network server cluster and realizing method thereof
CN108600029A (en) * 2018-05-09 2018-09-28 深圳壹账通智能科技有限公司 A kind of configuration file update method, device, terminal device and storage medium
CN108900347A (en) * 2018-07-09 2018-11-27 郑州云海信息技术有限公司 Cluster initiated configuration method, device, system, equipment and readable storage medium storing program for executing
CN109039764A (en) * 2018-08-28 2018-12-18 郑州云海信息技术有限公司 A kind of network parameter configuration method of distributed memory system
CN109542865A (en) * 2018-12-03 2019-03-29 郑州云海信息技术有限公司 Distributed cluster system configuration file synchronous method, device, system and medium
CN109600260A (en) * 2018-12-11 2019-04-09 浪潮(北京)电子信息产业有限公司 Distributed memory system High Availabitity arrrangement method, system and device

Also Published As

Publication number Publication date
CN110098960A (en) 2019-08-06

Similar Documents

Publication Publication Date Title
CN110442560B (en) Log replay method, device, server and storage medium
CN102118283B (en) Method and device for testing communication equipment
CN104182288A (en) Method for automatically testing power consumption of server cluster system
US20230025449A1 (en) Method and apparatus for dynamically adding consensus node in blockchain
CN110673941B (en) Migration method of micro-services in multiple computer rooms, electronic equipment and storage medium
CN113783765B (en) Method, system, equipment and medium for realizing intercommunication between cloud internal network and cloud external network
CN110647511A (en) Data synchronization method, computing device and computer storage medium
CN108319617B (en) Method and device for determining master-slave difference of database and switching control method and device
CN107239238B (en) Storage IO operation method and device based on distributed lock
CN105260202A (en) Client file updating method and system
CN108140035B (en) Database replication method and device for distributed system
CN106708748B (en) Method and system for improving mounting performance of OpenStack block storage volume
CN108062235B (en) Data processing method and device
US11641405B2 (en) GPU box server cascade communication method, device, and system
CN113704790A (en) Abnormal log information summarizing method and computer equipment
CN112769652A (en) Node service monitoring method, device, equipment and medium
CN110098960B (en) Secret-free automatic configuration method and device for distributed block storage system
CN112052230A (en) Multi-machine room data synchronization method, computing equipment and storage medium
CN114244654B (en) URL forwarding method, device, equipment and computer storage medium
CN109299116B (en) Data synchronization method, device, equipment and readable storage medium
CN105354332A (en) Method and system for implementing mutual standby of database and middleware based on BCP (Batch Communications Program)
CN111339055B (en) Big data cluster capacity expansion method and device
CN107623705B (en) Storage mode upgrading method, device and system based on video cloud storage system
CN104951528A (en) Data migration method and terminal
CN111651459A (en) Service ID generation method based on Redis

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