From 687b8b9f7fdd0f3946397aabcc6bcc7328811c43 Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Thu, 9 Nov 2017 19:20:32 +0100 Subject: [PATCH] Fix the odl-router condition The new ansible version does not apparently accept the old logic so we need to add a check on both v1 and v2 of odl_router plugin to get bridge_mappings Change-Id: I19c5cbfb47d2f31b346950532c2203a87697bd8f --- tasks/providers/setup_ovs_opendaylight.yml | 2 +- templates/plugins/ml2/ml2_conf.ini.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/providers/setup_ovs_opendaylight.yml b/tasks/providers/setup_ovs_opendaylight.yml index 7e89b1d0..ca8117f9 100644 --- a/tasks/providers/setup_ovs_opendaylight.yml +++ b/tasks/providers/setup_ovs_opendaylight.yml @@ -29,7 +29,7 @@ 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 }} {% endif %}" + command: "{{ neutron_bin }}/neutron-odl-ovs-hostconfig --noovs_dpdk {% if 'odl-router_v2' in neutron_plugin_base or 'odl-router' in neutron_plugin_base %}--datapath_type=system --bridge_mappings={{ neutron_provider_networks.network_mappings }} {% endif %}" when: ovs_manager.stdout == "" - name: Retrieve current OvS local ip diff --git a/templates/plugins/ml2/ml2_conf.ini.j2 b/templates/plugins/ml2/ml2_conf.ini.j2 index a7265635..3105e7a6 100644 --- a/templates/plugins/ml2/ml2_conf.ini.j2 +++ b/templates/plugins/ml2/ml2_conf.ini.j2 @@ -7,7 +7,7 @@ tenant_network_types = {{ neutron_provider_networks.network_types if neutron_pro mechanism_drivers = {{ neutron_ml2_mechanism_drivers }} extension_drivers = port_security{% if 'qos' in neutron_plugin_base %},qos{% endif %}{% if 'dns' in neutron_plugin_base %},dns{% endif %} -{% if neutron_plugin_type == 'ml2.opendaylight' and 'odl-router' in neutron_plugin_base %} +{% if neutron_plugin_type == 'ml2.opendaylight' and ('odl-router_v2' in neutron_plugin_base or 'odl-router' in neutron_plugin_base) %} bridge_mappings = {{ neutron_provider_networks.network_mappings }} {% endif %}