aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2018-03-28 13:50:33 +0400
committerMichael Polenchuk <mpolenchuk@mirantis.com>2018-03-28 15:50:31 +0400
commit3b338ea9f19052eb4cf3dc70d9d49d03cb602ef2 (patch)
tree435b886a1da4acb544513676f93bd137b8bf9096
parent10a36807bc6ec0db532a93f6dbb2b42ec1c47617 (diff)
[odl] Setup manager target after ovs host config
Change-Id: Ia517b7cf1723a5afaf43cb0709716f3a67a29e9f Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
-rw-r--r--mcp/config/scenario/os-odl-nofeature-ha.yaml.j22
-rw-r--r--mcp/config/scenario/os-odl-nofeature-noha.yaml4
-rwxr-xr-xmcp/config/states/opendaylight2
-rw-r--r--mcp/patches/0001-Apply-opendaylight-client-state-on-compute-only.patch39
-rw-r--r--mcp/patches/0001-Filter-out-OpenDaylight-client-on-computes.patch145
-rw-r--r--mcp/patches/patches.list2
-rw-r--r--mcp/reclass/classes/cluster/mcp-pike-odl-noha/openstack/compute.yml20
7 files changed, 164 insertions, 50 deletions
diff --git a/mcp/config/scenario/os-odl-nofeature-ha.yaml.j2 b/mcp/config/scenario/os-odl-nofeature-ha.yaml.j2
index 76b893eae..0bd3a1307 100644
--- a/mcp/config/scenario/os-odl-nofeature-ha.yaml.j2
+++ b/mcp/config/scenario/os-odl-nofeature-ha.yaml.j2
@@ -23,8 +23,8 @@ cluster:
{%- if conf.MCP_VCP %}
- virtual_control_plane
{%- endif %}
- - openstack_ha
- opendaylight
+ - openstack_ha
- networks
virtual:
nodes:
diff --git a/mcp/config/scenario/os-odl-nofeature-noha.yaml b/mcp/config/scenario/os-odl-nofeature-noha.yaml
index 96d4bcc27..f52eaf5aa 100644
--- a/mcp/config/scenario/os-odl-nofeature-noha.yaml
+++ b/mcp/config/scenario/os-odl-nofeature-noha.yaml
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2017 Mirantis Inc., Enea AB and others.
+# Copyright (c) 2018 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
@@ -9,9 +9,9 @@
cluster:
domain: mcp-pike-odl-noha.local
states:
+ - opendaylight
- openstack_noha
- neutron_gateway
- - opendaylight
- networks
virtual:
nodes:
diff --git a/mcp/config/states/opendaylight b/mcp/config/states/opendaylight
index 515420a7e..5bbf0d7a8 100755
--- a/mcp/config/states/opendaylight
+++ b/mcp/config/states/opendaylight
@@ -21,4 +21,4 @@ function odl() {
salt -I 'opendaylight:server' service.mask opendaylight
salt -I 'opendaylight:server' state.sls opendaylight
-wait_for 20 "salt --out yaml -C 'I@neutron:server and *01*' network.connect $(odl bind_ip) $(odl rest_port) | fgrep 'result: true'"
+wait_for 20 "salt --out yaml -C 'I@neutron:server and *01*' network.connect $(odl bind_ip) $(odl rest_port) | fgrep -q 'result: true'"
diff --git a/mcp/patches/0001-Apply-opendaylight-client-state-on-compute-only.patch b/mcp/patches/0001-Apply-opendaylight-client-state-on-compute-only.patch
deleted file mode 100644
index 4c1d2ce8f..000000000
--- a/mcp/patches/0001-Apply-opendaylight-client-state-on-compute-only.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-: Copyright (c) 2018 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: Mon, 12 Mar 2018 16:32:50 +0400
-Subject: [PATCH] Apply opendaylight client state on compute only
-
-Change-Id: I07cd760fdb4ce84aba21450af9246c8c9128118f
-
-diff --git a/neutron/compute.sls b/neutron/compute.sls
-index 418282d..7ff136a 100644
---- a/neutron/compute.sls
-+++ b/neutron/compute.sls
-@@ -2,6 +2,10 @@
- {%- if compute.enabled %}
-
- {% if compute.backend.engine == "ml2" %}
-+{%- if compute.opendaylight is defined %}
-+include:
-+ - .opendaylight.client
-+{%- else %}
- neutron_compute_packages:
- pkg.installed:
- - names: {{ compute.pkgs }}
-@@ -243,9 +247,6 @@ rabbitmq_ca_neutron_compute:
- {%- endif %}
- {%- endif %}
-
--{%- if compute.opendaylight is defined %}
--include:
-- - .opendaylight.client
- {%- endif %}
-
- {%- elif compute.backend.engine == "ovn" %}
diff --git a/mcp/patches/0001-Filter-out-OpenDaylight-client-on-computes.patch b/mcp/patches/0001-Filter-out-OpenDaylight-client-on-computes.patch
new file mode 100644
index 000000000..be8ba1ee4
--- /dev/null
+++ b/mcp/patches/0001-Filter-out-OpenDaylight-client-on-computes.patch
@@ -0,0 +1,145 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2018 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: Mon, 12 Mar 2018 16:32:50 +0400
+Subject: [PATCH] Filter out OpenDaylight client on computes
+
+OpenDaylight uses pseudo agents to manage network ports,
+therefore detach unwanted ovs agent & etc. from compute state.
+Also swap the set-manager target with tunnel_ip/provider_mappings
+settings since ovs host config should be in place before manager setup.
+
+Change-Id: I07cd760fdb4ce84aba21450af9246c8c9128118f
+
+diff --git a/neutron/compute.sls b/neutron/compute.sls
+index 418282d..e83a5b7 100644
+--- a/neutron/compute.sls
++++ b/neutron/compute.sls
+@@ -2,6 +2,36 @@
+ {%- if compute.enabled %}
+
+ {% if compute.backend.engine == "ml2" %}
++
++{% if compute.get('dhcp_agent_enabled', False) %}
++neutron_dhcp_agent_packages:
++ pkg.installed:
++ - names:
++ - neutron-dhcp-agent
++
++neutron_dhcp_agent:
++ service.running:
++ - enable: true
++ - names:
++ - neutron-dhcp-agent
++ - watch:
++ - file: /etc/neutron/dhcp_agent.ini
++ - require:
++ - pkg: neutron_dhcp_agent_packages
++
++/etc/neutron/dhcp_agent.ini:
++ file.managed:
++ - source: salt://neutron/files/{{ compute.version }}/dhcp_agent.ini
++ - template: jinja
++ - require:
++ - pkg: neutron_dhcp_agent_packages
++
++{% endif %}
++
++{%- if compute.opendaylight is defined %}
++include:
++ - .opendaylight.client
++{%- else %}
+ neutron_compute_packages:
+ pkg.installed:
+ - names: {{ compute.pkgs }}
+@@ -53,31 +83,6 @@ neutron_sriov_service:
+
+ {% endif %}
+
+-{% if compute.get('dhcp_agent_enabled', False) %}
+-neutron_dhcp_agent_packages:
+- pkg.installed:
+- - names:
+- - neutron-dhcp-agent
+-
+-neutron_dhcp_agent:
+- service.running:
+- - enable: true
+- - names:
+- - neutron-dhcp-agent
+- - watch:
+- - file: /etc/neutron/dhcp_agent.ini
+- - require:
+- - pkg: neutron_dhcp_agent_packages
+-
+-/etc/neutron/dhcp_agent.ini:
+- file.managed:
+- - source: salt://neutron/files/{{ compute.version }}/dhcp_agent.ini
+- - template: jinja
+- - require:
+- - pkg: neutron_dhcp_agent_packages
+-
+-{% endif %}
+-
+ {% if compute.dvr %}
+
+ {%- if fwaas.get('enabled', False) %}
+@@ -243,10 +248,7 @@ rabbitmq_ca_neutron_compute:
+ {%- endif %}
+ {%- endif %}
+
+-{%- if compute.opendaylight is defined %}
+-include:
+- - .opendaylight.client
+-{%- endif %}
++{%- endif %}{# !OpenDaylight #}
+
+ {%- elif compute.backend.engine == "ovn" %}
+
+diff --git a/neutron/opendaylight/client.sls b/neutron/opendaylight/client.sls
+index 57e6bcc..79ab0a2 100644
+--- a/neutron/opendaylight/client.sls
++++ b/neutron/opendaylight/client.sls
+@@ -9,27 +9,27 @@ python-networking-odl:
+
+ {%- if not grains.get('noservices', False) %}
+
+-ovs_set_manager:
++neutron_odl_ovs_hostconfig:
+ cmd.run:
+- - name: 'ovs-vsctl set-manager {{ neutron.opendaylight.ovsdb_server_iface }} {{ neutron.opendaylight.ovsdb_odl_iface }}'
+- - unless: 'ovs-vsctl get-manager | fgrep -x {{ neutron.opendaylight.ovsdb_odl_iface }}'
++ - name: 'neutron-odl-ovs-hostconfig --noovs_dpdk'
++ - require:
++ - pkg: python-networking-odl
+
+ ovs_set_tunnel_endpoint:
+ cmd.run:
+ - name: 'ovs-vsctl set Open_vSwitch . other_config:local_ip={{ neutron.opendaylight.tunnel_ip }}'
+- - unless: 'ovs-vsctl get Open_vSwitch . other_config | fgrep local_ip="{{ neutron.opendaylight.tunnel_ip }}"'
++ - unless: 'ovs-vsctl get Open_vSwitch . other_config | fgrep -q local_ip=\"{{ neutron.opendaylight.tunnel_ip }}\"'
+
+ {%- if neutron.opendaylight.provider_mappings is defined %}
+ ovs_set_provider_mappings:
+ cmd.run:
+ - name: 'ovs-vsctl set Open_vSwitch . other_config:provider_mappings={{ neutron.opendaylight.provider_mappings }}'
+- - unless: 'ovs-vsctl get Open_vSwitch . other_config | fgrep provider_mappings="{{ neutron.opendaylight.provider_mappings }}"'
++ - unless: 'ovs-vsctl get Open_vSwitch . other_config | fgrep -q provider_mappings=\"{{ neutron.opendaylight.provider_mappings }}\"'
+ {%- endif %}
+
+-neutron_odl_ovs_hostconfig:
++ovs_set_manager:
+ cmd.run:
+- - name: 'neutron-odl-ovs-hostconfig --noovs_dpdk'
+- - require:
+- - pkg: python-networking-odl
++ - name: 'ovs-vsctl set-manager {{ neutron.opendaylight.ovsdb_server_iface }} {{ neutron.opendaylight.ovsdb_odl_iface }}'
++ - unless: 'ovs-vsctl get-manager | fgrep -qx {{ neutron.opendaylight.ovsdb_odl_iface }}'
+
+ {%- endif %}
diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list
index 711b0f3a5..b650ec87b 100644
--- a/mcp/patches/patches.list
+++ b/mcp/patches/patches.list
@@ -5,7 +5,7 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-/usr/share/salt-formulas/env: 0001-Apply-opendaylight-client-state-on-compute-only.patch
+/usr/share/salt-formulas/env: 0001-Filter-out-OpenDaylight-client-on-computes.patch
/usr/share/salt-formulas/env: 0002-maas-region-skip-credentials-update.patch
/usr/share/salt-formulas/env: 0003-maas-region-force-artifact-download.patch
/usr/share/salt-formulas/env: 0004-network.dpdk-Move-ifcfg-br-prv-to-interfaces.u.patch
diff --git a/mcp/reclass/classes/cluster/mcp-pike-odl-noha/openstack/compute.yml b/mcp/reclass/classes/cluster/mcp-pike-odl-noha/openstack/compute.yml
index e7e06a61d..b0690167f 100644
--- a/mcp/reclass/classes/cluster/mcp-pike-odl-noha/openstack/compute.yml
+++ b/mcp/reclass/classes/cluster/mcp-pike-odl-noha/openstack/compute.yml
@@ -14,17 +14,13 @@ classes:
parameters:
linux:
network:
- gateway: ${_param:openstack_gateway_address}
interface:
external_interface:
enabled: true
+ type: eth
name: ${_param:external_interface}
mtu: ${_param:interface_mtu}
proto: manual
- ovs_port_type: OVSPort
- type: ovs_port
- ovs_bridge: br-floating
- bridge: br-floating
br-mesh:
enabled: true
type: bridge
@@ -37,6 +33,18 @@ parameters:
enabled: true
type: ovs_bridge
mtu: ${_param:interface_mtu}
- proto: static
+ float-to-ex:
+ enabled: true
+ type: ovs_port
+ mtu: ${_param:interface_mtu}
+ bridge: br-floating
+ br-ex:
+ enabled: true
+ type: bridge
+ mtu: ${_param:interface_mtu}
address: ${_param:external_address}
netmask: ${_param:opnfv_net_public_mask}
+ use_interfaces:
+ - ${_param:external_interface}
+ use_ovs_ports:
+ - float-to-ex