summaryrefslogtreecommitdiffstats
path: root/mcp
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2017-10-06 12:09:36 +0400
committerMichael Polenchuk <mpolenchuk@mirantis.com>2017-10-06 17:40:00 +0400
commitfca7d22742df82fc6e502b17ad45ebc11c0ba89b (patch)
tree72f3bb86ece8110d4646d43c8fc7e48a96f62639 /mcp
parent2d95dee51177e66f5370b85115c2999925b13657 (diff)
Update opendaylight version to nitrogen
* use pseudo agentdb port binding controller instead of the deprecated network topology one * disable superfluous l2population mechanism driver * tidy up the duplicated haproxy neutron listen opts * straighten karaf features list * update jetty config Change-Id: Ifacf8de11eb56ab72df13a312151a510b280dea2 Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
Diffstat (limited to 'mcp')
-rwxr-xr-xmcp/config/states/opendaylight1
-rw-r--r--mcp/patches/0001-opendaylight-formula-neutron.patch42
-rw-r--r--mcp/patches/reclass-system-salt-model/0001-Bring-in-opendaylight-support.patch17
-rw-r--r--mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/opendaylight/control.yml1
-rw-r--r--mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/opendaylight/control.yml1
-rw-r--r--mcp/salt-formulas/opendaylight/files/jetty.xml114
-rw-r--r--mcp/salt-formulas/opendaylight/map.jinja4
-rw-r--r--mcp/salt-formulas/opendaylight/server.sls7
8 files changed, 127 insertions, 60 deletions
diff --git a/mcp/config/states/opendaylight b/mcp/config/states/opendaylight
index bee4c8586..e1ec1982f 100755
--- a/mcp/config/states/opendaylight
+++ b/mcp/config/states/opendaylight
@@ -3,4 +3,5 @@ set -x
salt -I 'opendaylight:server' state.sls opendaylight
salt -I 'opendaylight:client' state.sls opendaylight.client
+salt -I 'opendaylight:client' cmd.run 'neutron-odl-ovs-hostconfig --noovs_dpdk'
salt -I 'neutron:server' state.sls opendaylight.client
diff --git a/mcp/patches/0001-opendaylight-formula-neutron.patch b/mcp/patches/0001-opendaylight-formula-neutron.patch
index e52d315a5..7afbc30e5 100644
--- a/mcp/patches/0001-opendaylight-formula-neutron.patch
+++ b/mcp/patches/0001-opendaylight-formula-neutron.patch
@@ -26,23 +26,32 @@ index d327e64..ba5f933 100644
# 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
+index 5ecafe3..48cec1f 100644
--- a/neutron/files/ocata/ml2_conf.ini
+++ b/neutron/files/ocata/ml2_conf.ini
-@@ -269,3 +269,11 @@ enable_security_group = True
+@@ -131,7 +131,7 @@ tenant_network_types = {{ server.backend.tenant_network_types }}
+ # An ordered list of networking mechanism driver entrypoints to be loaded from
+ # the neutron.ml2.mechanism_drivers namespace. (list value)
+ #mechanism_drivers =
+-mechanism_drivers ={%- for backend_name, mechanism in server.backend.get('mechanism', {}).iteritems() %}{{ mechanism.driver }},{%- endfor %}l2population
++mechanism_drivers ={%- for backend_name, mechanism in server.backend.get('mechanism', {}).iteritems() %}{{ mechanism.driver }}{%- endfor %}{%- if server.backend.engine == "ml2" %},l2population{%- endif %}
+
+ # An ordered list of extension driver entrypoints to be loaded from the
+ # neutron.ml2.extension_drivers namespace. For example: extension_drivers =
+@@ -272,3 +272,11 @@ enable_security_group = True
# Use ipset to speed-up the iptables based security groups. Enabling ipset
# support requires that ipset is installed on L2 agent node. (boolean value)
#enable_ipset = true
+
+{%- if server.backend.engine == "opendaylight" %}
+[ml2_odl]
-+port_binding_controller = network-topology
++port_binding_controller = pseudo-agentdb-binding
+url = http://{{ server.backend.host }}:{{ server.backend.rest_api_port }}/controller/nb/v2/neutron
+username = {{ server.backend.user }}
+password = {{ server.backend.password }}
+{%- endif %}
diff --git a/neutron/files/ocata/neutron-generic.conf.Debian b/neutron/files/ocata/neutron-generic.conf.Debian
-index 0dde78f..05ac805 100644
+index 123386d..eeaa3f4 100644
--- a/neutron/files/ocata/neutron-generic.conf.Debian
+++ b/neutron/files/ocata/neutron-generic.conf.Debian
@@ -33,11 +33,11 @@ state_path = /var/lib/neutron
@@ -59,7 +68,7 @@ index 0dde78f..05ac805 100644
{% endif %}
-@@ -2073,3 +2073,8 @@ heartbeat_rate = 2
+@@ -2092,3 +2092,8 @@ heartbeat_rate = 2
# Sets the list of available ciphers. value should be a string in the OpenSSL
# cipher list format. (string value)
#ciphers = <None>
@@ -72,7 +81,7 @@ diff --git a/neutron/files/ocata/neutron-server b/neutron/files/ocata/neutron-se
index 54f6ceb..1682ee0 100644
--- a/neutron/files/ocata/neutron-server
+++ b/neutron/files/ocata/neutron-server
-@@ -7,7 +7,7 @@
+@@ -7,10 +7,10 @@
# neutron.conf
#NEUTRON_PLUGIN_CONFIG="/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini"
@@ -81,8 +90,13 @@ index 54f6ceb..1682ee0 100644
NEUTRON_PLUGIN_CONFIG="/etc/neutron/plugins/ml2/ml2_conf.ini"
{%- endif %}
+ {%- if server.backend.engine == "contrail" %}
+ NEUTRON_PLUGIN_CONFIG="/etc/neutron/plugins/opencontrail/ContrailPlugin.ini"
+-{%- endif %}
+\ No newline at end of file
++{%- endif %}
diff --git a/neutron/files/ocata/neutron-server.conf.Debian b/neutron/files/ocata/neutron-server.conf.Debian
-index 229d342..ac8bdff 100644
+index 049544b..4e68567 100644
--- a/neutron/files/ocata/neutron-server.conf.Debian
+++ b/neutron/files/ocata/neutron-server.conf.Debian
@@ -39,11 +39,11 @@ api_extensions_path = extensions:/usr/lib/python2.7/dist-packages/neutron_plugin
@@ -97,9 +111,9 @@ index 229d342..ac8bdff 100644
-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 fwaas.get('enabled', False) -%},{{ fwaas[fwaas.api_version]['service_plugin'] }}{%- 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 }}
+@@ -838,7 +838,7 @@ allow_headers = {{ server.cors.allow_headers }}
# Deprecated group/name - [DEFAULT]/sql_connection
# Deprecated group/name - [DATABASE]/sql_connection
# Deprecated group/name - [sql]/connection
@@ -108,7 +122,7 @@ index 229d342..ac8bdff 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
-@@ -2198,3 +2198,8 @@ service_provider = LOADBALANCERV2:Opencontrail:neutron_plugin_contrail.plugins.o
+@@ -2217,3 +2217,8 @@ service_provider = LOADBALANCERV2:Opencontrail:neutron_plugin_contrail.plugins.o
{% include "neutron/files/"+server.version+"/ContrailPlugin.ini" %}
{% endif %}
@@ -118,10 +132,10 @@ index 229d342..ac8bdff 100644
+ovsdb_connection = {{ server.backend.ovsdb_connection }}
+{%- endif %}
diff --git a/neutron/gateway.sls b/neutron/gateway.sls
-index a6e6586..ab4bb85 100644
+index 96d7e9f..65386b4 100644
--- a/neutron/gateway.sls
+++ b/neutron/gateway.sls
-@@ -27,6 +27,7 @@ neutron_gateway_packages:
+@@ -32,6 +32,7 @@ neutron_gateway_packages:
/etc/neutron/dhcp_agent.ini:
file.managed:
- source: salt://neutron/files/{{ gateway.version }}/dhcp_agent.ini
@@ -130,10 +144,10 @@ index a6e6586..ab4bb85 100644
- pkg: neutron_gateway_packages
diff --git a/neutron/server.sls b/neutron/server.sls
-index 0b3a6be..7a6bd23 100644
+index eff9fb8..cb9d622 100644
--- a/neutron/server.sls
+++ b/neutron/server.sls
-@@ -64,7 +64,7 @@ neutron_server_service:
+@@ -72,7 +72,7 @@ neutron_server_service:
{%- endif %}
diff --git a/mcp/patches/reclass-system-salt-model/0001-Bring-in-opendaylight-support.patch b/mcp/patches/reclass-system-salt-model/0001-Bring-in-opendaylight-support.patch
index adf07eb81..353854c1b 100644
--- a/mcp/patches/reclass-system-salt-model/0001-Bring-in-opendaylight-support.patch
+++ b/mcp/patches/reclass-system-salt-model/0001-Bring-in-opendaylight-support.patch
@@ -3,30 +3,17 @@ Date: Thu, 29 Jun 2017 12:22:42 +0400
Subject: [PATCH] Bring in opendaylight support
Change-Id: I3efec9a8b586a6c75b1c1635ad2a7024d73d9ad2
----
- neutron/control/opendaylight/cluster.yml | 19 +++++++++++++++++++
- neutron/control/opendaylight/single.yml | 16 ++++++++++++++++
- neutron/gateway/opendaylight/single.yml | 8 ++++++++
- opendaylight/server/single.yml | 2 ++
- .../storage/system/opendaylight_control_single.yml | 13 +++++++++++++
- 5 files changed, 58 insertions(+)
- create mode 100644 neutron/control/opendaylight/cluster.yml
- create mode 100644 neutron/control/opendaylight/single.yml
- create mode 100644 neutron/gateway/opendaylight/single.yml
- create mode 100644 opendaylight/server/single.yml
- create mode 100644 reclass/storage/system/opendaylight_control_single.yml
diff --git a/neutron/control/opendaylight/cluster.yml b/neutron/control/opendaylight/cluster.yml
new file mode 100644
-index 0000000..4133650
+index 0000000..81dd5f9
--- /dev/null
+++ b/neutron/control/opendaylight/cluster.yml
-@@ -0,0 +1,19 @@
+@@ -0,0 +1,18 @@
+classes:
+- service.keepalived.cluster.single
+- service.haproxy.proxy.single
+- service.neutron.control.cluster
-+- system.haproxy.proxy.listen.openstack.neutron
+- system.neutron.control.openvswitch.cluster
+parameters:
+ neutron:
diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/opendaylight/control.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/opendaylight/control.yml
index ce1bdfdb5..ec25ad1d9 100644
--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/opendaylight/control.yml
+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/opendaylight/control.yml
@@ -28,5 +28,6 @@ parameters:
- odl-restconf-all
- odl-aaa-authn
- odl-dlux-all
+ - odl-mdsal-apidocs
netvirt:
- odl-netvirt-openstack
diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/opendaylight/control.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/opendaylight/control.yml
index cd4e3d619..1c659fa73 100644
--- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/opendaylight/control.yml
+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/opendaylight/control.yml
@@ -29,5 +29,6 @@ parameters:
- odl-restconf-all
- odl-aaa-authn
- odl-dlux-all
+ - odl-mdsal-apidocs
netvirt:
- odl-netvirt-openstack
diff --git a/mcp/salt-formulas/opendaylight/files/jetty.xml b/mcp/salt-formulas/opendaylight/files/jetty.xml
index 062568c54..e6371883a 100644
--- a/mcp/salt-formulas/opendaylight/files/jetty.xml
+++ b/mcp/salt-formulas/opendaylight/files/jetty.xml
@@ -21,7 +21,7 @@
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//
DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
-<Configure class="org.eclipse.jetty.server.Server">
+<Configure id="Server" class="org.eclipse.jetty.server.Server">
<!-- =========================================================== -->
<!-- Set connectors -->
@@ -31,41 +31,98 @@ DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<!-- Use this connector for many frequently idle connections and for
threadless continuations. -->
+ <New id="http-default" class="org.eclipse.jetty.server.HttpConfiguration">
+ <Set name="secureScheme">https</Set>
+ <Set name="securePort">
+ <Property name="jetty.secure.port" default="8543" />
+ </Set>
+ <Set name="outputBufferSize">32768</Set>
+ <Set name="requestHeaderSize">8192</Set>
+ <Set name="responseHeaderSize">8192</Set>
+
+ <!-- Default security setting: do not leak our version -->
+ <Set name="sendServerVersion">false</Set>
+
+ <Set name="sendDateHeader">false</Set>
+ <Set name="headerCacheSize">512</Set>
+ </New>
+
+ <New id="http-legacy" class="org.eclipse.jetty.server.HttpConfiguration">
+ <Set name="secureScheme">https</Set>
+ <Set name="securePort">
+ <Property name="jetty.secure.port" default="8443" />
+ </Set>
+ <Set name="outputBufferSize">32768</Set>
+ <Set name="requestHeaderSize">8192</Set>
+ <Set name="responseHeaderSize">8192</Set>
+
+ <!-- Default security setting: do not leak our version -->
+ <Set name="sendServerVersion">false</Set>
+
+ <Set name="sendDateHeader">false</Set>
+ <Set name="headerCacheSize">512</Set>
+ </New>
+
<Call name="addConnector">
<Arg>
- <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
+ <New class="org.eclipse.jetty.server.ServerConnector">
+ <Arg name="server">
+ <Ref refid="Server" />
+ </Arg>
+ <Arg name="factories">
+ <Array type="org.eclipse.jetty.server.ConnectionFactory">
+ <Item>
+ <New class="org.eclipse.jetty.server.HttpConnectionFactory">
+ <Arg name="config">
+ <Ref refid="http-default"/>
+ </Arg>
+ </New>
+ </Item>
+ </Array>
+ </Arg>
<Set name="host">{{ server.odl_bind_ip }}
- <Property name="jetty.host" />
+ <Property name="jetty.host"/>
</Set>
<Set name="port">
- <Property name="jetty.port" default="8181" />
+ <Property name="jetty.port" default="8181"/>
</Set>
- <Set name="maxIdleTime">300000</Set>
- <Set name="Acceptors">2</Set>
- <Set name="statsOn">false</Set>
- <Set name="confidentialPort">8543</Set>
- <Set name="lowResourcesConnections">20000</Set>
- <Set name="lowResourcesMaxIdleTime">5000</Set>
+ <Set name="idleTimeout">
+ <Property name="http.timeout" default="300000"/>
+ </Set>
+ <Set name="name">jetty-default</Set>
</New>
</Arg>
</Call>
+
<Call name="addConnector">
- <Arg>
- <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
- <Set name="host">{{ server.odl_bind_ip }}
- <Property name="jetty.host" />
- </Set>
- <Set name="port">
- <Property name="jetty.port" default="{{ server.odl_rest_port }}" />
- </Set>
- <Set name="maxIdleTime">300000</Set>
- <Set name="Acceptors">2</Set>
- <Set name="statsOn">false</Set>
- <Set name="confidentialPort">8443</Set>
- <Set name="lowResourcesConnections">20000</Set>
- <Set name="lowResourcesMaxIdleTime">5000</Set>
- </New>
- </Arg>
+ <Arg>
+ <New class="org.eclipse.jetty.server.ServerConnector">
+ <Arg name="server">
+ <Ref refid="Server" />
+ </Arg>
+ <Arg name="factories">
+ <Array type="org.eclipse.jetty.server.ConnectionFactory">
+ <Item>
+ <New class="org.eclipse.jetty.server.HttpConnectionFactory">
+ <Arg name="config">
+ <Ref refid="http-legacy" />
+ </Arg>
+ </New>
+ </Item>
+ </Array>
+ </Arg>
+ <Set name="host">{{ server.odl_bind_ip }}
+ <Property name="jetty.host"/>
+ </Set>
+ <Set name="port">
+ <Property name="jetty.port" default="{{ server.odl_rest_port }}"/>
+ </Set>
+ <Set name="idleTimeout">
+ <Property name="http.timeout" default="300000"/>
+ </Set>q
+ <Set name="name">jetty-legacy</Set>
+ </New>
+ </Arg>
</Call>
<!-- =========================================================== -->
@@ -77,7 +134,7 @@ DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<!-- =========================================================== -->
<Call name="addBean">
<Arg>
- <New class="org.eclipse.jetty.plus.jaas.JAASLoginService">
+ <New class="org.eclipse.jetty.jaas.JAASLoginService">
<Set name="name">karaf</Set>
<Set name="loginModuleName">karaf</Set>
<Set name="roleClassNames">
@@ -91,7 +148,7 @@ DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
</Call>
<Call name="addBean">
<Arg>
- <New class="org.eclipse.jetty.plus.jaas.JAASLoginService">
+ <New class="org.eclipse.jetty.jaas.JAASLoginService">
<Set name="name">default</Set>
<Set name="loginModuleName">karaf</Set>
<Set name="roleClassNames">
@@ -103,5 +160,4 @@ DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
</New>
</Arg>
</Call>
-
</Configure>
diff --git a/mcp/salt-formulas/opendaylight/map.jinja b/mcp/salt-formulas/opendaylight/map.jinja
index 0f6bf3c7e..755f878e2 100644
--- a/mcp/salt-formulas/opendaylight/map.jinja
+++ b/mcp/salt-formulas/opendaylight/map.jinja
@@ -1,10 +1,10 @@
{% set server = salt['grains.filter_by']({
'Debian': {
- 'karaf_features': {'default': ['config', 'standard', 'region', 'package', 'kar', 'ssh', 'management']},
+ 'karaf_features': {'default': ['standard', 'wrap', 'ssh']},
'odl_rest_port': '8282',
'odl_bind_ip': '0.0.0.0',
- 'repo': 'odl-team/carbon',
+ 'repo': 'odl-team/nitrogen',
'log_levels': {},
'enable_ha': false,
'ha_node_ips': [],
diff --git a/mcp/salt-formulas/opendaylight/server.sls b/mcp/salt-formulas/opendaylight/server.sls
index 8c6c3b28a..f7a97417e 100644
--- a/mcp/salt-formulas/opendaylight/server.sls
+++ b/mcp/salt-formulas/opendaylight/server.sls
@@ -14,12 +14,14 @@ opendaylight:
- file: /opt/opendaylight/etc/jetty.xml
- file: /opt/opendaylight/bin/setenv
- ini: /opt/opendaylight/etc/org.apache.karaf.features.cfg
+ - ini: /opt/opendaylight/etc/org.ops4j.pax.web.cfg
service.running:
- enable: true
- watch:
- file: /opt/opendaylight/etc/jetty.xml
- file: /opt/opendaylight/bin/setenv
- ini: /opt/opendaylight/etc/org.apache.karaf.features.cfg
+ - ini: /opt/opendaylight/etc/org.ops4j.pax.web.cfg
/opt/opendaylight/etc/jetty.xml:
file.managed:
@@ -46,6 +48,11 @@ opendaylight:
- sections:
featuresBoot: {{ features }}
+/opt/opendaylight/etc/org.ops4j.pax.web.cfg:
+ ini.options_present:
+ - sections:
+ org.ops4j.pax.web.listening.addresses: {{ server.odl_bind_ip }}
+
{%- if server.get('router_enabled', false) %}
/opt/opendaylight/etc/custom.properties:
ini.options_present: