osrg / goplane

an agent for configuring linux network stack via GoBGP
http://osrg.github.io/gobgp/
119 stars 26 forks source link

goplane evpn/vxlan demo doesn't work well #29

Closed skjune12 closed 7 years ago

skjune12 commented 7 years ago

Hi, expert.

I try to play goplane evpn/vxlan demo - 'evpn_vxlan_test.py' on my virtual machine, but it doesn't work well.

The OS I use is Ubuntu 16.04 (xenial)

I attach an error message when I run even_vxlan_test.py below. Do you know any solution for fixing this problem?

root@ubuntu-xenial:~/.golang/src/github.com/osrg/goplane# PYTHONPATH=$GOPLANE/test python $GOPLANE/test/netlink/evpn_vxlan_test.py
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 3
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/create?name=g1 HTTP/1.1" 201 90
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/g1/start HTTP/1.1" 204 0
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/g1/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21223
DEBUG:nsenter:Leaving net namespace 21223
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 535
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/create?name=g2 HTTP/1.1" 201 90
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/g2/start HTTP/1.1" 204 0
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/g2/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21256
DEBUG:nsenter:Leaving net namespace 21256
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 1068
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/create?name=g3 HTTP/1.1" 201 90
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/g3/start HTTP/1.1" 204 0
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/g3/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21291
DEBUG:nsenter:Leaving net namespace 21291
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 1591
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/create?name=h1 HTTP/1.1" 201 90
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/h1/start HTTP/1.1" 204 0
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/h1/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21327
DEBUG:nsenter:Leaving net namespace 21327
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 1989
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/create?name=h2 HTTP/1.1" 201 90
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/h2/start HTTP/1.1" 204 0
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/h2/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21363
DEBUG:nsenter:Leaving net namespace 21363
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 None
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/create?name=h3 HTTP/1.1" 201 90
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/h3/start HTTP/1.1" 204 0
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/h3/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21403
DEBUG:nsenter:Leaving net namespace 21403
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 None
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/create?name=j1 HTTP/1.1" 201 90
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/j1/start HTTP/1.1" 204 0
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/j1/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21443
DEBUG:nsenter:Leaving net namespace 21443
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 None
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/create?name=j2 HTTP/1.1" 201 90
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/j2/start HTTP/1.1" 204 0
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/j2/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21493
DEBUG:nsenter:Leaving net namespace 21493
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 None
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/create?name=j3 HTTP/1.1" 201 90
DEBUG:requests.packages.urllib3.connectionpool:"POST /v1.24/containers/j3/start HTTP/1.1" 204 0
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/j3/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21532
DEBUG:nsenter:Leaving net namespace 21532
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/g1/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21223
DEBUG:nsenter:Leaving net namespace 21223
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/g2/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21256
DEBUG:nsenter:Leaving net namespace 21256
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/g3/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21291
DEBUG:nsenter:Leaving net namespace 21291
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/g1/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21223
DEBUG:nsenter:Leaving net namespace 21223
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/h1/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21327
DEBUG:nsenter:Leaving net namespace 21327
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/g2/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21256
DEBUG:nsenter:Leaving net namespace 21256
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/h2/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21363
DEBUG:nsenter:Leaving net namespace 21363
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/g3/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21291
DEBUG:nsenter:Leaving net namespace 21291
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/h3/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21403
DEBUG:nsenter:Leaving net namespace 21403
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/g1/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21223
DEBUG:nsenter:Leaving net namespace 21223
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/j1/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21443
DEBUG:nsenter:Leaving net namespace 21443
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/g2/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21256
DEBUG:nsenter:Leaving net namespace 21256
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/j2/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21493
DEBUG:nsenter:Leaving net namespace 21493
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/g3/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21291
DEBUG:nsenter:Leaving net namespace 21291
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1.24/containers/j3/json HTTP/1.1" 200 None
DEBUG:nsenter:Entering net namespace 21532
DEBUG:nsenter:Leaving net namespace 21532
EEDEBUG:root:Network                                                                                       Next Hop             AS_PATH              Age        Attrs
*>  [type:macadv][rd:0:0][esi:single-homed][etag:10][mac:aa:aa:aa:aa:aa:01][ip:<nil>][labels:[10]]0.0.0.0                                   00:04:27   [{Origin: i} {Extcomms: [VXLAN]}]
*>  [type:macadv][rd:0:0][esi:single-homed][etag:10][mac:c6:35:fe:a1:40:85][ip:<nil>][labels:[10]]0.0.0.0                                   00:04:27   [{Origin: i} {Extcomms: [VXLAN]}]
*>  [type:macadv][rd:0:0][esi:single-homed][etag:20][mac:aa:aa:aa:aa:aa:01][ip:<nil>][labels:[20]]0.0.0.0                                   00:04:26   [{Origin: i} {Extcomms: [VXLAN]}]
*>  [type:macadv][rd:0:0][esi:single-homed][etag:20][mac:f2:d2:d5:a3:36:b1][ip:<nil>][labels:[20]]0.0.0.0                                   00:04:27   [{Origin: i} {Extcomms: [VXLAN]}]
*>  [type:multicast][rd:65000:10][etag:10][ip:192.168.0.1]0.0.0.0                                   00:04:27   [{Origin: i} {Pmsi: type: ingress-repl, label: 0, tunnel-id: 192.168.0.1} {Extcomms: [65000:10]}]
*>  [type:multicast][rd:65000:20][etag:20][ip:192.168.0.1]0.0.0.0                                   00:04:27   [{Origin: i} {Pmsi: type: ingress-repl, label: 0, tunnel-id: 192.168.0.1} {Extcomms: [65000:20]}]
.
======================================================================
ERROR: test_01_neighbor_established (evpn_vxlan_test.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/root/.golang/src/github.com/osrg/goplane/test/netlink/evpn_vxlan_test.py", line 97, in test_01_neighbor_established
 raise Exception('timeout')
Exception: timeout
-------------------- >> begin captured stdout << ---------------------
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j
[localhost] local: docker exec  g1 gobgp neighbor -j

--------------------- >> end captured stdout << ----------------------
-------------------- >> begin captured logging << --------------------
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 3
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/create?name=g1 HTTP/1.1" 201 90
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/g1/start HTTP/1.1" 204 0
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/g1/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21223
nsenter: DEBUG: Leaving net namespace 21223
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 535
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/create?name=g2 HTTP/1.1" 201 90
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/g2/start HTTP/1.1" 204 0
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/g2/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21256
nsenter: DEBUG: Leaving net namespace 21256
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 1068
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/create?name=g3 HTTP/1.1" 201 90
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/g3/start HTTP/1.1" 204 0
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/g3/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21291
nsenter: DEBUG: Leaving net namespace 21291
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 1591
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/create?name=h1 HTTP/1.1" 201 90
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/h1/start HTTP/1.1" 204 0
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/h1/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21327
nsenter: DEBUG: Leaving net namespace 21327
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 1989
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/create?name=h2 HTTP/1.1" 201 90
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/h2/start HTTP/1.1" 204 0
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/h2/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21363
nsenter: DEBUG: Leaving net namespace 21363
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 None
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/create?name=h3 HTTP/1.1" 201 90
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/h3/start HTTP/1.1" 204 0
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/h3/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21403
nsenter: DEBUG: Leaving net namespace 21403
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 None
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/create?name=j1 HTTP/1.1" 201 90
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/j1/start HTTP/1.1" 204 0
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/j1/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21443
nsenter: DEBUG: Leaving net namespace 21443
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 None
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/create?name=j2 HTTP/1.1" 201 90
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/j2/start HTTP/1.1" 204 0
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/j2/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21493
nsenter: DEBUG: Leaving net namespace 21493
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/json?all=1&limit=-1&trunc_cmd=0&size=0 HTTP/1.1" 200 None
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/create?name=j3 HTTP/1.1" 201 90
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1.24/containers/j3/start HTTP/1.1" 204 0
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/j3/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21532
nsenter: DEBUG: Leaving net namespace 21532
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/g1/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21223
nsenter: DEBUG: Leaving net namespace 21223
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/g2/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21256
nsenter: DEBUG: Leaving net namespace 21256
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/g3/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21291
nsenter: DEBUG: Leaving net namespace 21291
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/g1/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21223
nsenter: DEBUG: Leaving net namespace 21223
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/h1/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21327
nsenter: DEBUG: Leaving net namespace 21327
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/g2/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21256
nsenter: DEBUG: Leaving net namespace 21256
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/h2/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21363
nsenter: DEBUG: Leaving net namespace 21363
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/g3/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21291
nsenter: DEBUG: Leaving net namespace 21291
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/h3/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21403
nsenter: DEBUG: Leaving net namespace 21403
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/g1/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21223
nsenter: DEBUG: Leaving net namespace 21223
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/j1/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21443
nsenter: DEBUG: Leaving net namespace 21443
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/g2/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21256
nsenter: DEBUG: Leaving net namespace 21256
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/j2/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21493
nsenter: DEBUG: Leaving net namespace 21493
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/g3/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21291
nsenter: DEBUG: Leaving net namespace 21291
requests.packages.urllib3.connectionpool: DEBUG: "GET /v1.24/containers/j3/json HTTP/1.1" 200 None
nsenter: DEBUG: Entering net namespace 21532
nsenter: DEBUG: Leaving net namespace 21532
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_02_ping_check (evpn_vxlan_test.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/root/.golang/src/github.com/osrg/goplane/test/netlink/evpn_vxlan_test.py", line 106, in test_02_ping_check
 raise Exception('timeout')
Exception: timeout
-------------------- >> begin captured stdout << ---------------------
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'
[localhost] local: docker exec  h1 bash -c 'ping -c 1 10.10.10.3 2>&1 > /dev/null && echo true || echo false'

--------------------- >> end captured stdout << ----------------------

----------------------------------------------------------------------
Ran 3 tests in 273.745s

FAILED (errors=2)

regards,

skjune12 commented 7 years ago

FYI: I use Vagrant for running goplane evpn/vxlan demo. So please refer it if you need.

https://gist.github.com/skjune12/a042b8634cfb32b835971a255457ff35

ishidawataru commented 7 years ago

Please refer to this issue. https://github.com/osrg/goplane/issues/19

skjune12 commented 7 years ago

Thank you for your information. I found the reason why demo doesn't work is that there is no reachability among g1, g2, and g3. I check the interface has an IPv4 address correctly, but it doesn't work.

g1

root@ubuntu-xenial:~# docker exec -it g1 ip addr show eth1
17: eth1@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 92:14:b0:32:2a:17 brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.2/24 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::9014:b0ff:fe32:2a17/64 scope link 
       valid_lft forever preferred_lft forever

root@ubuntu-xenial:~# docker exec -it g1 ip r
192.168.10.0/24 dev eth1  proto kernel  scope link  src 192.168.10.2

root@ubuntu-xenial:~# docker exec -it g1 ip neigh
192.168.10.4 dev eth1 lladdr c2:ea:66:aa:30:37 STALE
192.168.10.3 dev eth1 lladdr 86:50:17:51:a9:2d STALE
192.168.10.1 dev eth1 lladdr 0a:0e:b9:bc:7e:d2 STALE

root@ubuntu-xenial:~# docker exec -it g1 ping -c 3 192.168.10.3
PING 192.168.10.3 (192.168.10.3): 56 data bytes
--- 192.168.10.3 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

root@ubuntu-xenial:~# docker exec -it g1 ping -c 3 192.168.10.4
PING 192.168.10.4 (192.168.10.4): 56 data bytes
--- 192.168.10.4 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

g2

root@ubuntu-xenial:~# docker exec -it g2 ip addr show eth1
19: eth1@if20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 86:50:17:51:a9:2d brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.3/24 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::8450:17ff:fe51:a92d/64 scope link 
       valid_lft forever preferred_lft forever

root@ubuntu-xenial:~# docker exec -it g2 ping -c 3 192.168.10.2
PING 192.168.10.2 (192.168.10.2): 56 data bytes
--- 192.168.10.2 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

root@ubuntu-xenial:~# docker exec -it g2 ip r
192.168.10.0/24 dev eth1  proto kernel  scope link  src 192.168.10.3

root@ubuntu-xenial:~# docker exec -it g2 ip neigh
192.168.10.4 dev eth1 lladdr c2:ea:66:aa:30:37 STALE
192.168.10.2 dev eth1 lladdr 92:14:b0:32:2a:17 STALE

root@ubuntu-xenial:~# docker exec -it g2 ping -c 3 192.168.10.4
PING 192.168.10.4 (192.168.10.4): 56 data bytes
--- 192.168.10.4 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

g3

root@ubuntu-xenial:~# docker exec -it g3 ip addr show eth1
21: eth1@if22: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether c2:ea:66:aa:30:37 brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.4/24 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::c0ea:66ff:feaa:3037/64 scope link 
       valid_lft forever preferred_lft forever

root@ubuntu-xenial:~# docker exec -it g3 ip r
192.168.10.0/24 dev eth1  proto kernel  scope link  src 192.168.10.4 

root@ubuntu-xenial:~# docker exec -it g3 ip neigh
192.168.10.1 dev eth1 lladdr 0a:0e:b9:bc:7e:d2 STALE
192.168.10.2 dev eth1 lladdr 92:14:b0:32:2a:17 STALE
192.168.10.3 dev eth1 lladdr 86:50:17:51:a9:2d STALE

root@ubuntu-xenial:~# docker exec -it g3 ping -c 3 192.168.10.3
PING 192.168.10.3 (192.168.10.3): 56 data bytes
--- 192.168.10.3 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

root@ubuntu-xenial:~# docker exec -it g3 ping -c 3 192.168.10.2
PING 192.168.10.2 (192.168.10.2): 56 data bytes
--- 192.168.10.2 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

Could you help me?

ishidawataru commented 7 years ago

Do you have reachability to 192.168.10.1? Also, please check if any iptables rules prevent packet flows.

skjune12 commented 7 years ago

Yes, each containers can send ping to 192.168.10.1, but when I set this address as a gateway of eth0, it doesn't work too.

root@ubuntu-xenial:~# docker exec -it g1 ping -c 3 192.168.10.1
PING 192.168.10.1 (192.168.10.1): 56 data bytes
64 bytes from 192.168.10.1: icmp_seq=0 ttl=64 time=0.083 ms
64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 time=0.096 ms
64 bytes from 192.168.10.1: icmp_seq=2 ttl=64 time=0.097 ms
--- 192.168.10.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.083/0.092/0.097/0.000 ms

root@ubuntu-xenial:~# docker exec -it g2 ping -c 3 192.168.10.1
PING 192.168.10.1 (192.168.10.1): 56 data bytes
64 bytes from 192.168.10.1: icmp_seq=0 ttl=64 time=0.131 ms
64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 time=0.072 ms
64 bytes from 192.168.10.1: icmp_seq=2 ttl=64 time=0.070 ms
--- 192.168.10.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.070/0.091/0.131/0.028 ms

root@ubuntu-xenial:~# docker exec -it g3 ping -c 3 192.168.10.1
PING 192.168.10.1 (192.168.10.1): 56 data bytes
64 bytes from 192.168.10.1: icmp_seq=0 ttl=64 time=0.104 ms
64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 time=0.106 ms
64 bytes from 192.168.10.1: icmp_seq=2 ttl=64 time=0.103 ms
--- 192.168.10.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.103/0.104/0.106/0.000 ms

This is the output after I set the default gateway of eth1 to 192.168.10.1. BGP speakers have no reachability each other.

root@ubuntu-xenial:~# docker exec -it g1 ip route add default via 192.168.10.1 dev eth1
root@ubuntu-xenial:~# docker exec -it g2 ip route add default via 192.168.10.1 dev eth1
root@ubuntu-xenial:~# docker exec -it g3 ip route add default via 192.168.10.1 dev eth1

root@ubuntu-xenial:~# docker exec -it g1 ping -c 3 192.168.10.3
PING 192.168.10.3 (192.168.10.3): 56 data bytes
--- 192.168.10.3 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

root@ubuntu-xenial:~# docker exec -it g1 ping -c 3 192.168.10.4
PING 192.168.10.4 (192.168.10.4): 56 data bytes
--- 192.168.10.4 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

root@ubuntu-xenial:~# docker exec -it g2 ping -c 3 192.168.10.2
PING 192.168.10.2 (192.168.10.2): 56 data bytes
--- 192.168.10.2 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

root@ubuntu-xenial:~# docker exec -it g2 ping -c 3 192.168.10.4
PING 192.168.10.4 (192.168.10.4): 56 data bytes
--- 192.168.10.4 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

root@ubuntu-xenial:~# docker exec -it g3 ping -c 3 192.168.10.2
PING 192.168.10.2 (192.168.10.2): 56 data bytes
--- 192.168.10.2 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

root@ubuntu-xenial:~# docker exec -it g3 ping -c 3 192.168.10.3
PING 192.168.10.3 (192.168.10.3): 56 data bytes
--- 192.168.10.3 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

There is also a problem when I try to check the iptables rules: All container says "No such file or directory"

root@ubuntu-xenial:~# docker exec -it g3 iptables -L
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:262: starting container process caused "exec: \"/bin/iptables\": stat /bin/iptables: no such file or directory"
root@ubuntu-xenial:~# docker exec -it g3 which iptables

So I have no idea what I need to check...

ishidawataru commented 7 years ago

You don't need to exec iptables in container namespace. Instead, just run iptables -L in default namespace.

skjune12 commented 7 years ago

Sorry for that. I have no rules in my default namespace.

root@ubuntu-xenial:~# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy DROP)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain DOCKER (0 references)
target     prot opt source               destination         

Chain DOCKER-ISOLATION (0 references)
target     prot opt source               destination         

Chain DOCKER-USER (0 references)
target     prot opt source               destination
ishidawataru commented 7 years ago
Chain FORWARD (policy DROP)

It seems this is causing the trouble. Please run iptables -P FORWARD ACCEPT

skjune12 commented 7 years ago

It works well. Thank you for your kind support!