From 09dfaf22d3ee1867bb05ddbac00adccfeb24913f Mon Sep 17 00:00:00 2001 From: Michael Polenchuk Date: Fri, 6 Oct 2017 12:09:36 +0400 Subject: 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 (cherry picked from commit fca7d22742df82fc6e502b17ad45ebc11c0ba89b) --- mcp/config/states/opendaylight | 1 + .../0001-opendaylight-formula-neutron.patch | 42 +++++--- .../0001-Bring-in-opendaylight-support.patch | 17 +-- .../opendaylight/control.yml | 1 + .../opendaylight/control.yml | 1 + mcp/salt-formulas/opendaylight/files/jetty.xml | 114 +++++++++++++++------ mcp/salt-formulas/opendaylight/map.jinja | 4 +- mcp/salt-formulas/opendaylight/server.sls | 7 ++ 8 files changed, 127 insertions(+), 60 deletions(-) (limited to 'mcp') 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 = @@ -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 @@ - + @@ -31,41 +31,98 @@ DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> + + https + + + + 32768 + 8192 + 8192 + + + false + + false + 512 + + + + https + + + + 32768 + 8192 + 8192 + + + false + + false + 512 + + - + + + + + + + + + + + + + + + {{ server.odl_bind_ip }} - + - + - 300000 - 2 - false - 8543 - 20000 - 5000 + + + + jetty-default + - - - {{ server.odl_bind_ip }} - - - - - - 300000 - 2 - false - 8443 - 20000 - 5000 - - + + + + + + + + + + + + + + + + + {{ server.odl_bind_ip }} + + + + + + + + q + jetty-legacy + + @@ -77,7 +134,7 @@ DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> - + karaf karaf @@ -91,7 +148,7 @@ DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> - + default karaf @@ -103,5 +160,4 @@ DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> - 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: -- cgit 1.2.3-korg