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

Sharp nhg #3550

Merged
merged 3 commits into from
Jan 2, 2019
Merged

Sharp nhg #3550

merged 3 commits into from
Jan 2, 2019

Conversation

donaldsharp
Copy link
Member

Allow the sharp daemon to take advantage of nexthop-groups as part of route-installation.

example:
!
nexthop-group JANELLE
nexthop 192.168.209.1
nexthop 192.168.210.1
!
line vty
!
end
donna.cumulusnetworks.com# conf t

donna.cumulusnetworks.com# sharp install routes 10.0.50.0 nexthop-group JANELLE 10

@LabN-CI
Copy link
Collaborator

LabN-CI commented Dec 31, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/3550 baf682b
Date 12/31/2018
Start 18:20:46
Finish 18:44:46
Run-Time 24:00
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-12-31-18:20:46.txt
Log autoscript-2018-12-31-18:21:27.log.bz2

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

This is a comment from an EXPERIMENTAL 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 vtysh.c | 2 issues
===============================================
< WARNING: please, no spaces at the start of a line
< #2124: FILE: /tmp/f1-5286/vtysh.c:2124:

Warnings Generated during build:

Ubuntu 14.04 amd64 build: Successful with additional warnings:

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

W: frr: package-name-doesnt-match-sonames libfrr0 libfrrospfapiclient0
N: 3 tags overridden (3 warnings)

Ubuntu 16.04 amd64 build: Successful with additional warnings:

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

W: frr: package-name-doesnt-match-sonames libfrr0 libfrrospfapiclient0
N: 3 tags overridden (3 warnings)

Ubuntu 18.04 amd64 build: Successful with additional warnings:

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

W: frr: package-name-doesnt-match-sonames libfrr0 libfrrospfapiclient0
N: 4 tags overridden (3 warnings, 1 info)

Ubuntu 16.04 i386 build: Successful with additional warnings:

Debian Package lintian failed for Ubuntu 16.04 i386 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6293/artifact/U1604I386/ErrorLog/log_lintian.txt)

W: frr: package-name-doesnt-match-sonames libfrr0 libfrrospfapiclient0
N: 3 tags overridden (3 warnings)

Debian 8 amd64 build: Successful with additional warnings:

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

W: frr: package-name-doesnt-match-sonames libfrr0 libfrrospfapiclient0
N: 3 tags overridden (3 warnings)

Debian 9 amd64 build: Successful with additional warnings:

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

W: frr: package-name-doesnt-match-sonames libfrr0 libfrrospfapiclient0
N: 3 tags overridden (3 warnings)

CLANG Static Analyzer Summary

  • Github Pull Request 3550, comparing to Git base SHA e9e9a7f

No Changes in Static Analysis warnings compared to base

@@ -81,46 +82,63 @@ DEFPY(watch_nexthop_v4, watch_nexthop_v4_cmd,

DEFPY (install_routes,
install_routes_cmd,
"sharp install routes A.B.C.D$start nexthop <A.B.C.D$nexthop4|X:X::X:X$nexthop6> (1-1000000)$routes [instance (0-255)$instance]",
"sharp install routes A.B.C.D$start [nexthop <A.B.C.D$nexthop4|X:X::X:X$nexthop6>|nexthop-group NAME$nexthop_group] (1-1000000)$routes [instance (0-255)$instance]",
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we use <> instead of [] so that either nexthop or nexthop-group needs to be specified?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah my mistake. Fixed

nhop.gate.ipv4 = nexthop4;
nhop.type = NEXTHOP_TYPE_IPV4;
if (nexthop_group) {
nhgc = nhgc_find(nexthop_group);
Copy link
Member

Choose a reason for hiding this comment

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

nit: you could reduce the scope of nhgc by declaring it in this block.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

nhop.gate.ipv4 = nexthop4;
nhop.type = NEXTHOP_TYPE_IPV4;
} else {
memcpy(&nhop.gate.ipv6, &nexthop6, IPV6_MAX_BYTELEN);
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think nhop.gate.ipv6 = nexthop6 would read better.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

Modify the route_add function to take nexthop groups.  Future commits
will allow sharpd to use nexthop groups as the install mechanism
for routes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Allow the sharp daemon to understand and use nexthop-groups.

This commit is merely to allow sharpd to understand them
when accepted in a future commit

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When installing routes via sharpd 'sharp install route... ' command
add the ability to specify a nexthop-group to use.  This will
allow sharpd to create ECMP routes into zebra.

Nexthop-group:
!
nexthop-group JANELLE
  nexthop 192.168.209.1
  nexthop 192.168.210.1
!

The install:

donna.cumulusnetworks.com# sharp install routes 10.0.50.0 nexthop-group JANELLE 10
donna.cumulusnetworks.com# end
donna.cumulusnetworks.com# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route

K>* 0.0.0.0/0 [0/106] via 10.0.2.2, enp0s3, 00:20:38
C>* 10.0.2.0/24 is directly connected, enp0s3, 00:20:38
D>* 10.0.50.0/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02
  *                      via 192.168.210.1, enp0s9, 00:00:02
D>* 10.0.50.1/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02
  *                      via 192.168.210.1, enp0s9, 00:00:02
D>* 10.0.50.2/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02
  *                      via 192.168.210.1, enp0s9, 00:00:02
D>* 10.0.50.3/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02
  *                      via 192.168.210.1, enp0s9, 00:00:02
D>* 10.0.50.4/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02
  *                      via 192.168.210.1, enp0s9, 00:00:02
D>* 10.0.50.5/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02
  *                      via 192.168.210.1, enp0s9, 00:00:02
D>* 10.0.50.6/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02
  *                      via 192.168.210.1, enp0s9, 00:00:02
D>* 10.0.50.7/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02
  *                      via 192.168.210.1, enp0s9, 00:00:02
D>* 10.0.50.8/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02
  *                      via 192.168.210.1, enp0s9, 00:00:02
D>* 10.0.50.9/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02
  *                      via 192.168.210.1, enp0s9, 00:00:02
C>* 192.168.209.0/24 is directly connected, enp0s8, 00:20:38
C>* 192.168.210.0/24 is directly connected, enp0s9, 00:20:38
donna.cumulusnetworks.com#

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
@LabN-CI
Copy link
Collaborator

LabN-CI commented Jan 2, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/3550 d4101c0
Date 01/02/2019
Start 10:50:45
Finish 11:14:12
Run-Time 23:27
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-01-02-10:50:45.txt
Log autoscript-2019-01-02-10:51:27.log.bz2

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

This is a comment from an EXPERIMENTAL 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 sharp_vty.c | 2 issues
===============================================
< WARNING: Missing a blank line after declarations
< #192: FILE: /tmp/f1-26797/sharp_vty.c:192:
Report for vtysh.c | 2 issues
===============================================
< WARNING: please, no spaces at the start of a line
< #2124: FILE: /tmp/f1-26797/vtysh.c:2124:

Warnings Generated during build:

Ubuntu 16.04 i386 build: Successful with additional warnings:

Debian Package lintian failed for Ubuntu 16.04 i386 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6296/artifact/U1604I386/ErrorLog/log_lintian.txt)

W: frr: package-name-doesnt-match-sonames libfrr0 libfrrospfapiclient0
N: 3 tags overridden (3 warnings)

Ubuntu 16.04 amd64 build: Successful with additional warnings:

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

W: frr: package-name-doesnt-match-sonames libfrr0 libfrrospfapiclient0
N: 3 tags overridden (3 warnings)

Ubuntu 18.04 amd64 build: Successful with additional warnings:

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

W: frr: package-name-doesnt-match-sonames libfrr0 libfrrospfapiclient0
N: 4 tags overridden (3 warnings, 1 info)

Debian 8 amd64 build: Successful with additional warnings:

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

W: frr: package-name-doesnt-match-sonames libfrr0 libfrrospfapiclient0
N: 3 tags overridden (3 warnings)

Debian 9 amd64 build: Successful with additional warnings:

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

W: frr: package-name-doesnt-match-sonames libfrr0 libfrrospfapiclient0
N: 3 tags overridden (3 warnings)

Ubuntu 14.04 amd64 build: Successful with additional warnings:

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

W: frr: package-name-doesnt-match-sonames libfrr0 libfrrospfapiclient0
N: 3 tags overridden (3 warnings)

CLANG Static Analyzer Summary

  • Github Pull Request 3550, comparing to Git base SHA d52fa66

No Changes in Static Analysis warnings compared to base

@rwestphal rwestphal merged commit 650f3a5 into FRRouting:master Jan 2, 2019
@donaldsharp donaldsharp deleted the sharp_nhg branch April 30, 2019 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants