CN116302682A - Log-based VPP configuration recovery method, system, medium and equipment - Google Patents
Log-based VPP configuration recovery method, system, medium and equipment Download PDFInfo
- Publication number
- CN116302682A CN116302682A CN202310065963.9A CN202310065963A CN116302682A CN 116302682 A CN116302682 A CN 116302682A CN 202310065963 A CN202310065963 A CN 202310065963A CN 116302682 A CN116302682 A CN 116302682A
- Authority
- CN
- China
- Prior art keywords
- log
- configuration
- vpp
- cli
- module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000011084 recovery Methods 0.000 title claims abstract description 88
- 238000000034 method Methods 0.000 title claims abstract description 19
- 238000004891 communication Methods 0.000 claims abstract description 6
- 238000012545 processing Methods 0.000 claims description 20
- 238000012544 monitoring process Methods 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 10
- 238000012725 vapour phase polymerization Methods 0.000 description 92
- 239000003795 chemical substances by application Substances 0.000 description 17
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1438—Restarting or rejuvenating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a VPP configuration recovery method, a system, a medium and equipment based on a log, wherein the system comprises a log agent module, a configuration recovery module and a configuration recovery state checking module, the log agent module, the configuration recovery module and the configuration recovery state checking module are deployed in a server for deploying the VPP, the log agent module and the configuration recovery module are implanted in the VPP, the log agent module is in communication connection with the configuration recovery module, and the configuration recovery module is in communication connection with the configuration recovery state checking module. The invention solves the technical problem that the prior VPP cannot recover configuration after restarting, and the VPP configuration is not required to be input again manually.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a VPP configuration recovery method, a system, a medium and equipment based on logs.
Background
VPP, vector Packet Processi ng, vector packet processing, is an extensible framework that can provide out-of-box quality switch and router functions.
The VPP can be deployed on a general X86 server, can be deployed on the server directly in a process mode, can be deployed on the server in a virtual machine mode, and can be deployed on the server in a container mode.
However, when the VPP is restarted due to an abnormal condition, for example, a server where the VPP is deployed is powered off and restarted, all configurations before the VPP is restarted will be lost, and the VPP cannot restore all configurations by itself after the restart, which results in that the VPP cannot provide network services after the restart.
Based on this, how to ensure that the VPP configuration can be restored after the VPP is restarted is a technical problem to be solved.
Disclosure of Invention
Therefore, the technical problem to be solved by the invention is to provide a log-based VPP configuration recovery method, a log-based VPP configuration recovery system, a log-based VPP configuration recovery medium and log-based VPP configuration recovery equipment, which solve the technical problem that the prior VPP cannot recover configuration after restarting, and the VPP configuration does not need to be input manually again.
In order to solve the technical problems, the invention provides the following technical scheme:
a log-based VPP configuration recovery system, comprising:
the system comprises a log agent module, a configuration type CL I module and a configuration type CL I module, wherein the log agent module is used for monitoring the execution of each configuration type CL I command in the VPP and generating a CL I log file for recording the execution time and the execution result of each configuration type CL I command executed in the VPP according to the monitoring of each configuration type CL I command;
the configuration recovery module is used for recovering configuration for the VPP according to the CL I log file;
setting the log agent module and the configuration recovery module at a server for deploying the VPP, and implanting the log agent module and the configuration recovery module into the VPP, wherein the log agent module is in communication connection with the configuration recovery module.
The log-based VPP configuration recovery system further comprises a configuration recovery state identification module for identifying the VPP configuration recovery state and a configuration recovery state checking module for checking the configuration recovery state, wherein the configuration recovery state checking module is implanted in the VPP.
The above-mentioned log-based VPP configuration recovery system, the log time in the CL I log file is accurate to milliseconds.
In the above log-based VPP configuration recovery system, each CL I log record in the CL I log file contains a log time, an execution result, and a corresponding CL I command.
According to the log-based VPP configuration recovery system, when the configuration recovery module recovers the configuration for the VPP according to the CL I log file, the configuration recovery module carries out the following processing on each CL I log record in the CL I log file: and acquiring an execution result in the CL I log record and carrying out corresponding processing according to the execution result, when the execution result is fai l ure, ignoring the CL I log record, not carrying out any processing, and when the execution result is success, actively executing the CL I log record.
The method for carrying out configuration recovery on the VPPs by utilizing the log-based VPP configuration recovery system comprises the following steps:
s1) when the VPP is configured before the VPP is operated for the first time, monitoring the execution of each configuration type CL I command in the VPP by using a log agent module, generating a CL I log record according to the configuration type CL I command, the execution time and the execution result of the configuration type CL I command, and recording the CL I log record in a CL I log file;
s2) when the VPP is restarted, the configuration recovery module is utilized to read the CL I log record from the CL I log file in the step S1) and recover the VPP configuration according to the CL I log record.
In the above method, in step S1), the CL I log generated by the log agent module is recorded in the CL I log file and written in sequence according to the execution time of the configuration CL I command.
In the above method, in step S2), the configuration recovery module performs the following processing on each CL I log record in the CL I log file when recovering the configuration for the VPP according to the CL I log file: and acquiring an execution result in the CL I log record and carrying out corresponding processing according to the execution result, when the execution result is fai l ure, ignoring the CL I log record, not carrying out any processing, and when the execution result is success, actively executing the CL I log record.
A computer readable storage medium having stored thereon a computer program which when executed by a processor implements the above method.
Computer device comprising a readable storage medium, a processor and a computer program stored on the readable storage medium and executable on the processor, which computer program when executed by the processor implements the method of claim.
The technical scheme of the invention has the following beneficial technical effects:
the added CL I log file records all executed CL I commands and execution results thereof since the VPP is started for the first time, which has important significance and value for operation and maintenance work such as VPP fault investigation, problem tracing and the like.
Drawings
FIG. 1 is a schematic diagram of the operation of the log-based VPP configuration recovery system of the present invention;
FIG. 2 is a flow chart of the VPP configuration recovery according to the present invention;
fig. 3 is a schematic diagram of a computer device that can perform VPP configuration restoration.
Detailed Description
The invention is further described below with reference to examples.
As shown in FIG. 1, the log-based VPP configuration recovery system comprises a log agent module, a configuration recovery module and a configuration recovery state checking module, wherein the log agent module, the configuration recovery module and the configuration recovery state checking module are deployed in a server for deploying the VPP, the log agent module, the configuration recovery module and the configuration recovery state checking module are implanted in the VPP, the log agent module is in communication connection with the configuration recovery module, and the configuration recovery module is in communication connection with the configuration recovery state checking module. The log agent module is used for monitoring execution of each configuration type CL I command in the VPP, generating a CL I log file for recording execution time and execution result of each configuration type CL I command executed in the VPP and the configuration type CL I command according to monitoring of each configuration type CL I command, the log agent module is used as a component of the VPP and operates, the configuration recovery module is used for recovering configuration for the VPP according to the CL I log file, and the configuration recovery state checking module is used for identifying the configuration recovery state of the VPP and checking the configuration recovery state.
As shown in fig. 2, when the configuration recovery system for VPP based on log is used to recover the configuration of VPP, the specific operation steps are as follows:
s1) when the VPP is configured before the VPP is operated for the first time, monitoring the execution of each configuration type CL I command in the VPP by using a log agent module, generating a CL I log record according to the configuration type CL I command, the execution time and the execution result of the configuration type CL I command, and recording the CL I log record in a CL I log file;
s2) when the VPP is restarted, the configuration recovery module is utilized to read the CL I log record from the CL I log file in the step S1) and recover the VPP configuration according to the CL I log record.
In VPP, CL I commands can be divided into two main categories: (1) a configuration class CL I command, which is used to configure the VPP, such as setting an interface state, setting an interface I P address, etc.; (2) non-configuration class CLI commands, such as CL I commands to view the configuration and status of the VPP, do not configure the VPP, such as view interface status, view interface I P address, etc.
In the invention, on a server for deploying the VPP, the name of the CLI log file defaults to c l i.l og and is stored under the/var/log/VPP directory by default, namely, the absolute path of the CLI log file is/var/log/VPP/c l i.l og.
In the CLI log record, the execution result of the configuration class CLI command is success (expressed by success) or failure (expressed by fai l ure), and the execution time of the configuration class CLI command is expressed by the time when the execution of the configuration class CLI command ends, which is referred to as the time of the CLI log record (hereinafter referred to as log time) in the present invention. The log time is accurate to milliseconds, including years, months, days, hours, minutes, seconds, milliseconds, as in "2022-12-06:08:08:123", with the log time in the example representing 2022, 12, 6, 8 minutes, 8 seconds, 123 milliseconds.
In the CLI log file, each CLI log record contains log time, execution result, and CL I command. The format of the CLI log record is 'log time|execution result|CLI command', which are log time, execution result and CLI command in sequence from left to right, are separated by vertical lines|and are provided with a space in front of and behind the vertical lines. The CLI log file shown in table 1 contains 3 CL log records.
Table 1CLI log file
And the log agent module adds the generated CL I log record to the tail of the CL I log file according to the time sequence. That is, in the CL I log file, the CL I log with the earlier log time is recorded before, and the CLI log with the later log time is recorded after.
The configuration recovery module reads all the CLI log records from the CLI log file, and the CLI log records are arranged in the CLI log file according to the time sequence, namely the CLI log record with the earlier log time is recorded before the CLI log record with the later log time is recorded after the CLI log record with the later log time, and the CL I log records read by the configuration recovery module are arranged according to the time sequence.
And then, the configuration recovery module processes each CLI log record from front to back in sequence one by one according to the time sequence of the CLI log records, and recovers the configuration of the VPP.
The configuration recovery module performs the following processing on each CLI log record in the CLI log file when recovering configuration for the VPP according to the CL log file: and when the execution result is success, the configuration recovery module actively executes the CLI log record to process according to the principle, and after the processing of all the CLI log records is completed, the configuration of the VPP is recovered.
In the invention, the configuration recovery state checking module checks the configuration recovery state of the VPP, in particular checks the value of the configuration recovery label in the VPP, through a non-configuration CLI command, so as to confirm whether the VPP has completed recovery operations of all configurations.
There are two values for the configuration recovery tag: (1) SUCCESS, which indicates that the configuration restoration module has completed processing and VPP has completed restoration operations for all configurations; (2) RECOVERING, which indicates that the configuration restoration module has not completed processing and that the VPP is performing configuration restoration operations.
If and only if the value of the configuration recovery tag is SUCCESS, i.e. the VPP has completed all configured recovery operations, and the configuration is set for the VPP again by the configuration class CLI command, the log proxy module will generate a new CLI log record, and record the new CLI log record into the CLI log file in time sequence, and cannot cover the original CLI log record. When the configuration recovery module is executing the configuration recovery operation, that is, the value of the configuration recovery label is RECOVERING, the configuration cannot be set for the VPP through the new configuration class CLI command, and the log agent module does not generate any new CL I log record.
After a start-up (or restart), the VPP is first initialized according to the configuration items in the configuration file. After the initialization is completed, the value of the configuration recovery tag is set to RECOVERING.
The configuration restoration module then begins processing to restore all configurations of the VPP. After the configuration recovery module completes processing, indicating that the VPP has completed recovery operations for all configurations, the value of the configuration recovery tag is set to SUCCESS.
After the VPP completes the recovery operations for all configurations, the log agent module begins processing, continuously monitors each CL I command executed in the VPP, and generates a CL I log record for use in configuration recovery after the next restart.
Based on the above log-based VPP configuration restoration method, correspondingly, there is also provided a computer readable storage medium storing a computer program, which when executed by a processor, implements the steps of: monitoring the execution of each configuration type CL I command in the VPP by using a log proxy module implanted in the VPP, generating a CL I log record according to the configuration type CL I command, the execution time and the execution result of the configuration type CL I command, recording the CL I log record in a CL I log file, and when the VPP is restarted, reading the CL I log record from the CL I log file by using a configuration recovery module implanted in the VPP and recovering the VPP according to the CL I log record.
As shown in fig. 3, in this embodiment, there is further provided a computer device, which includes a readable storage medium, a processor, and a computer program stored on the readable storage medium and executable on the processor, wherein the readable storage medium and the processor are both disposed on a bus, and the processor implements the following steps when executing the computer program: monitoring the execution of each configuration type CL I command in the VPP by using a log proxy module implanted in the VPP, generating a CL I log record according to the configuration type CL I command, the execution time and the execution result of the configuration type CL I command, recording the CL I log record in a CL I log file, and when the VPP is restarted, reading the CL I log record from the CL I log file by using a configuration recovery module implanted in the VPP and recovering the VPP according to the CL I log record.
It is apparent that the above examples are given by way of illustration only and are not limiting of the embodiments. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. It is not necessary here nor is it exhaustive of all embodiments. While the obvious variations or modifications which are extended therefrom remain within the scope of the claims of this patent application.
Claims (10)
1. A log-based VPP configuration restoration system, comprising:
the log agent module is used for monitoring the execution of each configuration type CLI command in the VPP and generating a CLI log file for recording the execution time and the execution result of each configuration type CLI command executed in the VPP according to the monitoring of each configuration type CLI command;
the configuration recovery module is used for recovering configuration for the VPP according to the CLI log file;
setting the log agent module and the configuration recovery module at a server for deploying the VPP, and implanting the log agent module and the configuration recovery module into the VPP, wherein the log agent module is in communication connection with the configuration recovery module.
2. The log-based VPP configuration recovery system of claim 1, further comprising a configuration recovery state identification module for identifying a VPP configuration recovery state and a configuration recovery state viewing module for viewing the configuration recovery state, the configuration recovery state viewing module being implanted within the VPP.
3. The log-based VPP configuration restoration system according to claim 1, wherein the log time in the CLI log file is accurate to milliseconds.
4. The log-based VPP configuration restoration system according to claim 1, wherein each CLI log record in the CLI log file contains a log time, an execution result, and a corresponding CLI command.
5. The log-based VPP configuration restoration system according to any one of claims 1 to 4, wherein the configuration restoration module performs the following processing on each CLI log record in the CLI log file when restoring the configuration for the VPP according to the CLI log file: and acquiring an execution result in the CLI log record and carrying out corresponding processing according to the execution result, when the execution result is failure, ignoring the CLI log record, not carrying out any processing, and when the execution result is success, actively executing the CLI log record.
6. A method for performing configuration restoration on a VPP by using the log-based VPP configuration restoration system according to any one of claims 1 to 5, comprising the steps of:
s1) when the VPP is configured before the VPP is operated for the first time, monitoring the execution of each configuration type CLI command in the VPP by using a log proxy module, generating a CLI log record according to the configuration type CLI command, the execution time and the execution result of the configuration type CLI command, and recording the CLI log record in a CLI log file;
s2) when the VPP is restarted, the configuration recovery module is utilized to read the CLI log record from the CLI log file in the step S1) and recover the VPP configuration according to the CLI log record.
7. The method according to claim 6, wherein in step S1), the CLI log generated by the log agent module is recorded in the CLI log file and written in chronological order according to the configuration class CLI command.
8. The method according to claim 6, wherein in step S2), the configuration restoration module performs the following processing on each CLI log record in the CLI log file when restoring the configuration for the VPP according to the CLI log file: and acquiring an execution result in the CLI log record and carrying out corresponding processing according to the execution result, when the execution result is failure, ignoring the CLI log record, not carrying out any processing, and when the execution result is success, actively executing the CLI log record.
9. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, implements the method of any of claims 6-8.
10. Computer device comprising a readable storage medium, a processor and a computer program stored on the readable storage medium and executable on the processor, characterized in that the computer program when executed by the processor implements the method according to any of claims 6-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310065963.9A CN116302682B (en) | 2023-01-13 | 2023-01-13 | Log-based VPP configuration recovery method, system, medium and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310065963.9A CN116302682B (en) | 2023-01-13 | 2023-01-13 | Log-based VPP configuration recovery method, system, medium and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116302682A true CN116302682A (en) | 2023-06-23 |
CN116302682B CN116302682B (en) | 2024-05-24 |
Family
ID=86812206
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310065963.9A Active CN116302682B (en) | 2023-01-13 | 2023-01-13 | Log-based VPP configuration recovery method, system, medium and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116302682B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101286886A (en) * | 2008-06-05 | 2008-10-15 | 杭州华三通信技术有限公司 | Method and device to recover configuring information of network appliance |
US20100023805A1 (en) * | 2008-07-25 | 2010-01-28 | International Business Machines Corporation | Method and system for disaster recovery based on journaling events pruning in a computing environment |
CN111176891A (en) * | 2019-12-22 | 2020-05-19 | 北京浪潮数据技术有限公司 | Method, device and equipment for recovering configuration information of baseboard management controller |
KR20210033880A (en) * | 2020-07-16 | 2021-03-29 | 주식회사 티맥스티베로 | Method, server, and computer readable medium for index recovery using index redo log |
CN115277398A (en) * | 2022-08-18 | 2022-11-01 | 明阳产业技术研究院(沈阳)有限公司 | Cluster network configuration method and device |
-
2023
- 2023-01-13 CN CN202310065963.9A patent/CN116302682B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101286886A (en) * | 2008-06-05 | 2008-10-15 | 杭州华三通信技术有限公司 | Method and device to recover configuring information of network appliance |
US20100023805A1 (en) * | 2008-07-25 | 2010-01-28 | International Business Machines Corporation | Method and system for disaster recovery based on journaling events pruning in a computing environment |
CN111176891A (en) * | 2019-12-22 | 2020-05-19 | 北京浪潮数据技术有限公司 | Method, device and equipment for recovering configuration information of baseboard management controller |
KR20210033880A (en) * | 2020-07-16 | 2021-03-29 | 주식회사 티맥스티베로 | Method, server, and computer readable medium for index recovery using index redo log |
CN115277398A (en) * | 2022-08-18 | 2022-11-01 | 明阳产业技术研究院(沈阳)有限公司 | Cluster network configuration method and device |
Non-Patent Citations (1)
Title |
---|
向猛 等: "SQL SERVER 2005基于事务日志的备份与恢复深入研究", 《计算机系统应用》, vol. 22, no. 6, 30 June 2013 (2013-06-30), pages 18 - 23 * |
Also Published As
Publication number | Publication date |
---|---|
CN116302682B (en) | 2024-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7805631B2 (en) | Bare metal recovery from backup media to virtual machine | |
US8397039B2 (en) | Storage systems and methods | |
CN113626256B (en) | Virtual machine disk data backup method, device, terminal and storage medium | |
CN101231604B (en) | Apparatus, system, and method for volume-level restoration of cluster server data | |
CN106681865B (en) | Service recovery method and device | |
US10114847B2 (en) | Change capture prior to shutdown for later backup | |
CN110119330A (en) | Method for automatically restoring BIOS file of cloud backup server BIOSROM | |
CN112068981B (en) | Knowledge base-based fault scanning recovery method and system in Linux operating system | |
CN116302682B (en) | Log-based VPP configuration recovery method, system, medium and equipment | |
CN112579359B (en) | Service system reconstruction method, device, equipment and storage medium | |
CN112579361A (en) | Backup data reconstruction method, device, equipment and storage medium | |
JP2007226287A (en) | System environment reproducing method and system environment correcting method | |
CN111752760B (en) | Maintenance method, device and system of all-in-one machine and readable storage medium | |
CN109271284A (en) | A kind of fault recovery method, device and the equipment of server boot subregion | |
CN112596954B (en) | Data backup and reconstruction method, device, equipment and storage medium | |
CN115309577A (en) | Embedded device and starting and recovering method thereof | |
CN108509252B (en) | Virtual machine starting device and method and host | |
CN110489273A (en) | A kind of storage backup method, system, terminal and storage medium based on SAN | |
CN111737048B (en) | Openstack docking storage virtual machine volume backup processing method and device | |
CN114968670B (en) | Virtual machine backup and recovery method and device | |
CN116319265A (en) | VPP configuration recovery method, system, medium and device based on Etcd | |
CN105912426A (en) | K-UX operating system reduction method and system | |
CN117707841A (en) | USB bus recovery and abnormal equipment filtering method, device, equipment and medium | |
JP2972439B2 (en) | Portable terminal backup method | |
CN113726554A (en) | Method for restoring network equipment version and network 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |