From d1673ad173ea96c0e018946f54caa99776855cc1 Mon Sep 17 00:00:00 2001 From: Paul Bourke Date: Tue, 20 Sep 2016 17:07:55 +0100 Subject: Allow operators to provision multiple physical networks Currently Kolla operators are restricted to configuring one physical network (physnet1). This change along with ml2_conf.ini augmentation can be used to setup multiple physical networks in openvswitch. E.g. To configure two physical networks, physnet1 and physnet2, with ports eth1 and eth2 associated respectively: In /etc/kolla/globals.yml, set neutron_bridge_name: "br-ex,br-ex2" neutron_external_interface: "eth1,eth2" In /etc/kolla/config/neutron/ml2_conf.ini [ovs] bridge_mappings = physnet1:br-ex,physnet2:br-ex2 Co-Authored-By: Mick Thompson Closes-Bug: #1625700 DocImpact Change-Id: I9454ca98d9b058368129123109ccc56f95519874 --- ansible/roles/neutron/tasks/start.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ansible') diff --git a/ansible/roles/neutron/tasks/start.yml b/ansible/roles/neutron/tasks/start.yml index fbccfaf60..e90d4a176 100644 --- a/ansible/roles/neutron/tasks/start.yml +++ b/ansible/roles/neutron/tasks/start.yml @@ -37,7 +37,7 @@ - neutron_plugin_agent == "openvswitch" - name: Ensuring OVS bridge is properly setup - command: docker exec openvswitch_db /usr/local/bin/kolla_ensure_openvswitch_configured {{ neutron_bridge_name }} {{ neutron_external_interface }} + command: docker exec openvswitch_db /usr/local/bin/kolla_ensure_openvswitch_configured {{ item.0 }} {{ item.1 }} register: status changed_when: status.stdout.find('changed') != -1 when: @@ -48,6 +48,9 @@ or inventory_hostname in groups['neutron-metadata-agent'] or inventory_hostname in groups['neutron-vpnaas-agent']) - neutron_plugin_agent == "openvswitch" + with_together: + - "{{ neutron_bridge_name.split(',') }}" + - "{{ neutron_external_interface.split(',') }}" - name: Starting openvswitch-vswitchd container kolla_docker: -- cgit v1.2.3