Add external veth pair 51/59851/1
authorHarry Huang <huangxiangyu5@huawei.com>
Mon, 16 Jul 2018 09:26:35 +0000 (17:26 +0800)
committerHarry Huang <huangxiangyu5@huawei.com>
Mon, 16 Jul 2018 09:26:35 +0000 (17:26 +0800)
JIRA: COMPASS-604

Add veth pair and connect them to br-external.
OpenDaylight can bind that veth instead of the
external interface.

Change-Id: I26f122bf8cab0943b7b056050de01381bab6d395
Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
deploy/adapters/ansible/roles/config-compute/templates/compute.j2
deploy/adapters/ansible/roles/config-controller/templates/controller.j2

index b23550f..60cb12a 100644 (file)
@@ -64,13 +64,13 @@ iface br-external inet static
     gateway {{ ip_settings[inventory_hostname]["external"]["gw"] }}
     offload-sg off
     # Create veth pair, don't bomb if already exists
-    pre-up ip link add br-vlan-veth type veth peer name eth12 || true
+    pre-up ip link add br-external-veth type veth peer name external-nic || true
     # Set both ends UP
-    pre-up ip link set br-vlan-veth up
-    pre-up ip link set eth12 up
+    pre-up ip link set br-external-veth up
+    pre-up ip link set external-nic up
     # Delete veth pair on DOWN
-    post-down ip link del br-vlan-veth || true
-    bridge_ports br-vlan-veth
+    post-down ip link del br-external-veth || true
+    bridge_ports br-external-veth
 
 # VXLAN (tunnel/overlay) bridge config
 auto br-tenant
index ae654b4..8061ec1 100755 (executable)
@@ -62,6 +62,15 @@ iface br-external inet static
     address {{ ip_settings[inventory_hostname]["external"]["ip"] }}
     netmask 255.255.255.0
     gateway {{ ip_settings[inventory_hostname]["external"]["gw"] }}
+    offload-sg off
+    # Create veth pair, don't bomb if already exists
+    pre-up ip link add br-external-veth type veth peer name external-nic || true
+    # Set both ends UP
+    pre-up ip link set br-external-veth up
+    pre-up ip link set external-nic up
+    # Delete veth pair on DOWN
+    post-down ip link del br-external-veth || true
+    bridge_ports br-external-veth
 
 # OpenStack Networking VXLAN (tunnel/overlay) bridge
 #