CN112291289A - Method and apparatus for managing configuration file and computer readable storage medium - Google Patents

Method and apparatus for managing configuration file and computer readable storage medium Download PDF

Info

Publication number
CN112291289A
CN112291289A CN201910673360.0A CN201910673360A CN112291289A CN 112291289 A CN112291289 A CN 112291289A CN 201910673360 A CN201910673360 A CN 201910673360A CN 112291289 A CN112291289 A CN 112291289A
Authority
CN
China
Prior art keywords
configuration file
node
new configuration
network
historical
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.)
Withdrawn
Application number
CN201910673360.0A
Other languages
Chinese (zh)
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.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software 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 China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201910673360.0A priority Critical patent/CN112291289A/en
Publication of CN112291289A publication Critical patent/CN112291289A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

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

Abstract

The embodiment of the application discloses a method and equipment for managing configuration files and a computer readable storage medium. The method is applied to network equipment and comprises the following steps: acquiring and storing a historical configuration file of at least one network node; displaying the historical configuration file through a web interface, acquiring modification information aiming at the historical configuration file, and generating a new configuration file; sending the new configuration file to a first node of the at least one network node; if the first node succeeds in updating the new configuration file, the new configuration file is sent to the second node; the second node is a node which does not receive a new configuration file in at least one network node; and if the first node fails to update the new configuration file, the historical configuration file is sent to a third node again, wherein the third node is a node which is successfully updated by the new configuration file in at least one network node. Therefore, the management and maintenance steps of the configuration files are simplified, and the risk caused by failure in updating the configuration files is eliminated.

Description

Method and apparatus for managing configuration file and computer readable storage medium
Technical Field
The present application relates to cloud computing technologies, and in particular, to a method and an apparatus for managing configuration files, and a computer-readable storage medium.
Background
With the increasing popularity of cloud computing, the scale of a cloud platform is increasing, the number of nodes in the cloud platform is also increasing, the number of configuration files on the nodes is also increasing, the configuration files are inevitably required to be changed and modified in the operation and maintenance process of the cloud platform, meanwhile, the configuration of the nodes (including control nodes and computing nodes) with the same property is also ensured to be consistent, and in order to eliminate the interruption or paralysis of the service of the whole cloud platform caused by artificial modification errors, it is necessary to uniformly manage the configuration files of the cloud platform.
At present, for a cloud platform environment with few nodes, a manual maintenance configuration file is generally used, namely, after maintenance personnel log in each node to modify the configuration file, a restart service is effective; for a cloud platform environment with more nodes, scripts are used for assistance, and management tools such as Puppet, Salt Stack, and infrastructure are configured.
In the two schemes, the manual maintenance of the configuration files is only suitable for the environment with few nodes, and the manual modification of the configuration files inevitably causes misoperation. Different nodes have very strict requirements on formats and configured key value pairs in configuration files, and are easy to modify errors, and after one modification error, the problem of the whole system is troubled; at present, the cloud computing industry develops rapidly, the scale of cloud platform nodes is increased continuously, the number of nodes in an actual production environment is dozens, hundreds or even thousands, and manual maintenance is basically impossible. Although some misoperation of manual maintenance can be eliminated by the aid of the script tools, problems exist, the language and grammar used by each script tool are different, and time and cost are required for ordinary operation and maintenance personnel to learn the languages. The existence of the problems causes the operation and maintenance efficiency of the cloud platform configuration file to be low and the operation and maintenance cost to be high.
Disclosure of Invention
In order to solve the foregoing technical problems, embodiments of the present application are expected to provide a method, a device, and a computer-readable storage medium for managing configuration files, which can improve operation and maintenance management efficiency of the configuration files.
The technical scheme of the application is realized as follows:
in a first aspect, a method for profile management is provided, which is applied to a network device, and includes:
acquiring and storing a historical configuration file of at least one network node;
displaying the historical configuration file through a web interface, acquiring modification information aiming at the historical configuration file, and generating a new configuration file;
sending the new configuration file to a first node of the at least one network node;
if the first node succeeds in updating the new configuration file, sending the new configuration file to a second node; wherein the second node is a node of the at least one network node that did not receive the new configuration file;
and if the first node fails to update the new configuration file, the historical configuration file is sent to a third node again, wherein the third node is a node which is successfully updated by the new configuration file in the at least one network node.
In a second aspect, a network device, the network device comprising:
the communication unit is used for acquiring and storing the historical configuration file of at least one network node;
the display unit is used for displaying the historical configuration file through a web interface;
the acquisition unit is used for acquiring modification information aiming at the historical configuration file and generating a new configuration file;
the communication unit is configured to send the new configuration file to a first node of the at least one network node;
the processing unit is used for sending the new configuration file to a second node if the first node successfully updates the new configuration file; wherein the second node is a node of the at least one network node that did not receive the new configuration file;
the processing unit is configured to, if the first node fails to update the new configuration file, resend the historical configuration file to a third node, where the third node is a node of the at least one network node that successfully updates the new configuration file.
In a third aspect, a network device is provided, and the network device includes:
the communication interface is used for acquiring and storing the historical configuration file of at least one network node;
the processor is used for displaying the historical configuration file through a web interface, acquiring modification information aiming at the historical configuration file and generating a new configuration file;
the communication interface is configured to send the new configuration file to a first node of the at least one network node;
the processor is configured to control the communication interface to send the new configuration file to a second node if the first node succeeds in updating the new configuration file; wherein the second node is a node of the at least one network node that did not receive the new configuration file;
the processor is configured to control the communication interface to resend the historical configuration file to a third node if the first node fails to update the new configuration file, where the third node is a node of the at least one network node that successfully updates the new configuration file.
In a fourth aspect, a computer storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the aforementioned method.
By adopting the technical scheme, the configuration files are managed in a centralized way through the web service, the management of the configuration files becomes simple through the visual web interface, extra script language learning cost is not needed, the historical configuration files can be recovered when any network node fails to update in the process of sending and updating the new configuration files, and the risk caused by the failure in updating the configuration files in batch is eliminated.
Drawings
FIG. 1 is a schematic flow chart of a configuration file management method in an embodiment of the present application, which is shown in FIG. 1;
FIG. 2 is a schematic flow chart of a configuration file management method according to an embodiment of the present application, which is shown in FIG. 2;
FIG. 3 is a flowchart illustrating a method for managing configuration files in an embodiment of the present application, schematically illustrated in FIG. 3;
fig. 4 is a schematic structural diagram 1 of a network device in the embodiment of the present application;
fig. 5 is a schematic structural diagram 2 of a network device in the embodiment of the present application.
Detailed Description
So that the manner in which the features and elements of the present embodiments can be understood in detail, a more particular description of the embodiments, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings.
Example one
An embodiment of the present application provides a method for managing a configuration file, which is applied to a network device, and as shown in fig. 1, the method for managing the configuration file includes:
step 101: acquiring and storing a historical configuration file of at least one network node;
step 102: displaying the historical configuration file through a web interface, acquiring modification information aiming at the historical configuration file, and generating a new configuration file;
step 103: sending the new configuration file to a first node of the at least one network node;
step 104: if the first node succeeds in updating the new configuration file, the new configuration file is sent to the second node; the second node is a node which does not receive a new configuration file in at least one network node;
step 105: and if the first node fails to update the new configuration file, the historical configuration file is sent to a third node again, wherein the third node is a node which is successfully updated by the new configuration file in at least one network node.
Here, the executing subject of steps 101 to 105 may be a processor of a network device, on which a web service is deployed, and the web service is used to implement centralized management of the network node configuration file. web services enable different applications running on different machines to exchange data or integrate with each other without the aid of additional, specialized third-party software or hardware. Depending on the web service specification implementation, network nodes may exchange data with each other regardless of the language, platform, or internal protocol they use. web services provide a common mechanism for the integration of business processes throughout an enterprise and even across multiple organizations.
In practical application, the method is used for managing configuration files of each network node on the cloud platform, each network node comprises a plurality of services, each service also comprises a plurality of configuration files, the number of the configuration files to be managed is increased along with the increase of the number of the network nodes, and the operation and maintenance cost of the configuration files is also increased. According to the method and the system, the centralized management of the network node configuration files is realized through the web service, the historical configuration files of different nodes in different formats can be displayed on a web interface, and the modification information input by operation and maintenance personnel through the web interface is acquired. The operation and maintenance personnel do not need to learn the languages and the grammars used by different script tools, and the learning cost of the operation and maintenance personnel is reduced.
In practical application, the method for obtaining the historical configuration file may include: the network device establishes communication connection with the network node, the network device responds to a request message by sending a historical configuration file request message to the network node, the network node uploads a historical configuration file locally stored with at least one service to the network device, and the network device receives the historical configuration file and stores the historical configuration file as a backup.
In practice, the profiles of the network nodes of the same nature should be consistent, so that at least one network node may have the same historical profile, or at least some network nodes may have different historical profiles. Therefore, when acquiring the history configuration file, the history configuration files of all the network nodes can be acquired, or the history configuration file of one network node in the network nodes with the same property can be acquired.
In practical application, the web interface is responsible for displaying and interacting the configuration files, and after an operation and maintenance person logs in the system, the operation and maintenance person can select and view the content of a certain configuration file of a certain service in any node on the web interface; configuration parameters in the configuration file may also be modified through the web interface. The web interface provides a good interaction platform for operation and maintenance personnel, the management operation is simple and easy to learn, the misoperation during manual configuration file modification can be eliminated, and the learning cost of the operation and maintenance personnel during management by means of a script tool can be reduced.
Specifically, the operation and maintenance personnel select the historical configuration file to be modified through the web interface, set modification information, select the network node to be updated, and send the new configuration file to the network node selected by the operation and maintenance personnel.
Specifically, a first node is determined from at least one network node, and a new configuration file is sent to the first node; the first node overwrites the old configuration file (i.e., the historical configuration file) with the new configuration file, and then starts an Application Programming Interface (API) with the new configuration file. The successful start indicates that the new configuration file is successfully updated, and the failed start indicates that the new configuration file is failed to be updated.
Further, after the updating is successful, sending the new configuration file to the second node; and if the updating fails, the historical configuration file is sent to the third node again.
In some embodiments, step 104 specifically includes: if the first node succeeds in updating the new configuration files, the new configuration files are sent to the second node one by one; and if any second node fails to update the new configuration file, the historical configuration file is sent to the third node again.
That is, if the first node succeeds in updating the new configuration file, the new configuration file is sent to the second node, and the first node is used as the third node. The second node overwrites the old configuration file (i.e., the historical configuration file) with the new configuration file and then starts the relevant services and APIs with the new configuration file. And if any second node fails to update, sending the historical configuration file backed up on the network equipment to a third node and restarting the related service and API, wherein the whole sending process and the service restarting process do not need manual intervention.
According to the method and the device, the services corresponding to the new configuration files can be guaranteed to be correct and effective one by one, the historical configuration files can be recovered when any one network node fails to update, the services on the network nodes can be timely recovered, and risks caused by update failure when the configuration files are updated in batches are eliminated.
In some embodiments, the method further comprises: and recording the modification information. Specifically, if all the nodes in the at least one network node update the new configuration file successfully, the new configuration file and the corresponding modification information are saved.
In some embodiments, the method further comprises: the modification information is queried. Specifically, a query instruction is received, and a configuration file and/or modification information corresponding to the query instruction are displayed through a web interface. Here, the query instruction may include query object information, such as information of a network node, a service, a configuration file, and the like, and if the queried configuration file has modification information, the modification information and the configuration file are simultaneously displayed, or only the modification information is displayed; and if the inquired configuration file has no modification information, only displaying the modification information.
The configuration file modification monitoring function is added in the embodiment of the application, and the modification information of the configuration file is recorded, so that the query is facilitated, and the problem troubleshooting is facilitated.
In some embodiments, the monitoring function further comprises a modification monitoring function to the network node side. Specifically, a first configuration file stored by a target node in at least one network node is obtained; acquiring a second configuration file of a target node stored by the network equipment; when the first configuration file is different from the second configuration file, determining difference information of the target node configuration file; and displaying the difference information of the target node configuration file through a web interface. The method further comprises the following steps: and when the first configuration file is different from the second configuration file, generating alarm information.
That is, the purpose of the network device backing up the historical configuration file is to monitor modifications to the configuration file on the network node side. For example, the differences between the configuration files backed up on the network device side and the configuration files on the nodes are compared at regular time according to the configured time interval, and if the differences are different, the operation and maintenance personnel can see an alarm prompt on an interface after logging in the system and display specific difference information.
Further, the method further comprises: according to the difference information, the configuration file backed up in the network equipment is sent to the target node, so that the target node updates the local configuration file by using the received configuration file; or sending the configuration file modified by the target node to at least part of nodes in at least one network node, wherein the target node is the node of which the configuration file in at least one network node is modified.
That is, when the operation and maintenance personnel find that the configuration file on the network node side is modified, the configuration file backed up in the network device is sent to the target node, or the configuration file modified by the target node is used for updating other network nodes. The consistency of the configuration files in the plurality of network nodes is ensured.
By adopting the technical scheme, the configuration files are managed in a centralized way through the web service, the management of the configuration files becomes simple through the visual web interface, extra script language learning cost is not needed, the historical configuration files can be recovered when any network node fails to update in the process of sending and updating the new configuration files, and the risk caused by the failure in updating the configuration files in batch is eliminated.
Example two
On the basis of the first embodiment of the application, a specific implementation scenario that the management method for the configuration file is applied to an Openstack cloud platform is provided. Openstack is a current active cloud platform, and at present, the latest version of Queens has 24 available components, wherein core components include Keystone-authentication service, Nova-computing service, Cinder-block storage service, Glance-mirror service, Neutron-network service, Swift-object storage service, Heat-cluster service, Ceilometer-monitoring service and the like. Each component has 1 to 3 unequal configuration files, the configuration files of at least each component needing to be managed in a normally running Openstack cloud platform exceed twenty, and the number of the configuration files is increased continuously with the increase of the number of nodes. In the process of operation and maintenance of the cloud platform, the configuration files are inevitably required to be changed and modified, and meanwhile, the configuration of nodes (divided into control nodes and computing nodes) with the same property is ensured to be consistent, so that the problem that the service of the whole cloud platform is interrupted or broken down due to artificial modification errors is solved, and therefore, the configuration files of the cloud platform are required to be managed uniformly.
As shown in fig. 2, the method for managing a configuration file specifically includes:
step 201: starting a web service, acquiring a historical configuration file and storing the historical configuration file in a database;
specifically, when the web service is started, each Openstack component configuration of the current environment is initialized in the database. Firstly, detecting a node of an up state in a current Openstack environment; analyzing component configuration files needing to be managed from the nodes in the up state (the default configuration files of all components are all placed under/etc/component name/directory, and whether management is carried out or not is confirmed by analyzing whether the configuration files exist under the paths or not); and sequentially pulling the configuration files on each node to the network equipment where the web service is located, analyzing parameters according to different file types (the configuration files mainly comprise conf, ini, json and yaml formats), and storing the configuration files in a database. The communication between the network and each node is in a ssh mode, because the Openstack platform can perform ssh mutual trust configuration on all nodes during deployment, a web service can directly multiplex ssh key pairs generated after Openstack deployment, and an open-source third-party ssh tool is adopted to communicate with each node, so that the safety is ensured.
In practical application, a relational database cluster can be adopted to record configuration file parameters on each node, the database cluster can directly multiplex the existing database cluster of the cloud platform (the database cluster can be deployed when the Openstack cloud platform is built), the deployment difficulty is reduced, and the high availability of the database is ensured.
Because the production environment of the Openstack cloud platform service is deployed by adopting a multi-node high availability scheme, the network equipment in the embodiment of the application can directly reuse the deployment scheme, and high availability is ensured. Meanwhile, when the network equipment is deployed, the names of operation and maintenance personnel and ssh file paths of ssh operation need to be configured on the network equipment, so that the communication safety of the nodes is ensured; and deploying the database table so that the data is persisted. Because the network device deployment scheme multiplexes the Openstack deployment scheme, only the network device needs to be deployed at the control node, generally, the number of the control nodes (the number of the cloud platform nodes is less than 100) is only 1-3, and at most, the number of the control nodes does not exceed 10 under special conditions (the number of the cloud platform nodes is more than 100), and individual configuration is not needed on each node needing to be managed.
Step 202: displaying the historical configuration file through a web interface, acquiring modification information aiming at the historical configuration file, and generating a new configuration file;
the web interface is responsible for interface presentation and interaction of the configuration file. Configuration files of each component of Openstack are various, and mainly comprise conf, ini, json and yaml formats. Documents with suffixes conf and ini are presented in the form of a form, json and yaml are presented in the form of text. The web interface provides a good interaction environment for operation and maintenance personnel, is simple and easy to operate, and eliminates misoperation when the configuration file is manually modified.
Step 203: sending the new configuration file to at least one network node;
here, the modified configuration files (i.e. new configuration files) are sent to the nodes selected by the operation and maintenance personnel in batch, and if a problem occurs in restarting the service by a node according to the new configuration files in the sending process, all the historical configuration files of the nodes which are successfully updated are returned, so that the service availability of all the nodes is ensured.
One of the most important rings in the centralized management of configuration files is the sending operation of the configuration files, and a specific sending flow of the configuration files is shown in fig. 3, which includes:
step 301: pulling the historical configuration file to a local backup;
specifically, configuration file initialization data of each service is pulled from each node of the Openstack to a database when the web service is started, and after an operation and maintenance person logs in a management system, the operation and maintenance person can select to view the content of a certain configuration file of a certain service in any node of the cloud platform on a web interface, and can modify the content of a certain configuration file on the web interface to obtain a new configuration file.
Step 302: after the configuration is modified, a new configuration file is stored;
step 303: selecting a first node to transmit;
step 304: sending the new configuration file to the first node;
specifically, after modifying the configuration file, the operation and maintenance personnel select and confirm the nodes to be sent, and select the first node from the nodes to be sent to send in the actual sending process. Here, the manner of selecting the first node may be selected by the operation and maintenance staff, or selected by the network device according to a preset rule, for example, randomly selected, and the node closest to the network device is selected.
Step 305: the first node uses the new configuration file to cover the historical configuration file, and restarts the service and the API;
step 306: judging whether the restart is successful, if the restart is failed, executing step 307; if successful, go to step 309;
step 307: resending the historical profile to the first node;
step 308: the first node restarts the service and the API according to the historical configuration file;
step 309: sending the new configuration file to other nodes;
that is, only if the first node succeeds in restarting the service and API with the new configuration file, the first node will continue to send the new configuration file to the selected other nodes for updating, otherwise, the first node will send the historical configuration file again, which indicates that the service is restarted with the new configuration file. Because the historical configuration file is available at the node before, the historical configuration file is sent again, so that normal starting of the node service can be ensured, and the risk caused by updating failure when the configuration file is updated in batches is eliminated.
Step 310: other nodes use the new configuration file to cover the historical configuration file, and restart the service and the API;
step 311: judging whether the restart is successful, if so, executing step 312; if not, go to step 313;
step 312: updating the parameters to the database and recording modification information;
step 313: the historical configuration file is sent to the node which is updated successfully again;
step 314: and the nodes which are successfully updated use the historical configuration files to cover the new configuration files, and the service and the API are restarted.
That is, after all selected nodes are updated successfully, the new configuration file is saved in the database, and meanwhile, the modification information is also saved in the database. If other nodes fail subsequently, the historical configuration file locally backed up before the network equipment is automatically sent to the nodes which are successfully updated and relevant services and APIs are restarted, and the whole sending process and the service restarting process do not need manual intervention.
In practical application, the restart service may be automatically restarted by executing a service restart command by using a third-party java ssh tool. If the nova.conf configuration of the nova component on the computing node is modified, the ssh tool executes a command system restart opentrack-nova-computer to restart the nova-computer service of the computing node, and the configuration can take effect after the restart is successful. In the process of sending the configuration file, the method of get and put between the control node where the web service is located and the selected sending node can be used for obtaining and updating the configuration file directly through a java ssh tool without an intermediate node, and the sending and updating process is fast because the configuration files are small.
Step 204: acquiring a first configuration file stored by a target node in at least one network node, and acquiring a second configuration file of the target node stored by network equipment;
step 205: when the first configuration file is different from the second configuration file, determining difference information of the target node configuration file and generating alarm information;
that is, the purpose of the network device backing up the historical configuration file is to monitor modifications to the configuration file on the network node side. For example, the differences between the configuration files backed up on the network device side and the configuration files on the nodes are compared at regular time according to the configured time interval, and if the differences are different, the operation and maintenance personnel can see an alarm prompt on an interface after logging in the system and display specific difference information.
Further, the method further comprises: according to the difference information, the configuration file backed up in the network equipment is sent to the target node, so that the target node updates the local configuration file by using the received configuration file; or sending the configuration file modified by the target node to at least part of nodes in at least one network node, wherein the target node is the node of which the configuration file in at least one network node is modified.
Step 206: displaying the difference information of the target node configuration file through a web interface;
the difference information is displayed through the web interface, so that operation and maintenance personnel can be helped to timely and accurately know the nodes generating the difference and the specific difference content, the operation and maintenance personnel can quickly determine the maintenance scheme according to the difference information, and the maintenance efficiency is improved.
Adopt above-mentioned technical scheme's advantage to lie in: the web management system is adopted to carry out centralized management on the configuration files in the cloud platform, the operation is simple, and extra script language learning cost is not needed; meanwhile, the system can directly multiplex the high-availability scheme of the existing cloud platform, the cloud platform is directly deployed at the high-availability control node without being deployed at each node, and simultaneously, the high-availability database of the cloud platform is multiplexed, and the data table to be stored is directly established in the existing database, so that the deployment of the system is simplified, and the high availability of the system is ensured; meanwhile, the system reuses ssh mutual trust configuration of each node of the cloud platform, so that the safety of the system is ensured; compared with the existing configuration management tool, the system has the advantages that the monitoring function is added, the modification records of the files can be tracked, and the warning prompt is carried out on the operation of manual modification on the nodes; meanwhile, when the configuration file is sent, the operation is carried out one by one, and the verification is carried out, so that the node service can be ensured to be correctly effective or recovered.
EXAMPLE III
An embodiment of the present application further provides a network device, as shown in fig. 4, where the network device includes:
a communication unit 401, configured to obtain and store a historical configuration file of at least one network node;
a display unit 402, configured to display the historical configuration file through a web interface;
an obtaining unit 403, configured to obtain modification information for the historical configuration file, and generate a new configuration file;
a communication unit 401 configured to send the new configuration file to a first node of the at least one network node;
a processing unit 404, configured to, if the first node succeeds in updating the new configuration file, send the new configuration file to the second node; the second node is a node which does not receive a new configuration file in at least one network node;
the processing unit 404 is configured to, if the first node fails to update the new configuration file, resend the historical configuration file to a third node, where the third node is a node of the at least one network node that has successfully updated the new configuration file.
In some embodiments, the communication unit 401 is configured to send the new configuration files to the second node one by one; the processing unit 404 is configured to, if any one of the second nodes fails to update the new configuration file, control the communication unit to resend the historical configuration file to the third node.
In some embodiments, the processing unit 404 is configured to, if the update of the new configuration file by all nodes in the at least one network node is successful, save the new configuration file and the corresponding modification information.
In some embodiments, the obtaining unit 403 is configured to receive a query instruction, and the displaying unit 402 is configured to display a configuration file and/or modification information corresponding to the query instruction through a web interface.
In some embodiments, the communication unit 401 is configured to obtain a first configuration file saved by a target node of the at least one network node; a processing unit 404, configured to obtain a second configuration file of a target node saved by a network device; when the first configuration file is different from the second configuration file, determining difference information of the target node configuration file; and the display unit 402 is used for displaying the difference information of the target node configuration file through a web interface.
In some embodiments, the processing unit 404 is configured to generate the alarm information when the first configuration file is different from the second configuration file.
Example four
An embodiment of the present application provides another network device, as shown in fig. 5, the network device includes:
a communication interface 501, configured to obtain and store a historical configuration file of at least one network node;
a processor 502, configured to display the historical configuration file through a web interface, obtain modification information for the historical configuration file, and generate a new configuration file;
a communication interface 501 for sending the new configuration file to a first node of the at least one network node;
a processor 502, configured to control the communication interface to send a new configuration file to the second node if the first node succeeds in updating the new configuration file; the second node is a node which does not receive a new configuration file in at least one network node;
the processor 502 is configured to, if the first node fails to update the new configuration file, control the communication interface to resend the historical configuration file to a third node, where the third node is a node of the at least one network node that successfully updates the new configuration file.
In some embodiments, a communication interface 501 for sending new configuration files to the second node one by one; the processor 502 is configured to, if any of the second nodes fails to update the new configuration file, control the communication interface to resend the historical configuration file to the third node.
In some embodiments, the processor 502 is configured to save the new configuration file and the corresponding modification information if all of the at least one network node succeeds in updating the new configuration file.
In some embodiments, the processor 502 is configured to receive a query instruction, and display a configuration file and/or modification information corresponding to the query instruction through the web interface.
In some embodiments, the communication interface 501 is configured to obtain a first configuration file saved by a target node of the at least one network node; a processor 502, configured to obtain a second configuration file of a target node saved by a network device; when the first configuration file is different from the second configuration file, determining difference information of the target node configuration file; and displaying the difference information of the target node configuration file through a web interface.
In some embodiments, the processor 502 is configured to generate the alarm information when the first configuration file is different from the second configuration file.
In practice, the various components in the network device are coupled together by a bus system. It will be appreciated that a bus system is used to enable communications among the components. The bus system includes a power bus, a control bus, and a status signal bus in addition to a data bus.
In practical applications, the processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a controller, a microcontroller, and a microprocessor. It is understood that the electronic devices for implementing the above processor functions may be other devices, and the embodiments of the present application are not limited in particular.
The Memory may be a volatile Memory (volatile Memory), such as a Random-Access Memory (RAM); or a non-volatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (HDD), or a Solid-State Drive (SSD); or a combination of the above types of memories and provides instructions and data to the processor.
By adopting the network equipment, the centralized management of the configuration files is realized by configuring the web service in the network equipment, the management of the configuration files is simplified by using a visual web interface on the network equipment, no additional script language learning cost is needed, the historical configuration files can be recovered when any network node fails to update in the process of sending and updating the new configuration files, and the risk caused by the failure of updating when the configuration files are updated in batches is eliminated.
In an exemplary embodiment, the present application further provides a computer readable storage medium, such as a memory including a computer program, which is executable by a processor of a network device to perform the foregoing method steps.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart block or blocks and/or flowchart block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks and/or flowchart block or blocks.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application.

Claims (12)

1. A configuration file management method is applied to network equipment and comprises the following steps:
acquiring and storing a historical configuration file of at least one network node;
displaying the historical configuration file through a web interface, acquiring modification information aiming at the historical configuration file, and generating a new configuration file;
sending the new configuration file to a first node of the at least one network node;
if the first node succeeds in updating the new configuration file, sending the new configuration file to a second node; wherein the second node is a node of the at least one network node that did not receive the new configuration file;
and if the first node fails to update the new configuration file, the historical configuration file is sent to a third node again, wherein the third node is a node which is successfully updated by the new configuration file in the at least one network node.
2. The method of claim 1, wherein sending the new configuration file to the second node comprises:
sending the new configuration files to a second node one by one;
and if any second node fails to update the new configuration file, the historical configuration file is sent to a third node again.
3. The method of claim 1, further comprising:
and if all the nodes in the at least one network node successfully update the new configuration file, saving the new configuration file and corresponding modification information.
4. The method of claim 1, further comprising:
and receiving a query instruction, and displaying a configuration file and/or modification information corresponding to the query instruction through the web interface.
5. The method of claim 1, further comprising:
acquiring a first configuration file saved by a target node in the at least one network node;
acquiring a second configuration file of the target node saved by the network equipment;
when the first configuration file is different from the second configuration file, determining difference information of the target node configuration file;
and displaying the difference information of the target node configuration file through the web interface.
6. The method of claim 5, further comprising:
and when the first configuration file is different from the second configuration file, generating alarm information.
7. A network device, the network device comprising:
the communication unit is used for acquiring and storing the historical configuration file of at least one network node;
the display unit is used for displaying the historical configuration file through a web interface;
the acquisition unit is used for acquiring modification information aiming at the historical configuration file and generating a new configuration file;
the communication unit is configured to send the new configuration file to a first node of the at least one network node;
the processing unit is used for sending the new configuration file to a second node if the first node successfully updates the new configuration file; wherein the second node is a node of the at least one network node that did not receive the new configuration file;
the processing unit is configured to, if the first node fails to update the new configuration file, resend the historical configuration file to a third node, where the third node is a node of the at least one network node that successfully updates the new configuration file.
8. A network device, the network device comprising:
the communication interface is used for acquiring and storing the historical configuration file of at least one network node;
the processor is used for displaying the historical configuration file through a web interface, acquiring modification information aiming at the historical configuration file and generating a new configuration file;
the communication interface is configured to send the new configuration file to a first node of the at least one network node;
the processor is configured to control the communication interface to send the new configuration file to a second node if the first node succeeds in updating the new configuration file; wherein the second node is a node of the at least one network node that did not receive the new configuration file;
the processor is configured to control the communication interface to resend the historical configuration file to a third node if the first node fails to update the new configuration file, where the third node is a node of the at least one network node that successfully updates the new configuration file.
9. The network device of claim 8, wherein the communication interface is configured to send the new configuration files to the second node one by one; the processor is configured to control the communication interface to resend the historical configuration file to a third node if any one of the second nodes fails to update the new configuration file;
or, the communication interface is configured to obtain a first configuration file saved by a target node in the at least one network node; the processor is configured to obtain a second configuration file of the target node, where the second configuration file is stored by the network device; when the first configuration file is different from the second configuration file, determining difference information of the target node configuration file; and displaying the difference information of the target node configuration file through the web interface.
10. The network device of claim 8, wherein the processor is configured to save the new configuration file and corresponding modification information if all of the at least one network node update the new configuration file successfully;
or the processor is used for receiving a query instruction and displaying a configuration file and/or modification information corresponding to the query instruction through the web interface.
11. The network device of claim 9, wherein the processor is configured to generate an alarm message when the first profile is different from the second profile.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201910673360.0A 2019-07-24 2019-07-24 Method and apparatus for managing configuration file and computer readable storage medium Withdrawn CN112291289A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910673360.0A CN112291289A (en) 2019-07-24 2019-07-24 Method and apparatus for managing configuration file and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910673360.0A CN112291289A (en) 2019-07-24 2019-07-24 Method and apparatus for managing configuration file and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112291289A true CN112291289A (en) 2021-01-29

Family

ID=74419093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910673360.0A Withdrawn CN112291289A (en) 2019-07-24 2019-07-24 Method and apparatus for managing configuration file and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112291289A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112948020A (en) * 2021-03-18 2021-06-11 海南视联通信技术有限公司 Configuration file processing method and device
CN115878225A (en) * 2023-02-22 2023-03-31 中航金网(北京)电子商务有限公司 Method, device, system, equipment and readable storage medium for processing configuration file
CN116594664A (en) * 2023-07-19 2023-08-15 山东捷瑞数字科技股份有限公司 Cloud platform-based software operation and maintenance system, method, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104486319A (en) * 2014-12-09 2015-04-01 上海爱数软件有限公司 Real-time synchronization method and real-time synchronization system for configuration file applied to high-availability system
CN109271210A (en) * 2017-07-17 2019-01-25 中兴通讯股份有限公司 A kind of check method and device of configuration file
CN109873714A (en) * 2019-01-04 2019-06-11 平安科技(深圳)有限公司 Cloud computing node configures update method and terminal device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104486319A (en) * 2014-12-09 2015-04-01 上海爱数软件有限公司 Real-time synchronization method and real-time synchronization system for configuration file applied to high-availability system
CN109271210A (en) * 2017-07-17 2019-01-25 中兴通讯股份有限公司 A kind of check method and device of configuration file
CN109873714A (en) * 2019-01-04 2019-06-11 平安科技(深圳)有限公司 Cloud computing node configures update method and terminal device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112948020A (en) * 2021-03-18 2021-06-11 海南视联通信技术有限公司 Configuration file processing method and device
CN115878225A (en) * 2023-02-22 2023-03-31 中航金网(北京)电子商务有限公司 Method, device, system, equipment and readable storage medium for processing configuration file
CN116594664A (en) * 2023-07-19 2023-08-15 山东捷瑞数字科技股份有限公司 Cloud platform-based software operation and maintenance system, method, equipment and storage medium

Similar Documents

Publication Publication Date Title
US10545469B2 (en) Systems and methods for self provisioning building equipment
CN112291289A (en) Method and apparatus for managing configuration file and computer readable storage medium
EP2776928A1 (en) Systems and methods for automatic replacement and repair of communications network devices
US9158528B2 (en) Forcibly completing upgrade of distributed software in presence of failures
CN109189680B (en) A kind of system and method for application publication and configuration
US20160077919A1 (en) Methods and apparatus to perform site recovery of a virtual data center
CN106921508B (en) Virtualized network element fault self-healing method and device
US10185620B2 (en) Automated teller machine (“ATM”) software recovery
CN106657167B (en) Management server, server cluster, and management method
CN109144789B (en) Method, device and system for restarting OSD
CN111008026B (en) Cluster management method, device and system
US8086909B1 (en) Automatic core file upload
CN111182033B (en) Method and equipment for restoring switch
US10880153B2 (en) Method and system for providing service redundancy between a master server and a slave server
CN111045866A (en) BMC fault processing method and device, electronic equipment and storage medium
CN110995481A (en) Configuration method, server and computer-readable storage medium
JP2003233512A (en) Client monitoring system with maintenance function, monitoring server, program, and client monitoring/ maintaining method
CN114064438A (en) Database fault processing method and device
CN112291081B (en) Method, system and storage medium for auditing controller cluster data by cloud management platform
CN114338363A (en) Continuous integration method, device, equipment and storage medium
CN116185697B (en) Container cluster management method, device and system, electronic equipment and storage medium
CN112130889A (en) Resource management method and device, storage medium and electronic device
CN111209012A (en) Linux system-oriented software agent end automatic deployment method
CN116069373A (en) BMC firmware upgrading method, device and medium thereof
CN112751693A (en) Data processing method and device of distributed storage system and electronic equipment

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20210129

WW01 Invention patent application withdrawn after publication