-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Impact of Early Exit Check in Configuration Processing #18629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you provide an actual config file that fails the two different ways you are saying? The added code is exiting trying to avoid processing config in a config file as exec level commands. |
Sample config file which fails:
|
FWIW when the early exit behavior was modified a topotest was created ( I still need to understand your example case better, but if it's making the behavior more deterministic (which it sounds like it is) then it's likely going to be the solution going forward. Continuing to parse lines when the parser now has no idea what level it should be at seems wrong, if that what happened before. |
The following config simply parsed correclty for me, can you be more explicit in what is generating the error and why? I added some values that you had given as <> or A.B.C.D but it wasn't clear to me that I should leave them since nothing would parse correctly otherwise.
|
The addition of the early exit check in vtysh_config_from_file changes the configuration processing logic. This code was added by commit 315e903.
Before the Change:
If a command failed (e.g., router bgp ASN), the system would:
After the Change:
If a command fails (e.g., router bgp 66) and the next line contains "exit":
Specific Failure Scenario:
consider a config file with the following snippet
This is a change in behavior of how config is read from frr.conf:
It prevents the system from attempting to execute any commands after the failed command
It changes the behavior of the configuration processing
Summary:
The early exit check was likely added to detect and handle intentional exits from configuration files, but it inadvertently changes the error handling logic. The system now stops processing the configuration file when it encounters an "exit" command after a failed command, which is a significant change and might not be desirable in certain cases.
This change breaks how the config file was read and processed where the system would continue processing the configuration file even if one command fails, allowing for partial configuration success.
The text was updated successfully, but these errors were encountered: