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

pimd: test command to stop/allow ageing of sg entries #6206

Closed
wants to merge 2 commits into from

Conversation

sarav511
Copy link
Contributor

Decription: There are requirements where sg ageing is disabled.
A hidden CLI is introduced to test enable/disable sg-ageing. This is
used for testing purpose. This will be used to test all sg entries of the vrf
at once. We will have topotest using this CLI.

Signed-off-by: Saravanan K saravanank@vmware.com

Decription: There are requirements where sg ageing is disabled.
A hidden CLI is introduced to test enable/disable sg-ageing. This is
used for testing purpose. This will be used to test all sg entries of the vrf
at once. We will have topotest using this CLI.

Signed-off-by: Saravanan K <saravanank@vmware.com>
…ow>]"

Signed-off-by: Saravanan K <saravanank@vmware.com>
@polychaeta polychaeta added the pim label Apr 13, 2020
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/8f150a2ba4163fa41c5a36dcc81c1060/raw/cfc130babc023320ece9e260d335b421e9238f06/cr_6206_1586762081.diff | git apply

diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 0bebf1337..b2fd61a98 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -8071,15 +8071,12 @@ static int pim_cmd_interface_add(struct vty *vty, struct interface *ifp)
 	return 1;
 }
 
-DEFPY_HIDDEN (pim_test_sg_stop_ageing,
-	      pim_test_sg_stop_ageing_cmd,
-	      "test pim [vrf NAME$name] sg-ageing [<stop|allow>]",
-	      "Test code\n"
-	      PIM_STR
-	      VRF_CMD_HELP_STR
-	      "control ageing sg entries\n"
-	      "stop ageing sg entries\n"
-	      "allow ageing sg entries\n")
+DEFPY_HIDDEN(pim_test_sg_stop_ageing, pim_test_sg_stop_ageing_cmd,
+	     "test pim [vrf NAME$name] sg-ageing [<stop|allow>]",
+	     "Test code\n" PIM_STR VRF_CMD_HELP_STR
+	     "control ageing sg entries\n"
+	     "stop ageing sg entries\n"
+	     "allow ageing sg entries\n")
 {
 	struct pim_upstream *up;
 	struct pim_instance *pim;

If you are a new contributor to FRR, please see our contributing guidelines.

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/2d27ed3a8cbb77cc9dc134680ba81e6d/raw/cfc130babc023320ece9e260d335b421e9238f06/cr_6206_1586763103.diff | git apply

diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 0bebf1337..b2fd61a98 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -8071,15 +8071,12 @@ static int pim_cmd_interface_add(struct vty *vty, struct interface *ifp)
 	return 1;
 }
 
-DEFPY_HIDDEN (pim_test_sg_stop_ageing,
-	      pim_test_sg_stop_ageing_cmd,
-	      "test pim [vrf NAME$name] sg-ageing [<stop|allow>]",
-	      "Test code\n"
-	      PIM_STR
-	      VRF_CMD_HELP_STR
-	      "control ageing sg entries\n"
-	      "stop ageing sg entries\n"
-	      "allow ageing sg entries\n")
+DEFPY_HIDDEN(pim_test_sg_stop_ageing, pim_test_sg_stop_ageing_cmd,
+	     "test pim [vrf NAME$name] sg-ageing [<stop|allow>]",
+	     "Test code\n" PIM_STR VRF_CMD_HELP_STR
+	     "control ageing sg entries\n"
+	     "stop ageing sg entries\n"
+	     "allow ageing sg entries\n")
 {
 	struct pim_upstream *up;
 	struct pim_instance *pim;

If you are a new contributor to FRR, please see our contributing guidelines.

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 13, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6206 ea324cd
Date 04/13/2020
Start 03:15:41
Finish 03:41:40
Run-Time 25:59
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-04-13-03:15:41.txt
Log autoscript-2020-04-13-03:16:37.log.bz2
Memory 460 492 424

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 13, 2020

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/6206 02c7422
Date 04/13/2020
Start 03:45:41
Finish 04:11:33
Run-Time 25:52
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-04-13-03:45:41.txt
Log autoscript-2020-04-13-03:46:35.log.bz2
Memory 499 496 425

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Apr 13, 2020

Continuous Integration Result: SUCCESSFUL

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-11798/

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.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for pim_cmd.c | 4 issues
===============================================
< WARNING: else is not generally useful after a break or return
< #8118: FILE: /tmp/f1-28603/pim_cmd.c:8118:
< WARNING: space prohibited between function name and open parenthesis '('
< #8122: FILE: /tmp/f1-28603/pim_cmd.c:8122:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11798/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-00-gea324cd04-0 (missing) -> 7.4-dev-20200413-00-gea324cd04-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-00-gea324cd04-0 (missing) -> 7.4-dev-20200413-00-gea324cd04-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-00-gea324cd04-0 (missing) -> 7.4-dev-20200413-00-gea324cd04-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-00-gea324cd04-0 (missing) -> 7.4-dev-20200413-00-gea324cd04-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-00-gea324cd04-0 (missing) -> 7.4-dev-20200413-00-gea324cd04-0~deb10u1

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Apr 13, 2020

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11799/

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.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Failed

CentOS 7 rpm pkg check: Failed (click for details) CentOS 7 rpm pkg check: No useful log found
Successful on other platforms/tests
  • Debian 10 deb pkg check
  • Topology tests on Ubuntu 18.04 amd64
  • Addresssanitizer topotests part 1
  • IPv6 protocols on Ubuntu 14.04
  • Ubuntu 16.04 deb pkg check
  • Ubuntu 12.04 deb pkg check
  • Addresssanitizer topotests part 2
  • Fedora 29 rpm pkg check
  • Ubuntu 14.04 deb pkg check
  • IPv4 ldp protocol on Ubuntu 16.04
  • Addresssanitizer topotests part 3
  • Debian 8 deb pkg check
  • IPv4 protocols on Ubuntu 14.04
  • Topology tests on Ubuntu 16.04 amd64
  • Debian 9 deb pkg check
  • Topotest tests on Ubuntu 16.04 i386
  • Static analyzer (clang)

Warnings Generated during build:

Checkout code: Successful with additional warnings
CentOS 7 rpm pkg check: Failed (click for details) CentOS 7 rpm pkg check: No useful log found
Report for pim_cmd.c | 4 issues
===============================================
< WARNING: else is not generally useful after a break or return
< #8118: FILE: /tmp/f1-928/pim_cmd.c:8118:
< WARNING: space prohibited between function name and open parenthesis '('
< #8122: FILE: /tmp/f1-928/pim_cmd.c:8122:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11799/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-01-g02c74226f-0 (missing) -> 7.4-dev-20200413-01-g02c74226f-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-01-g02c74226f-0 (missing) -> 7.4-dev-20200413-01-g02c74226f-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-01-g02c74226f-0 (missing) -> 7.4-dev-20200413-01-g02c74226f-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-01-g02c74226f-0 (missing) -> 7.4-dev-20200413-01-g02c74226f-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-01-g02c74226f-0 (missing) -> 7.4-dev-20200413-01-g02c74226f-0~deb10u1

@sarav511
Copy link
Contributor Author

CI: rerun

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Apr 13, 2020

Continuous Integration Result: SUCCESSFUL

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-11802/

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.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for pim_cmd.c | 4 issues
===============================================
< WARNING: else is not generally useful after a break or return
< #8118: FILE: /tmp/f1-26140/pim_cmd.c:8118:
< WARNING: space prohibited between function name and open parenthesis '('
< #8122: FILE: /tmp/f1-26140/pim_cmd.c:8122:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11802/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-01-g02c74226f-0 (missing) -> 7.4-dev-20200413-01-g02c74226f-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-01-g02c74226f-0 (missing) -> 7.4-dev-20200413-01-g02c74226f-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-01-g02c74226f-0 (missing) -> 7.4-dev-20200413-01-g02c74226f-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-01-g02c74226f-0 (missing) -> 7.4-dev-20200413-01-g02c74226f-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-01-g02c74226f-0 (missing) -> 7.4-dev-20200413-01-g02c74226f-0~deb10u1

@donaldsharp
Copy link
Member

We already have this command:

DEFPY_HIDDEN (pim_test_sg_keepalive,
	      pim_test_sg_keepalive_cmd,
	      "test pim [vrf NAME$name] keepalive-reset A.B.C.D$source A.B.C.D$group",
	      "Test code\n"
	      PIM_STR
	      VRF_CMD_HELP_STR
	      "Reset the Keepalive Timer\n"
	      "The Source we are resetting\n"
	      "The Group we are resetting\n")
{```

Why do we need another one?

@sarav511
Copy link
Contributor Author

We already have this command:

DEFPY_HIDDEN (pim_test_sg_keepalive,
	      pim_test_sg_keepalive_cmd,
	      "test pim [vrf NAME$name] keepalive-reset A.B.C.D$source A.B.C.D$group",
	      "Test code\n"
	      PIM_STR
	      VRF_CMD_HELP_STR
	      "Reset the Keepalive Timer\n"
	      "The Source we are resetting\n"
	      "The Group we are resetting\n")
{```

Why do we need another one?

There is some difference in this implementation. The command you mentioned restart/refresh the keep alive timer once. This implementation will avoid ageing of sg entries until it's allowed to age by same CLI.

@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-11799/

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.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for pim_cmd.c | 4 issues
===============================================
< WARNING: else is not generally useful after a break or return
< #8118: FILE: /tmp/f1-928/pim_cmd.c:8118:
< WARNING: space prohibited between function name and open parenthesis '('
< #8122: FILE: /tmp/f1-928/pim_cmd.c:8122:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11799/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-01-g02c74226f-0 (missing) -> 7.4-dev-20200413-01-g02c74226f-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-01-g02c74226f-0 (missing) -> 7.4-dev-20200413-01-g02c74226f-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-01-g02c74226f-0 (missing) -> 7.4-dev-20200413-01-g02c74226f-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-01-g02c74226f-0 (missing) -> 7.4-dev-20200413-01-g02c74226f-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200413-01-g02c74226f-0 (missing) -> 7.4-dev-20200413-01-g02c74226f-0~deb10u1

Copy link
Member

@donaldsharp donaldsharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nack from me. I see no reason to have a slightly different test command from what is already implemented in FRR.

@sarav511
Copy link
Contributor Author

Nack from me. I see no reason to have a slightly different test command from what is already implemented in FRR.

'stop ageing' and 'delaying the ageing once' is not same.

Infact the vxlan BUM traffic implementation do not age the entry which is same as this CLI implementation.

There are implementations where we do not use linux forwarding for datapath. They may have a hardware based or dpdk based elsewhere outside kernel. kat timer inside pim would lack the capability of sensing the actual traffic in datapath.

Those scenarios need to stop ageing like this and have a external trigger to age out.
Shortly, we will be providing the external interface(protobuf based) to age out, relay route(update and bulk sync). There is also going to be a test command to force-expire the entry immediately.

These commands will be used to mimic that scenario of ageout. Topotests are built around these CLI. If there are any suggestions to make it a config command, we shall make it so.

@eqvinox
Copy link
Contributor

eqvinox commented Apr 14, 2020

There are implementations where we do not use linux forwarding for datapath. They may have a hardware based or dpdk based elsewhere outside kernel. kat timer inside pim would lack the capability of sensing the actual traffic in datapath.

This implies you need this behaviour in production / regular operation, rather than a test command. Is that the case?

@sarav511
Copy link
Contributor Author

This implies you need this behaviour in production / regular operation, rather than a test command. Is that the case?

@eqvinox Yes. We need this behavior in production.
Internally we have it as a config command. There are a set of cases in topotest suite(which will be upstreamed in some time) which requires this functionality. Due to some code logistics, i opted to give it as 'test' for now. please suggest if I can upload as config command.

@donaldsharp
Copy link
Member

  1. This is not proper usage of test and does not belong as a test command.

Additionally:
2) As per discussion in todays tech meeting.
a) Control Plane activity is owned by the control plane and I am not going to let this be offloaded out of FRR. This is a pretty hard line for me The control plane controls the data plane listens for instructions and implements them.
b) If your underlying data plane needs a mechanism to report whether or not streams are working then there is already an api that can do this, that should be expanded instead of this methodology.
c) Turning off a key part of the pim state machine will Break it. All my experience with pim leads me to know I'm not interested in going down a change in RFC behavior.

The data plane must be able to either be queried or report stream flowing state.

@sarav511
Copy link
Contributor Author

sarav511 commented May 5, 2020

The current ageing mechanism in the PIM code is polling for traffic status kernel.
The proposed mechanism is to report the traffic status from datapath. That has 2 parts

  1. Turn off polling(ignore polling status because this doesn't get from actual datatpath)
  2. provide protobuf based api to report that it is aged.
    This PR addresses part 1 of the proposed mechanism. If not test, we shall make it as config.
    Part 2 is yet to be raised.
    We will hold all this for now as there is objection to this approach.

We will decide on the approach later after discussing with Donald and rework using a different PR.
Closing this now.

@sarav511 sarav511 closed this May 5, 2020
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.

6 participants