-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: Accelerate config deletion in frr-reload.py by bulk execution
Previously, in config deletion, each command was executed individually using vtysh -c "configure" -c ..., leading to significant delays, especially with a large number of deletions. This process could take minutes during a reload. To resolve this, deletion commands are now written to a file and processed in batch using vtysh -f, just as addition commands are. This change significantly improves the speed of configuration changes. Additionally, to handle cases where deletion commands fail, the script now captures the line numbers of failed commands from the standard error output of vtysh -f. Based on these numbers, it retrieves the corresponding commands from the file. The retrieved failed commands are subsequently reprocessed according to the established deletion workflow, which involves reattempting the failed deletion commands, truncating one word from the end of each command until it succeeds or cannot be truncated further. Signed-off-by: Yu Ishizaki <[email protected]>
- Loading branch information
1 parent
7f1e552
commit c55ff15
Showing
1 changed file
with
143 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters