From df50704b226a11f6ce9d0a46b178a5b8e8cd0284 Mon Sep 17 00:00:00 2001 From: Michael Polenchuk Date: Fri, 14 Jul 2017 11:11:32 +0400 Subject: Bring in opendaylight L3/router scenario Change-Id: I8a3be1764de136e2ecf81f964233483be5d6655a Signed-off-by: Michael Polenchuk --- .../0002-opendaylight-formula-neutron.patch | 64 ++++++++++++++++++++-- 1 file changed, 58 insertions(+), 6 deletions(-) (limited to 'mcp/patches/0002-opendaylight-formula-neutron.patch') diff --git a/mcp/patches/0002-opendaylight-formula-neutron.patch b/mcp/patches/0002-opendaylight-formula-neutron.patch index fa175e1fa..e52d315a5 100644 --- a/mcp/patches/0002-opendaylight-formula-neutron.patch +++ b/mcp/patches/0002-opendaylight-formula-neutron.patch @@ -4,6 +4,27 @@ Subject: [PATCH] Bring in opendaylight support Change-Id: Ie9073fafccba336f94b1996bd85c98d7a7f5060b +diff --git a/neutron/files/ocata/dhcp_agent.ini b/neutron/files/ocata/dhcp_agent.ini +index d327e64..ba5f933 100644 +--- a/neutron/files/ocata/dhcp_agent.ini ++++ b/neutron/files/ocata/dhcp_agent.ini +@@ -1,3 +1,8 @@ ++{%- if pillar.neutron.gateway is defined %} ++{%- from "neutron/map.jinja" import gateway as neutron with context %} ++{%- else %} ++{%- from "neutron/map.jinja" import compute as neutron with context %} ++{%- endif %} + [DEFAULT] + + # +@@ -48,6 +53,7 @@ enable_isolated_metadata = True + # this value will force the DHCP server to append specific host routes to the DHCP request. If this option is set, then the metadata service + # will be activated for all the networks. (boolean value) + #force_metadata = false ++{% if neutron.backend.get('router', 'False') %}force_metadata = True{% endif %} + + # Allows for serving metadata requests coming from a dedicated metadata access network whose CIDR is 169.254.169.254/16 (or larger prefix), + # and is connected to a Neutron router from which the VMs send metadata:1 request. In this case DHCP Option 121 will not be injected in VMs, diff --git a/neutron/files/ocata/ml2_conf.ini b/neutron/files/ocata/ml2_conf.ini index 0d48951..347eb15 100644 --- a/neutron/files/ocata/ml2_conf.ini @@ -21,10 +42,10 @@ index 0d48951..347eb15 100644 +password = {{ server.backend.password }} +{%- endif %} diff --git a/neutron/files/ocata/neutron-generic.conf.Debian b/neutron/files/ocata/neutron-generic.conf.Debian -index 5b7058d..bc438b9 100644 +index 0dde78f..05ac805 100644 --- a/neutron/files/ocata/neutron-generic.conf.Debian +++ b/neutron/files/ocata/neutron-generic.conf.Debian -@@ -33,7 +33,7 @@ state_path = /var/lib/neutron +@@ -33,11 +33,11 @@ state_path = /var/lib/neutron #auth_strategy = keystone auth_strategy = keystone @@ -33,6 +54,20 @@ index 5b7058d..bc438b9 100644 core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin +-service_plugins =neutron.services.l3_router.l3_router_plugin.L3RouterPlugin,neutron.services.metering.metering_plugin.MeteringPlugin ++service_plugins = {{ neutron.backend.get('router', 'router')}},metering + + {% endif %} + +@@ -2073,3 +2073,8 @@ heartbeat_rate = 2 + # Sets the list of available ciphers. value should be a string in the OpenSSL + # cipher list format. (string value) + #ciphers = ++ ++{%- if neutron.backend.engine == "opendaylight" %} ++[ovs] ++ovsdb_connection = {{ neutron.backend.ovsdb_connection }} ++{%- endif %} diff --git a/neutron/files/ocata/neutron-server b/neutron/files/ocata/neutron-server index 54f6ceb..1682ee0 100644 --- a/neutron/files/ocata/neutron-server @@ -47,10 +82,10 @@ index 54f6ceb..1682ee0 100644 {%- endif %} diff --git a/neutron/files/ocata/neutron-server.conf.Debian b/neutron/files/ocata/neutron-server.conf.Debian -index e320ca4..d6de235 100644 +index 229d342..ac8bdff 100644 --- a/neutron/files/ocata/neutron-server.conf.Debian +++ b/neutron/files/ocata/neutron-server.conf.Debian -@@ -39,7 +39,7 @@ api_extensions_path = extensions:/usr/lib/python2.7/dist-packages/neutron_plugin +@@ -39,11 +39,11 @@ api_extensions_path = extensions:/usr/lib/python2.7/dist-packages/neutron_plugin core_plugin = neutron_plugin_contrail.plugins.opencontrail.contrail_plugin.NeutronPluginContrailCoreV2 service_plugins = neutron_plugin_contrail.plugins.opencontrail.loadbalancer.v2.plugin.LoadBalancerPluginV2 @@ -59,7 +94,12 @@ index e320ca4..d6de235 100644 core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin -@@ -831,7 +831,7 @@ allow_headers = {{ server.cors.allow_headers }} +-service_plugins =neutron.services.l3_router.l3_router_plugin.L3RouterPlugin,neutron.services.metering.metering_plugin.MeteringPlugin ++service_plugins = {{ server.backend.get('router', 'router')}},metering + {%- if server.lbaas is defined -%},lbaasv2{%- endif -%} + {%- if server.get('qos', 'True') -%},neutron.services.qos.qos_plugin.QoSPlugin{%- endif -%} + {%- if server.get('vlan_aware_vms', False) -%},trunk{%- endif -%} +@@ -835,7 +835,7 @@ allow_headers = {{ server.cors.allow_headers }} # Deprecated group/name - [DEFAULT]/sql_connection # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection @@ -68,7 +108,7 @@ index e320ca4..d6de235 100644 connection = {{ server.database.engine }}+pymysql://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}?charset=utf8 {% else %} connection = sqlite:////var/lib/neutron/neutron.sqlite -@@ -2194,3 +2194,8 @@ service_provider = LOADBALANCERV2:Opencontrail:neutron_plugin_contrail.plugins.o +@@ -2198,3 +2198,8 @@ service_provider = LOADBALANCERV2:Opencontrail:neutron_plugin_contrail.plugins.o {% include "neutron/files/"+server.version+"/ContrailPlugin.ini" %} {% endif %} @@ -77,6 +117,18 @@ index e320ca4..d6de235 100644 +[ovs] +ovsdb_connection = {{ server.backend.ovsdb_connection }} +{%- endif %} +diff --git a/neutron/gateway.sls b/neutron/gateway.sls +index a6e6586..ab4bb85 100644 +--- a/neutron/gateway.sls ++++ b/neutron/gateway.sls +@@ -27,6 +27,7 @@ neutron_gateway_packages: + /etc/neutron/dhcp_agent.ini: + file.managed: + - source: salt://neutron/files/{{ gateway.version }}/dhcp_agent.ini ++ - template: jinja + - require: + - pkg: neutron_gateway_packages + diff --git a/neutron/server.sls b/neutron/server.sls index 0b3a6be..7a6bd23 100644 --- a/neutron/server.sls -- cgit 1.2.3-korg