-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
vtysh, pathd: fix pcep node-entering commands (backport #9375) #9409
Conversation
pce-config, pce and pcc node-entering commands in vtysh include no-form, which is incorrect. Currently, when user passes a no-form command like `no pcc`, vtysh enters the node while pathd deletes the node and this leads to a desynchronization. Regular and no-form commands should be defined separately to fix this. Signed-off-by: Igor Ryzhov <[email protected]> (cherry picked from commit 53fc645)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/c0650583685b59e296502e05b112b918/raw/fd6def75abf1f96da512919835acac9ef262c836/cr_9409_1629133522.diff | git apply
diff --git a/pathd/path_pcep_cli.c b/pathd/path_pcep_cli.c
index db5f256a8..0d6f0efaf 100644
--- a/pathd/path_pcep_cli.c
+++ b/pathd/path_pcep_cli.c
@@ -1752,18 +1752,15 @@ DEFPY_NOSH(
return CMD_SUCCESS;
}
-DEFPY_NOSH(
- pcep_cli_pcep_pce_config,
- pcep_cli_pcep_pce_config_cmd,
- "pce-config WORD$name",
- "Shared configuration\n"
- "Shared configuration name\n")
+DEFPY_NOSH(pcep_cli_pcep_pce_config, pcep_cli_pcep_pce_config_cmd,
+ "pce-config WORD$name",
+ "Shared configuration\n"
+ "Shared configuration name\n")
{
return path_pcep_cli_pcep_pce_config(vty, name);
}
-DEFPY(pcep_cli_pcep_no_pce_config,
- pcep_cli_pcep_no_pce_config_cmd,
+DEFPY(pcep_cli_pcep_no_pce_config, pcep_cli_pcep_no_pce_config_cmd,
"no pce-config WORD$name",
NO_STR
"Shared configuration\n"
@@ -1785,19 +1782,14 @@ DEFPY(pcep_cli_show_srte_pcep_pce_config,
return path_pcep_cli_show_srte_pcep_pce_config(vty, name);
}
-DEFPY_NOSH(
- pcep_cli_pce,
- pcep_cli_pce_cmd,
- "pce WORD$name",
- "PCE configuration, address sub-config is mandatory\n"
- "PCE name\n")
+DEFPY_NOSH(pcep_cli_pce, pcep_cli_pce_cmd, "pce WORD$name",
+ "PCE configuration, address sub-config is mandatory\n"
+ "PCE name\n")
{
return path_pcep_cli_pce(vty, name);
}
-DEFPY(pcep_cli_no_pce,
- pcep_cli_no_pce_cmd,
- "no pce WORD$name",
+DEFPY(pcep_cli_no_pce, pcep_cli_no_pce_cmd, "no pce WORD$name",
NO_STR
"PCE configuration, address sub-config is mandatory\n"
"PCE name\n")
@@ -1917,20 +1909,13 @@ DEFPY(pcep_cli_peer_timers,
delegation_timeout);
}
-DEFPY_NOSH(
- pcep_cli_pcc,
- pcep_cli_pcc_cmd,
- "pcc",
- "PCC configuration\n")
+DEFPY_NOSH(pcep_cli_pcc, pcep_cli_pcc_cmd, "pcc", "PCC configuration\n")
{
return path_pcep_cli_pcc(vty);
}
-DEFPY(pcep_cli_no_pcc,
- pcep_cli_no_pcc_cmd,
- "no pcc",
- NO_STR
- "PCC configuration\n")
+DEFPY(pcep_cli_no_pcc, pcep_cli_no_pcc_cmd, "no pcc",
+ NO_STR "PCC configuration\n")
{
return path_pcep_cli_pcc_delete(vty);
}
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index cd1ad28a5..2b3088d9b 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -2138,16 +2138,14 @@ DEFUNSH(VTYSH_PATHD, pcep, pcep_cmd,
return CMD_SUCCESS;
}
-DEFUNSH(VTYSH_PATHD, pcep_cli_pcc, pcep_cli_pcc_cmd,
- "pcc",
+DEFUNSH(VTYSH_PATHD, pcep_cli_pcc, pcep_cli_pcc_cmd, "pcc",
"PCC configuration\n")
{
vty->node = PCEP_PCC_NODE;
return CMD_SUCCESS;
}
-DEFUNSH(VTYSH_PATHD, pcep_cli_pce, pcep_cli_pce_cmd,
- "pce WORD",
+DEFUNSH(VTYSH_PATHD, pcep_cli_pce, pcep_cli_pce_cmd, "pce WORD",
"PCE configuration\n"
"Peer name\n")
{
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-21096/ This is a comment from an automated CI system. |
This is an automatic backport of pull request #9375 done by Mergify.
Mergify commands and options
More conditions and actions can be found in the documentation.
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refresh
will re-evaluate the rules@Mergifyio rebase
will rebase this PR on its base branch@Mergifyio update
will merge the base branch into this PR@Mergifyio backport <destination>
will backport this PR on<destination>
branchAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.io/