aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/patches/salt-formula-neutron
diff options
context:
space:
mode:
Diffstat (limited to 'mcp/patches/salt-formula-neutron')
-rw-r--r--mcp/patches/salt-formula-neutron/0001-Bring-in-basic-VPP-support.patch195
-rw-r--r--mcp/patches/salt-formula-neutron/0002-Align-packages-with-stein-reqs.patch114
2 files changed, 309 insertions, 0 deletions
diff --git a/mcp/patches/salt-formula-neutron/0001-Bring-in-basic-VPP-support.patch b/mcp/patches/salt-formula-neutron/0001-Bring-in-basic-VPP-support.patch
new file mode 100644
index 000000000..d790ede3d
--- /dev/null
+++ b/mcp/patches/salt-formula-neutron/0001-Bring-in-basic-VPP-support.patch
@@ -0,0 +1,195 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2019 Mirantis Inc., Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Thu, 6 Dec 2018 18:25:42 +0100
+Subject: [PATCH] Bring in basic VPP support
+
+TODO:
+- update README
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+
+diff --git a/neutron/agents/_vpp.sls b/neutron/agents/_vpp.sls
+new file mode 100644
+index 0000000..c1845d0
+--- /dev/null
++++ b/neutron/agents/_vpp.sls
+@@ -0,0 +1,25 @@
++{%- 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 %}
++
++{%- if 'vpp' in neutron.get('backend', {}).get('mechanism', []) %}
++
++/etc/neutron/plugins/ml2/ml2_conf.ini:
++ file.managed:
++ - source: salt://neutron/files/{{ neutron.version }}/_ml2_conf.vpp.ini
++ - mode: 0640
++ - user: root
++ - group: neutron
++ - template: jinja
++
++vpp:
++ service.running:
++ - enable: True
++
++vpp-agent:
++ service.running:
++ - enable: True
++
++{%- endif %}
+diff --git a/neutron/compute.sls b/neutron/compute.sls
+index 708a51d..3767011 100644
+--- a/neutron/compute.sls
++++ b/neutron/compute.sls
+@@ -111,7 +111,9 @@ neutron_metadata_agent:
+ {%- if compute.opendaylight is defined %}
+ {%- include "neutron/opendaylight/client.sls" %}
+ {%- else %}
++ {#- We can reuse this for ml2_vpp and ignore openvswitch_agent.ini #}
+ {%- include "neutron/ml2_ovs/init.sls" %}
++ {%- include "neutron/agents/_vpp.sls" %}
+ {%- endif %}
+
+ {%- elif compute.backend.engine == "ovn" %}
+diff --git a/neutron/files/rocky/_ml2_conf.vpp.ini b/neutron/files/rocky/_ml2_conf.vpp.ini
+new file mode 100644
+index 0000000..2373f64
+--- /dev/null
++++ b/neutron/files/rocky/_ml2_conf.vpp.ini
+@@ -0,0 +1,41 @@
++{%- if pillar.neutron.server is defined %}
++{%- from "neutron/map.jinja" import server as neutron with context %}
++{%- elif 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 %}
++
++{%- if 'vpp' in neutron.get('backend', {}).get('mechanism', []) %}
++
++{%- set physnets_vpp = [] %}
++{%- set mechanism_vpp = neutron.backend.mechanism.vpp %}
++{%- for physnet, params in neutron.backend.get('physnets', {}).iteritems() %}
++{%- if params.get('vpp_interface', False) %}
++{%- do physnets_vpp.append([physnet, params.get('vpp_interface')]|join(":")) %}
++{%- endif %}
++{%- endfor %}
++{%- if not physnets_vpp %}
++{%- do physnets_vpp.append('physnet1:tap-0') %}
++{%- endif %}
++
++{%- if pillar.neutron.server is not defined %}
++[ml2]
++type_drivers = flat,vlan
++{%- endif %}
++
++[ml2_vpp]
++jwt_signing = False
++etcd_insecure_explicit_disable_https = True
++l3_hosts = {{ mechanism_vpp.get('l3_hosts', '127.0.0.1') }}
++enable_l3_ha = False
++gpe_locators =
++gpe_src_cidr =
++enable_vpp_restart = False
++etcd_pass = {{ mechanism_vpp.get('etcd_pass', '') }}
++etcd_user = {{ mechanism_vpp.get('etcd_user', '') }}
++etcd_port = {{ mechanism_vpp.get('etcd_port', 2379) }}
++etcd_host = {{ mechanism_vpp.get('etcd_host', '127.0.0.1') }}
++physnets = {{ ','.join(physnets_vpp) }}
++
++{%- endif %}
+diff --git a/neutron/files/rocky/ml2_conf.ini b/neutron/files/rocky/ml2_conf.ini
+index a9a598f..4429c80 100644
+--- a/neutron/files/rocky/ml2_conf.ini
++++ b/neutron/files/rocky/ml2_conf.ini
+@@ -27,6 +27,9 @@ agent_boot_time = {{ server.get('agent_boot_time', 180) }}
+ # List of network type driver entrypoints to be loaded from the
+ # neutron.ml2.type_drivers namespace. (list value)
+ #type_drivers = local,flat,vlan,gre,vxlan,geneve
++{%- if 'vpp' in server.backend.get('mechanism', []) %}
++type_drivers = flat,vlan
++{%- endif %}
+
+ # Ordered list of network_types to allocate as tenant networks. The default
+ # value 'local' is useful for single-box testing but provides no connectivity
+@@ -239,6 +242,7 @@ neutron_sync_mode = {{ _ovn.neutron_sync_mode|default('repair') }}
+ enable_distributed_floating_ip = {{ server.dvr|default('false') }}
+ {%- endif %}
+
++{%- include "neutron/files/rocky/_ml2_conf.vpp.ini" %}
+
+ {%- if server.backend.opendaylight|default(False) %}
+ [ml2_odl]
+diff --git a/neutron/gateway.sls b/neutron/gateway.sls
+index e51990a..95d4d07 100644
+--- a/neutron/gateway.sls
++++ b/neutron/gateway.sls
+@@ -40,6 +40,8 @@ haproxy:
+
+ {%- endif %}
+
++{%- include "neutron/agents/_vpp.sls" %}
++
+ {%- if gateway.l2gw is defined %}
+ {%- include "neutron/agents/_l2gw.sls" %}
+ {%- endif %}
+diff --git a/neutron/map.jinja b/neutron/map.jinja
+index 9e6cb36..17cd5b3 100644
+--- a/neutron/map.jinja
++++ b/neutron/map.jinja
+@@ -14,9 +14,13 @@
+ {%- do compute_pkgs_ovn.extend(['neutron-common', 'python-networking-ovn', 'haproxy']) %}
+ {%- endif %}
+ {%- set linuxbridge_enabled = pillar.neutron.compute is defined and pillar.neutron.compute.get('backend', {}).get('mechanism', {}).get('lb', {}).get('driver', {}) == "linuxbridge" %}
++{%- set vpp_enabled = 'vpp' in pillar.neutron.get('compute', {}).get('backend', {}).get('mechanism', []) %}
+ {%- if linuxbridge_enabled %}
+ {%- set pkgs_cmp = ['neutron-linuxbridge-agent'] %}
+ {%- set services_cmp = ['neutron-linuxbridge-agent'] %}
++{%- elif vpp_enabled %}
++{%- set pkgs_cmp = ['vpp-agent'] %}
++{%- set services_cmp = ['vpp-agent'] %}
+ {%- else %}
+ {%- set pkgs_cmp = ['neutron-openvswitch-agent', 'python-pycadf'] %}
+ {%- set services_cmp = ['neutron-openvswitch-agent'] %}
+@@ -73,6 +77,7 @@
+ {%- set opendaylight_enabled = pillar.neutron.gateway is defined and pillar.neutron.gateway.opendaylight is defined %}
+ {%- set linuxbridge_enabled = pillar.neutron.gateway is defined and pillar.neutron.gateway.get('backend', {}).get('mechanism', {}).get('lb', {}).get('driver', {}) == "linuxbridge" %}
+ {%- set dhcp_enabled = pillar.neutron.gateway is defined and pillar.neutron.gateway.get('dhcp_agent_enabled', True) %}
++{%- set vpp_enabled = 'vpp' in pillar.neutron.get('gateway', {}).get('backend', {}).get('mechanism', []) %}
+ {%- set pkgs_list = ['neutron-metadata-agent'] %}
+
+ {%- set services_list = ['neutron-metadata-agent'] %}
+@@ -83,6 +88,13 @@
+ {%- if linuxbridge_enabled %}
+ {%- do pkgs_list.extend(['neutron-linuxbridge-agent', 'neutron-l3-agent']) %}
+ {%- do services_list.extend(['neutron-linuxbridge-agent', 'neutron-l3-agent']) %}
++{%- elif vpp_enabled %}
++{%- do pkgs_list.extend(['vpp-agent']) %}
++{%- do services_list.extend(['vpp-agent']) %}
++{%- if 'vpp-router' not in pillar.neutron.gateway.backend.get('router', '') %}
++{%- do pkgs_list.extend(['neutron-l3-agent']) %}
++{%- do services_list.extend(['neutron-l3-agent']) %}
++{%- endif %}
+ {%- elif not opendaylight_enabled %}
+ {%- do pkgs_list.extend(['neutron-openvswitch-agent', 'neutron-l3-agent']) %}
+ {%- do services_list.extend(['neutron-openvswitch-agent', 'neutron-l3-agent']) %}
+@@ -132,6 +144,10 @@
+ {%- set server_services_list = ['neutron-server'] %}
+ {%- do server_services_list.append('neutron-rpc-server') if wsgi_enabled %}
+
++{%- if 'vpp' in pillar.neutron.get('server', {}).get('backend', {}).get('mechanism', []) %}
++{%- do server_pkgs_list.extend(['python3-networking-vpp']) %}
++{%- endif %}
++
+ {% set server = salt['grains.filter_by']({
+ 'BaseDefaults': default_params,
+ 'Debian': {
diff --git a/mcp/patches/salt-formula-neutron/0002-Align-packages-with-stein-reqs.patch b/mcp/patches/salt-formula-neutron/0002-Align-packages-with-stein-reqs.patch
new file mode 100644
index 000000000..6dcd91a3c
--- /dev/null
+++ b/mcp/patches/salt-formula-neutron/0002-Align-packages-with-stein-reqs.patch
@@ -0,0 +1,114 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2019 Mirantis Inc., Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: Michael Polenchuk <mpolenchuk@mirantis.com>
+Date: Thu, 11 Jul 2019 11:52:53 +0400
+Subject: [PATCH] Align packages with stein reqs
+
+diff --git a/neutron/map.jinja b/neutron/map.jinja
+index 17cd5b3..ed1831a 100644
+--- a/neutron/map.jinja
++++ b/neutron/map.jinja
+@@ -11,7 +11,7 @@
+ {%- if os_family == "Debian" %}
+ {%- set compute_pkgs_ovn = ['ovn-common', 'ovn-host'] %}
+ {%- if pillar.neutron.compute is defined and pillar.neutron.compute.metadata is defined %}
+-{%- do compute_pkgs_ovn.extend(['neutron-common', 'python-networking-ovn', 'haproxy']) %}
++{%- do compute_pkgs_ovn.extend(['neutron-common', 'python3-networking-ovn', 'haproxy']) %}
+ {%- endif %}
+ {%- set linuxbridge_enabled = pillar.neutron.compute is defined and pillar.neutron.compute.get('backend', {}).get('mechanism', {}).get('lb', {}).get('driver', {}) == "linuxbridge" %}
+ {%- set vpp_enabled = 'vpp' in pillar.neutron.get('compute', {}).get('backend', {}).get('mechanism', []) %}
+@@ -22,7 +22,7 @@
+ {%- set pkgs_cmp = ['vpp-agent'] %}
+ {%- set services_cmp = ['vpp-agent'] %}
+ {%- else %}
+-{%- set pkgs_cmp = ['neutron-openvswitch-agent', 'python-pycadf'] %}
++{%- set pkgs_cmp = ['neutron-openvswitch-agent'] %}
+ {%- set services_cmp = ['neutron-openvswitch-agent'] %}
+ {%- endif %}
+ {%- endif %}
+@@ -33,7 +33,7 @@
+ 'Debian': {
+ 'pkgs': pkgs_cmp,
+ 'pkgs_ovn': compute_pkgs_ovn,
+- 'pkgs_bagpipe': ['python-networking-bagpipe'],
++ 'pkgs_bagpipe': ['python3-networking-bagpipe'],
+ 'services': services_cmp,
+ 'services_ovn': ['ovn-host'],
+ 'dpdk': false,
+@@ -138,9 +138,9 @@
+
+ {%- set sfc_enabled = pillar.neutron.get('server', {}).get('sfc', {}).get('enabled', False) %}
+ {%- set wsgi_enabled = pillar.neutron.get('server', {}).get('wsgi', {}).get('enabled', False) %}
+-{%- set server_pkgs_list = ['python-neutron-lbaas'] %}
++{%- set server_pkgs_list = [] %}
+ {%- do server_pkgs_list.append('uwsgi-plugin-python' if wsgi_enabled else 'neutron-server') %}
+-{%- do server_pkgs_list.append('python-networking-sfc') if sfc_enabled %}
++{%- do server_pkgs_list.append('python3-networking-sfc') if sfc_enabled %}
+ {%- set server_services_list = ['neutron-server'] %}
+ {%- do server_services_list.append('neutron-rpc-server') if wsgi_enabled %}
+
+@@ -152,11 +152,11 @@
+ 'BaseDefaults': default_params,
+ 'Debian': {
+ 'pkgs': server_pkgs_list,
+- 'pkgs_ovn': ['python-networking-ovn', 'ovn-common', 'ovn-central'],
++ 'pkgs_ovn': ['python3-networking-ovn', 'ovn-common', 'ovn-central'],
+ 'pkgs_ml2': ['neutron-plugin-ml2'],
+- 'pkgs_l2gw': ['python-networking-l2gw'],
+- 'pkgs_bgpvpn': ['python-networking-bgpvpn'],
+- 'pkgs_bagpipe': ['python-networking-bagpipe'],
++ 'pkgs_l2gw': ['python3-networking-l2gw'],
++ 'pkgs_bgpvpn': ['python3-networking-bgpvpn'],
++ 'pkgs_bagpipe': ['python3-networking-bagpipe'],
+ 'services': server_services_list,
+ 'services_ovn': ['openvswitch-switch', 'ovn-central'],
+ 'notification': {},
+@@ -204,7 +204,7 @@
+
+ {% set client = salt['grains.filter_by']({
+ 'Debian': {
+- 'pkgs': ['python-neutronclient'],
++ 'pkgs': ['python3-neutronclient'],
+ 'enabled': false
+ },
+ 'RedHat': {
+diff --git a/neutron/opendaylight/client.sls b/neutron/opendaylight/client.sls
+index fb5829f..be9aff6 100644
+--- a/neutron/opendaylight/client.sls
++++ b/neutron/opendaylight/client.sls
+@@ -4,7 +4,7 @@
+ {%- from "neutron/map.jinja" import compute as neutron with context %}
+ {%- endif %}
+
+-python-networking-odl:
++python3-networking-odl:
+ pkg.installed
+
+ {%- if not grains.get('noservices', False) %}
+@@ -31,6 +31,6 @@ neutron_odl_ovs_hostconfig:
+ cmd.run:
+ - name: 'neutron-odl-ovs-hostconfig {{ ovs_hostconfig|join(' ') }}'
+ - require:
+- - pkg: python-networking-odl
++ - pkg: python3-networking-odl
+
+ {%- endif %}
+diff --git a/neutron/server.sls b/neutron/server.sls
+index 99bbdef..692e0ce 100644
+--- a/neutron/server.sls
++++ b/neutron/server.sls
+@@ -115,7 +115,7 @@ ml2_plugin_link:
+ {%- endif %}
+
+ {%- if server.backend.get('opendaylight', False) %}
+-python-networking-odl:
++python3-networking-odl:
+ pkg.installed:
+ - require_in:
+ - pkg: neutron_server_packages