Browse code

Support "geneve" ML2 plugin type driver

Add support for the "geneve" ML2 plugin type driver. The
networking-ovn ML2 mechanism driver uses geneve for its
project network type. Geneve is part of core neutron but
didn't have any DevStack configuration for it. This patch
set adds the necessary options. It also removes the default
for ML2 type drivers to rely on the neutron default and
consolidates the tunnel ranges default for gre, vxlan and
geneve by using TENANT_TUNNEL_RANGES.

Change-Id: Id75651dfe57a07045a6932a0369668f33c7eef09
Partial-Bug: #1588966

Richard Theis authored on 2016/06/09 00:28:37
Showing 2 changed files
... ...
@@ -179,9 +179,9 @@ fi
179 179
 # GRE tunnels are only supported by the openvswitch.
180 180
 ENABLE_TENANT_TUNNELS=${ENABLE_TENANT_TUNNELS:-True}
181 181
 
182
-# If using GRE tunnels for tenant networks, specify the range of
183
-# tunnel IDs from which tenant networks are allocated. Can be
184
-# overridden in ``localrc`` in necessary.
182
+# If using GRE, VXLAN or GENEVE tunnels for tenant networks,
183
+# specify the range of IDs from which tenant networks are
184
+# allocated. Can be overridden in ``localrc`` if necessary.
185 185
 TENANT_TUNNEL_RANGES=${TENANT_TUNNEL_RANGES:-1:1000}
186 186
 
187 187
 # To use VLANs for tenant networks, set to True in localrc. VLANs
... ...
@@ -25,14 +25,14 @@ fi
25 25
 
26 26
 # List of MechanismDrivers to load
27 27
 Q_ML2_PLUGIN_MECHANISM_DRIVERS=${Q_ML2_PLUGIN_MECHANISM_DRIVERS:-openvswitch,linuxbridge}
28
-# List of Type Drivers to load
29
-Q_ML2_PLUGIN_TYPE_DRIVERS=${Q_ML2_PLUGIN_TYPE_DRIVERS:-local,flat,vlan,gre,vxlan}
30 28
 # Default GRE TypeDriver options
31 29
 Q_ML2_PLUGIN_GRE_TYPE_OPTIONS=${Q_ML2_PLUGIN_GRE_TYPE_OPTIONS:-tunnel_id_ranges=$TENANT_TUNNEL_RANGES}
32 30
 # Default VXLAN TypeDriver options
33
-Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS=${Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS:-vni_ranges=1001:2000}
31
+Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS=${Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS:-vni_ranges=$TENANT_TUNNEL_RANGES}
34 32
 # Default VLAN TypeDriver options
35 33
 Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS=${Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS:-}
34
+# Default GENEVE TypeDriver options
35
+Q_ML2_PLUGIN_GENEVE_TYPE_OPTIONS=${Q_ML2_PLUGIN_GENEVE_TYPE_OPTIONS:-vni_ranges=$TENANT_TUNNEL_RANGES}
36 36
 # List of extension drivers to load, use '-' instead of ':-' to allow people to
37 37
 # explicitly override this to blank
38 38
 Q_ML2_PLUGIN_EXT_DRIVERS=${Q_ML2_PLUGIN_EXT_DRIVERS-port_security}
... ...
@@ -111,7 +111,9 @@ function neutron_plugin_configure_service {
111 111
 
112 112
     populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2 mechanism_drivers=$Q_ML2_PLUGIN_MECHANISM_DRIVERS
113 113
 
114
-    populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2 type_drivers=$Q_ML2_PLUGIN_TYPE_DRIVERS
114
+    if [[ -n "$Q_ML2_PLUGIN_TYPE_DRIVERS" ]]; then
115
+        populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2 type_drivers=$Q_ML2_PLUGIN_TYPE_DRIVERS
116
+    fi
115 117
 
116 118
     populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2 extension_drivers=$Q_ML2_PLUGIN_EXT_DRIVERS
117 119
 
... ...
@@ -125,6 +127,8 @@ function neutron_plugin_configure_service {
125 125
 
126 126
     populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_type_vlan $Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS
127 127
 
128
+    populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_type_geneve $Q_ML2_PLUGIN_GENEVE_TYPE_OPTIONS
129
+
128 130
     if [[ "$Q_DVR_MODE" != "legacy" ]]; then
129 131
         populate_ml2_config /$Q_PLUGIN_CONF_FILE agent l2_population=True
130 132
         populate_ml2_config /$Q_PLUGIN_CONF_FILE agent tunnel_types=vxlan