Commit Graph

739 Commits

Author SHA1 Message Date
Donald Sharp
d9d759ff7e
Merge pull request #3396 from opensourcerouting/feature/topotests-docker
feature: docker image for topotests
2018-11-30 15:39:50 -05:00
Russ White
9f7b49e105
Merge pull request #3342 from opensourcerouting/nb-operational-data
Northbound: improved support for YANG-modeled operational data
2018-11-29 15:19:38 -05:00
Christian Franke
5f1ac6d669 topotests: Only set -t when input is a terminal
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
ff37641ba2 topotests: Adapt docker changes for integrated tests
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
f509ad9785 docker/frr-topotests: Fix missing $ in if check
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
937e5dab6a docker/compile_frr: Don't build with disable shared
With libyang, we need to build the frr_user_types.so libyang
plugin for FRR to work.

This means we cannot build with disable shared.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
9b5470a843 docker: Improve README and frr-topotests usage
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
7996f1975d Dockerfile: Install libyang
Recent versions of FRR require libyang to build. So install it from
the FRR CI servers.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
6926d304a8 Docker: Fail if compilation is unsucessful
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
877d4e3642 Docker: Document additional environment variables
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
4242d6e2ae Docker: Use pytest as default command
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
31eae3e3b0 Docker: move openvswitch setup to separate script
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
3311145d70 Docker: Allow executing topotests while in subdir of FRR repo
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
1ab13617bf Docker: really cleanup when TOPOTEST_CLEAN is specified
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
f1c0836f67 Docker: Update buildscript not to delete old images
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
d9e887de2a Docker: Call the run script frr-topotests.sh
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
8e6f0d80f6 Dockerfile: Use iputils-ping instead of inetutils-ping, install strace
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
7b75f8cce3 Docker: Update buildscripts to be more efficient
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
ca64604f47 docker: Install topotests into image
Also: Change directory layout so we can do an indempotent sync from host
later.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
04c63c05b5 docker: reindent shell scripts
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
c12ec8557e docker: Run container with its own network namespace
For normal operation, there is no need for the container to run
in the host network environment or to have access to the users
X Session.

To accomodate usecases which need this, there is now a `TOPOTEST_OPTIONS`
environment variable to provide additional options to the docker run
command.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
e425ee6357 Dockerfile: Move to project root and combine RUNs
According to https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#run
`apt-get update` should always be combined with `apt-get install` in
the same `RUN` statement, to avoid installation of outdated packages.

Also, combine some more `RUN`s together as to avoid fewer layers.

Finally, remove some comments which are superflous. Comments shouldn't
describe what is done, especially when it's obvious. They should
explain why something is done.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Rafael Zalamena
1e9c095c6f docker: add support for running inside container
Based on the original @cfra idea of running topotest on docker.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Donald Sharp
096694da47 topotests: Add ospf-sr-topo1 back in
Due to weird merge issues ospf-sr-topo1 was not pulled in.
This gets this back into the tree.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
2018-11-27 20:22:14 -05:00
Donald Sharp
d21321142a Add a tiny breadcrumb to hopefully help end user
Add a breadcrumb for people testing to hopefully allow
them to figure out what is going wrong when they
are testing different versions of FRR using
topotests and staticd is not running because
this version of staticd needs to be cleaned up

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
b941f9587f bgp-ecmp-topo1: fix some pylint warnings
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
47bbb80ad2 bgp-ecmp-topo1: fix vrf default change
Python's `string' method 'replace' doesn't actually modify the string,
instead it returns a new string with the modified content.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Philippe Guibert
f847adaf8f bgp-ecmp-topo1: change default vrf name
By default, default vrf name is default, whereas BGP default vrf was
hardcoded to Default. Because this will be fixes, do not care about the
vrf name field and apply a regexp to move Default to default.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:14 -05:00
Christian Franke
940e6a5f9e ospf6-topo1: Don't compare link-local routes
Topotests would fail with errors like these:

    AssertionError: Linux Kernel IPv6 Routing Table verification failed for router r1:
      --- actual OSPFv3 IPv6 routing table
      +++ expected OSPFv3 IPv6 routing table
      @@ -8,6 +8,6 @@
       fc00:4:4:4::/64 via fe80::__(r3-sw5)__ dev r1-sw5 proto XXXX metric 20 pref medium
       fc00🅰️a🅰️:/64 dev r1-sw5 proto XXXX metric 256 pref medium
       fc00🅱️b🅱️:/64 via fe80::__(r3-sw5)__ dev r1-sw5 proto XXXX metric 20 pref medium
      -fe80::/64 dev lo proto XXXX metric 256 pref medium
       fe80::/64 dev r1-stubnet proto XXXX metric 256 pref medium
      -fe80::/64 dev r1-sw5 proto XXXX metric 256 pref medium
      +fe80::/64 dev r1-sw5 proto XXXX metric 256 pref medium
      +unreachable fe80::/64 dev lo proto XXXX metric 256 error -101 pref medium

Resolve this by not comparing link-local routes.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
paco
86c21ac7fc lib, lm-proxy-topo1: label manager proxy test
Label proxy manager test covering both LDP and BGP label requests.

lib/topotest.py:restartRouter() function has been fixed in order to
allow propagating options to deamons other than zebra.

Signed-off-by: F. Aragon <paco@voltanet.io>
2018-11-27 20:22:14 -05:00
Martin Winter
fa2adbc528 pick ospf6 router-id syntax based on version
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Martin Winter
6bfe4b8bfc lib: checkRouterVersion to determine version
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Donald Sharp
9ac2326ed0 Clean up deprecated usage of router-id
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
bd170de3b6 bfd-topo1: import topology picture
Import the graphviz file and the generated picture.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
14bb9445d6 bfd-topo1: add fast reconvergence test
Test that after a link goes down BGPd will be notified and recovered
quickly. Also test that BFD show command tells us that the peer went
down.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
843713317d bfd-topo1: add convergence tests
Test if BFD peers have found each other and if the BGP neighors have
connected.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
4d45d6d3b0 topogen/topotest: add support for BFDd
Allow BFDd to be configured and used.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Lou Berger
d1f4560e7d bgp_rfapi_basic_sanity_config2: allow for slow CI
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
9a75228916 bgp_rfapi_basic_sanity_config2: added rfapi test with partial table download This is identical to bgp_rfapi_basic_sanity with the exception of non-default config
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
7a9a953d7e bgp_rfapi_basic_sanity: added query only NVE
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Martin Winter
2f726781b6 lib: Add support for Ubuntu 18.04 with installed FRR package
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Lou Berger
16872f5683 bgp_rfapi_basic_sanity: added multi-path to timeout test
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
1677325096 bgp_rfapi_basic_sanity: added cost to 2nd MP route
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
4ce7be6957 bgp_rfapi_basic_sanity: added multi-path and updated responses
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
d12ac2a975 bgp_rfapi_basic_sanity: wait for clean exit
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
914d749d8a bgp_rfapi_basic_sanity: added check_timeout (uses FRR PR#2934)
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
a73fb016ff bgp_rfapi_basic_sanity: added close check
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
ccabd61819 bgp_rfapi_basic_sanity: address PR comments (copyright, switch)
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
197d4fdad4 bgp_rfapi_basic_sanity: added basic rfapi sanity topotest
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
0eff58207e lib: fix ip4_route_zebra header removal code
The `strip` function is actually a method of the String object.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00