Skip to content
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

Merged
merged 1 commit into from
Aug 17, 2021

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Aug 16, 2021

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> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

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)
Copy link

@polychaeta polychaeta left a 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.

@LabN-CI
Copy link
Collaborator

LabN-CI commented Aug 16, 2021

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/9409 4289021
Date 08/16/2021
Start 13:56:46
Finish 14:23:08
Run-Time 26:22
Total 1813
Pass 1813
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2021-08-16-13:56:46.txt
Log autoscript-2021-08-16-13:57:58.log.bz2
Memory 485 497 427

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, 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.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@mjstapp mjstapp merged commit 7d2ce11 into stable/8.0 Aug 17, 2021
@mergify mergify bot deleted the mergify/bp/stable/8.0/pr-9375 branch August 17, 2021 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants