Browse code

Merge "Make neutron ml2 use ovs native interface"

Jenkins authored on 2016/12/01 09:11:04
Showing 2 changed files
... ...
@@ -95,6 +95,11 @@ function neutron_plugin_configure_plugin_agent {
95 95
         # XEN_INTEGRATION_BRIDGE is the integration bridge in dom0
96 96
         iniset "/$Q_PLUGIN_CONF_FILE.domU" ovs integration_bridge $XEN_INTEGRATION_BRIDGE
97 97
 
98
+        # Set OVS native interface for ovs-agent in compute node
99
+        XEN_DOM0_IP=$(echo "$XENAPI_CONNECTION_URL" | cut -d "/" -f 3)
100
+        iniset /$Q_PLUGIN_CONF_FILE ovs ovsdb_connection tcp:$XEN_DOM0_IP:6640
101
+        iniset /$Q_PLUGIN_CONF_FILE ovs of_listen_address $HOST_IP
102
+
98 103
         # Set up domU's L2 agent:
99 104
 
100 105
         # Create a bridge "br-$VLAN_INTERFACE"
... ...
@@ -93,6 +93,15 @@ CRONTAB
93 93
     if is_service_enabled neutron; then
94 94
         # Remove restriction on linux bridge in Dom0 when neutron is enabled
95 95
         $ssh_dom0 "rm -f /etc/modprobe.d/blacklist-bridge*"
96
+
97
+        count=`$ssh_dom0 "iptables -t filter -L XenServerDevstack |wc -l"`
98
+        if [ "$count" = "0" ]; then
99
+        {
100
+            echo "iptables -t filter --new XenServerDevstack"
101
+            echo "iptables -t filter -I INPUT -j XenServerDevstack"
102
+            echo "iptables -t filter -I XenServerDevstack -p tcp --dport 6640 -j ACCEPT"
103
+        } | $ssh_dom0
104
+        fi
96 105
     fi
97 106
 }
98 107