Remove OvS from neutron-server container
When Opendaylight is selected as neutron-backend then the OvS is installed not only in neutron-agent container and in Compute hosts but also in neutron-server container. Change-Id: I6ec5a9dcacf50883b613256dacef32795fc3b65e Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>
This commit is contained in:
parent
d5d1ad3d74
commit
a17e80117d
@ -31,37 +31,5 @@
|
||||
- opendaylight-install
|
||||
- opendaylight-pip-packages
|
||||
|
||||
- name: Ensure Open vSwitch service is started and enabled
|
||||
service:
|
||||
name: "{{ neutron_ovs_service_name }}"
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: Retrieve current OvS manager
|
||||
command: ovs-vsctl get-manager
|
||||
register: ovs_manager
|
||||
changed_when: False
|
||||
|
||||
- name: Set ODL as OvS manager
|
||||
command: ovs-vsctl set-manager {{ ovs_manager_list }}
|
||||
when: ovs_manager.stdout == ""
|
||||
|
||||
- name: Configure hosts for networking-odl, force kernel datapath
|
||||
command: "{{ neutron_bin }}/neutron-odl-ovs-hostconfig --noovs_dpdk {% if 'odl-router' in neutron_plugin_base %}--datapath_type=system --bridge_mappings={{ neutron_provider_networks.network_mappings }}"
|
||||
when: ovs_manager.stdout == ""
|
||||
|
||||
- name: Retrieve current OvS local ip
|
||||
command: ovs-vsctl get Open_vSwitch . other_config:local_ip
|
||||
ignore_errors: yes
|
||||
register: ovs_local_ip
|
||||
changed_when: False
|
||||
|
||||
- name: Set local ip for OpenvSwitch
|
||||
command: "ovs-vsctl set Open_vSwitch . other_config:local_ip={{ neutron_local_ip }}"
|
||||
when: ovs_local_ip.rc != 0
|
||||
|
||||
- name: Set the bridge mappings
|
||||
command: "ovs-vsctl set Open_vSwitch . other_config:provider_mappings={{ neutron_provider_networks.network_mappings }}"
|
||||
when:
|
||||
- neutron_provider_networks.network_mappings is defined
|
||||
- (neutron_plugin_base == 'odl-router' or neutron_plugin_base == 'odl-router_v2')
|
||||
- include: setup_ovs_opendaylight.yml
|
||||
when: (inventory_hostname in groups['neutron_agents_container'] or inventory_hostname in groups['compute_hosts'])
|
||||
|
49
tasks/providers/setup_ovs_opendaylight.yml
Normal file
49
tasks/providers/setup_ovs_opendaylight.yml
Normal file
@ -0,0 +1,49 @@
|
||||
----
|
||||
# Copyright 2017, Intracom-Telecom
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Ensure Open vSwitch service is started and enabled
|
||||
service:
|
||||
name: "{{ neutron_ovs_service_name }}"
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: Retrieve current OvS manager
|
||||
command: ovs-vsctl get-manager
|
||||
register: ovs_manager
|
||||
changed_when: False
|
||||
|
||||
- name: Set ODL as OvS manager
|
||||
command: ovs-vsctl set-manager {{ ovs_manager_list }}
|
||||
when: ovs_manager.stdout == ""
|
||||
|
||||
- name: Configure hosts for networking-odl, force kernel datapath
|
||||
command: "{{ neutron_bin }}/neutron-odl-ovs-hostconfig --noovs_dpdk {% if 'odl-router' in neutron_plugin_base %}--datapath_type=system --bridge_mappings={{ neutron_provider_networks.network_mappings }}"
|
||||
when: ovs_manager.stdout == ""
|
||||
|
||||
- name: Retrieve current OvS local ip
|
||||
command: ovs-vsctl get Open_vSwitch . other_config:local_ip
|
||||
ignore_errors: yes
|
||||
register: ovs_local_ip
|
||||
changed_when: False
|
||||
|
||||
- name: Set local ip for OpenvSwitch
|
||||
command: "ovs-vsctl set Open_vSwitch . other_config:local_ip={{ neutron_local_ip }}"
|
||||
when: ovs_local_ip.rc != 0
|
||||
|
||||
- name: Set the bridge mappings
|
||||
command: "ovs-vsctl set Open_vSwitch . other_config:provider_mappings={{ neutron_provider_networks.network_mappings }}"
|
||||
when:
|
||||
- neutron_provider_networks.network_mappings is defined
|
||||
- (neutron_plugin_base == 'odl-router' or neutron_plugin_base == 'odl-router_v2')
|
@ -56,6 +56,8 @@ server2
|
||||
[neutron_l3_agent]
|
||||
[neutron_lbaas_agent]
|
||||
[neutron_metadata_agent]
|
||||
[neutron_agents_container]
|
||||
[compute_hosts]
|
||||
|
||||
[neutron_all:children]
|
||||
neutron_agent
|
||||
|
@ -63,6 +63,8 @@ agents2
|
||||
[neutron_l3_agent]
|
||||
[neutron_lbaas_agent]
|
||||
[neutron_metadata_agent]
|
||||
[neutron_agents_container]
|
||||
[compute_hosts]
|
||||
|
||||
[neutron_all:children]
|
||||
neutron_agent
|
||||
|
@ -68,6 +68,8 @@ server1
|
||||
server2
|
||||
|
||||
[neutron_calico_dhcp_agent]
|
||||
[neutron_agents_container]
|
||||
[compute_hosts]
|
||||
|
||||
[neutron_all:children]
|
||||
neutron_agent
|
||||
|
@ -46,6 +46,8 @@ server1
|
||||
[neutron_l3_agent]
|
||||
[neutron_lbaas_agent]
|
||||
[neutron_metadata_agent]
|
||||
[neutron_agents_container]
|
||||
[compute_hosts]
|
||||
|
||||
[neutron_all:children]
|
||||
neutron_agent
|
||||
|
@ -68,6 +68,8 @@ server1
|
||||
server2
|
||||
|
||||
[neutron_calico_dhcp_agent]
|
||||
[neutron_agents_container]
|
||||
[compute_hosts]
|
||||
|
||||
[neutron_all:children]
|
||||
neutron_agent
|
||||
|
@ -27,7 +27,7 @@ neutron_package_list: |-
|
||||
{% if (neutron_services['neutron-openvswitch-agent']['group'] in group_names and neutron_services['neutron-openvswitch-agent'].service_en | bool)
|
||||
or (neutron_services['dragonflow-controller-agent']['group'] in group_names and neutron_services['dragonflow-controller-agent'].service_en | bool)
|
||||
or (neutron_services['dragonflow-l3-agent']['group'] in group_names and neutron_services['dragonflow-l3-agent'].service_en | bool)
|
||||
or (neutron_plugin_type == 'ml2.opendaylight') %}
|
||||
or ((inventory_hostname in groups['neutron_agents_container'] or inventory_hostname in groups['compute_hosts']) and neutron_plugin_type == 'ml2.opendaylight') %}
|
||||
{% set _ = packages.extend(neutron_ovs_distro_packages) %}
|
||||
{% endif %}
|
||||
{% if neutron_services['neutron-linuxbridge-agent']['group'] in group_names and neutron_services['neutron-linuxbridge-agent'].service_en | bool %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user