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

zebra: Distributed Dataplane module #522

Closed
wants to merge 1 commit into from

Conversation

bingen
Copy link
Member

@bingen bingen commented May 12, 2017

Using the recently added feature to allow loading modules dynamically
with dlopen, a few hooks are added to be able to have a remote
dataplane. In particular, control is outsourced for:

  • Add and delete IP addresses.
  • Add and delete IP routes.
  • Add and delete MPLS routes.
  • Add and delete Pseudowires.

If an external module is enabled, installation of routes is held in Zebra and the module is responsible for it.

A new command line parameter, --dp-opts, is added to be able to tweak
module execution. It's up to the module to parse and use content passed
into it.

Besides, support for ZMQ communication is added to FRR thread library.

Signed-off-by: ßingen bingen@voltanet.io

Using the recently added feature to allow loading modules dynamically
with dlopen, a few hooks are added to be able to have a remote
dataplane. In particular, control is outsourced for:

- Add and delete IP addresses.
- Add and delete IP routes.
- Add and delete MPLS routes.
- Add and delete Pseudowires.

A new command line parameter, --dp-opts, is added to be able to tweak
module execution. It's up to the module to parse and use content passed
into it.

Besides, support for ZMQ communication is added to FRR thread library.

Signed-off-by: ßingen <bingen@voltanet.io>
@NetDEF-CI
Copy link
Collaborator

Continous Integration Result: FAILED

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

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.

Get source and apply patch from patchwork: Successful

Building Stage: Failed

CentOS7 amd64 build: Successful
Ubuntu1404 amd64 build: Successful
Debian8 amd64 build: Successful
CentOS6 amd64 build: Successful
Fedora24 amd64 build: Successful
Ubuntu1204 amd64 build: Successful

FreeBSD10 amd64 build: Failed

Make failed for FreeBSD10 amd64 build:
(see full make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI003BUILD/ErrorLog/log_make.txt)

  CC       zebra_pw.o
  CC       zebra_dataplane.o
zebra_dataplane.c:21:3: error: use of undeclared identifier '_hook_mpls_route_change'; did you mean '_hook_route_change'?
  hook_register (mpls_route_change, mpls_route_change);
  ^
../lib/hook.h:115:18: note: expanded from macro 'hook_register'
        _hook_register(&_hook_ ## hookname, \
                        ^
<scratch space>:180:1: note: expanded from here

FreeBSD10 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI003BUILD/config.status/config.status

OmniOS amd64 build: Failed

Make failed for OmniOS amd64 build:
(see full make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI010BUILD/ErrorLog/log_make.txt)

                 from zebra_dataplane.c:1:
zebra_dataplane.c: In function init_default_dataplane:
../lib/hook.h:115:18: error: _hook_mpls_route_change undeclared (first use in this function)
  _hook_register(&_hook_ ## hookname, \
                  ^
zebra_dataplane.c:21:3: note: in expansion of macro hook_register
   hook_register (mpls_route_change, mpls_route_change);
   ^
../lib/hook.h:115:18: note: each undeclared identifier is reported only once for each function it appears in

OmniOS amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI010BUILD/config.status/config.status

OpenBSD60 amd64 build: Failed

Make failed for OpenBSD60 amd64 build:
(see full make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI011BUILD/ErrorLog/log_make.txt)

  CC       zebra_dataplane.o
zebra_dataplane.c: In function 'init_default_dataplane':
zebra_dataplane.c:21: error: '_hook_mpls_route_change' undeclared (first use in this function)
zebra_dataplane.c:21: error: (Each undeclared identifier is reported only once
zebra_dataplane.c:21: error: for each function it appears in.)
zebra_dataplane.c:21: warning: implicit declaration of function '_hook_typecheck_mpls_route_change'
zebra_dataplane.c:21: error: 'mpls_route_change' undeclared (first use in this function)
zebra_dataplane.c:21: warning: passing argument 2 of '_hook_register' makes pointer from integer without a cast
*** Error 1 in zebra (Makefile:756 'zebra_dataplane.o': @echo "  CC      " zebra_dataplane.o;gcc -std=gnu99 -DHAVE_CONFIG_H -DSYSCONFDIR=\"/...)

OpenBSD60 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI011BUILD/config.status/config.status

NetBSD7 amd64 build: Failed

Make failed for NetBSD7 amd64 build:
(see full make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI012BUILD/ErrorLog/log_make.txt)

                 from zebra_dataplane.c:1:
zebra_dataplane.c: In function 'init_default_dataplane':
../lib/hook.h:115:18: error: '_hook_mpls_route_change' undeclared (first use in this function)
  _hook_register(&_hook_ ## hookname, \
                  ^
zebra_dataplane.c:21:3: note: in expansion of macro 'hook_register'
   hook_register (mpls_route_change, mpls_route_change);
   ^
../lib/hook.h:115:18: note: each undeclared identifier is reported only once for each function it appears in

NetBSD7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI012BUILD/config.status/config.status

FreeBSD11 amd64 build: Failed

Make failed for FreeBSD11 amd64 build:
(see full make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI009BUILD/ErrorLog/log_make.txt)

_hook_typecheck_mpls_route_change
^
zebra_dataplane.c:21:37: error: use of undeclared identifier 'mpls_route_change'
  hook_register (mpls_route_change, mpls_route_change);
                                    ^
zebra_dataplane.c:21:3: error: use of undeclared identifier '_hook_mpls_route_change'; did you mean '_hook_route_change'?
  hook_register (mpls_route_change, mpls_route_change);
  ^
../lib/hook.h:115:18: note: expanded from macro 'hook_register'

FreeBSD11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI009BUILD/config.status/config.status

Ubuntu1604 amd64 build: Failed

Ubuntu1604 amd64 build: Unknown Log <log_snapcraft.txt>
URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI014BUILD/ErrorLog/log_snapcraft.txt
Ubuntu1604 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI014BUILD/config.status/config.status
Ubuntu1604 amd64 build: No useful log found

NetBSD6 amd64 build: Failed

Make failed for NetBSD6 amd64 build:
(see full make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI007BUILD/ErrorLog/log_make.txt)

  CC       zebra_dataplane.o
zebra_dataplane.c: In function 'init_default_dataplane':
zebra_dataplane.c:21:1: error: '_hook_mpls_route_change' undeclared (first use in this function)
zebra_dataplane.c:21:1: note: each undeclared identifier is reported only once for each function it appears in
zebra_dataplane.c:21:3: warning: implicit declaration of function '_hook_typecheck_mpls_route_change'
zebra_dataplane.c:21:3: error: 'mpls_route_change' undeclared (first use in this function)
*** Error code 1
Stop.
make: stopped in /home/ci/cibuild.674/frr-source/zebra

NetBSD6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI007BUILD/config.status/config.status

FreeBSD9 amd64 build: Failed

Make failed for FreeBSD9 amd64 build:
(see full make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI004BUILD/ErrorLog/log_make.txt)

  CC       zebra_dataplane.o
zebra_dataplane.c: In function 'init_default_dataplane':
zebra_dataplane.c:21: error: '_hook_mpls_route_change' undeclared (first use in this function)
zebra_dataplane.c:21: error: (Each undeclared identifier is reported only once
zebra_dataplane.c:21: error: for each function it appears in.)
zebra_dataplane.c:21: warning: implicit declaration of function '_hook_typecheck_mpls_route_change'
zebra_dataplane.c:21: error: 'mpls_route_change' undeclared (first use in this function)
zebra_dataplane.c:21: warning: passing argument 2 of '_hook_register' makes pointer from integer without a cast
*** [zebra_dataplane.o] Error code 1

FreeBSD9 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-674/artifact/CI004BUILD/config.status/config.status

@qlyoung
Copy link
Member

qlyoung commented May 12, 2017

Can you add some high level explanation on what the use case for this is and how it works? Especially interested in how this ties into ZeroMQ. Message passing for distributing routes or something?

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.

Barring any other actual review comments I may or may not have ( I have not looked at this yet ) but it is not appropriate to put this forward against stable/3.0 This is completely new functionality and does not belong on a branch that we are attempting to stabilize

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.

What does ZMQ provide us that we need to have this new functionality in FRR? My quick google searches do not provide any clear insight into what different problem we are solving here that we need to have?

Additionally the lib/thread.[ch] changes break the abstraction that I was trying to create when I separated out poll and select.

Why don't the PW changes use the FPM -or- the zapi to get this data into zebra. Additionally why does this belong in zebra?

@vjardin
Copy link
Contributor

vjardin commented May 12, 2017

I think that this serie needs to be splited:

  • there are some extensions for PW
  • there is a discussion about ZMQ
    Then, regarding ZMQ, same as Donald, it should be discussed.

@vjardin vjardin requested review from vjardin and pguibert6WIND May 12, 2017 20:45
@eqvinox
Copy link
Contributor

eqvinox commented May 13, 2017

Can we get the ldpd/zebra VPLS additions in a separate first PR?
I think that part can go into master rather easily.

@bingen
Copy link
Member Author

bingen commented May 13, 2017

ZMQ support can be used for whatever anybody can imagine, for example, the IDL with Capnproto @eqvinox was working on.
In particular, we need it because it's the way we communicate with our remote dataplane.
@donaldsharp I don't understand what you mean with that abstraction, could you elaborate a little bit more, please? I will be glad to improve it in any possible way if I understand what it's wrong, but I don't see how it can break anything because if you don't use --enable-zmq at compile time the code should remain the same.

@eqvinox eqvinox mentioned this pull request May 17, 2017
@bingen
Copy link
Member Author

bingen commented May 22, 2017

Replaced by #566 , #601 and #602

@bingen bingen closed this May 22, 2017
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.

6 participants