Make sure ip forward is enabled on SFC full deploy 07/65807/3
authorJaime Caamaño Ruiz <jcaamano@suse.com>
Tue, 21 Nov 2017 16:39:03 +0000 (17:39 +0100)
committerJaime Caamaño Ruiz <jcaamano@suse.com>
Wed, 22 Nov 2017 13:31:06 +0000 (14:31 +0100)
So that OVS instances running in docker containers can talk to ODL
controller.

Change-Id: I24fa65c2956b0474328658132277f251b746d8d3
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
csit/suites/sfc/Full_Deploy/docker-ovs.sh

index e94aa41e59c629ae054b2712dc212cdca5f8082b..5d6540200cebdf0d9de8aada3827620ba6dcbe4d 100755 (executable)
@@ -64,6 +64,10 @@ delete_netns_link () {
     sudo rm -f /var/run/netns/"$PID"
 }
 
+enable_ip_forward () {
+    sudo sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
+}
+
 connect_namespace_to_container () {
 
     NAMESPACE="$1"
@@ -262,6 +266,9 @@ spawn_nodes_and_guests () {
          exit 1
     fi
 
+    # Make sure ip forwarding is enabled
+    enable_ip_forward
+
     # Create a host bridge as end point for all tunnels
     if ovs_vsctl br-exists br-tun; then :; else
         ovs_vsctl add-br br-tun