From c6294bd8a0638e50c867014d44c32933ccc15bfc Mon Sep 17 00:00:00 2001 From: Kamil Sambor Date: Wed, 29 May 2019 12:50:27 +0200 Subject: [PATCH] Add creating br-ex for compute node in ovn For ovn compute nodes we need br-ex exactly like with ComputeDVR role. Now we can do this in jinja templates using new tag external_bridge Change-Id: If44e9cbad714ce3954928407c42a8dc2473fed2e Closes-Bug: #1822367 (cherry picked from commit ff7cce93ebcdf4fd868329be94d618f9e755049f) --- network/config/multiple-nics/role.role.j2.yaml | 3 ++- .../notes/create-br-ex-for-compute-b967312323d45d9b.yaml | 9 +++++++++ roles/Compute.yaml | 3 +++ roles/ComputeDVR.yaml | 2 ++ roles/Networker.yaml | 2 ++ roles/README.rst | 3 +++ roles_data.yaml | 3 +++ 7 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/create-br-ex-for-compute-b967312323d45d9b.yaml diff --git a/network/config/multiple-nics/role.role.j2.yaml b/network/config/multiple-nics/role.role.j2.yaml index 9da8625e29..4502397841 100644 --- a/network/config/multiple-nics/role.role.j2.yaml +++ b/network/config/multiple-nics/role.role.j2.yaml @@ -155,7 +155,8 @@ resources: get_param: {{network.name}}InterfaceDefaultRoute {%- endif %} {%- endif %} -{%- elif network.name in role.networks or role.name == 'Networker' or role.name == 'ComputeDVR' %} +{#- We need bridge also for ComputeDVR and Computes with OVN #} +{%- elif network.name in role.networks or 'external_bridge' in role.tags %} - type: ovs_bridge {%- if network.name == "External" %} name: bridge_name diff --git a/releasenotes/notes/create-br-ex-for-compute-b967312323d45d9b.yaml b/releasenotes/notes/create-br-ex-for-compute-b967312323d45d9b.yaml new file mode 100644 index 0000000000..bee895d6ee --- /dev/null +++ b/releasenotes/notes/create-br-ex-for-compute-b967312323d45d9b.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + Introduce new tag into roles that will create external_bridge (usable only + for multiple-nics). +upgrade: + - | + During upgrade user will need to create custom roles_data.yaml and remove + external_bridge from tags to be sure that bridge will be not added. \ No newline at end of file diff --git a/roles/Compute.yaml b/roles/Compute.yaml index 4ea15c8e50..192c5b4ee3 100644 --- a/roles/Compute.yaml +++ b/roles/Compute.yaml @@ -5,6 +5,9 @@ description: | Basic Compute Node role CountDefault: 1 + # Create external Neutron bridge (unset if using ML2/OVS without DVR) + tags: + - external_bridge networks: InternalApi: subnet: internal_api_subnet diff --git a/roles/ComputeDVR.yaml b/roles/ComputeDVR.yaml index cf228276ba..046fec933d 100644 --- a/roles/ComputeDVR.yaml +++ b/roles/ComputeDVR.yaml @@ -5,6 +5,8 @@ description: | DVR enabled Compute Node role CountDefault: 1 + tags: + - external_bridge networks: InternalApi: subnet: internal_api_subnet diff --git a/roles/Networker.yaml b/roles/Networker.yaml index ae36b629b0..8ee1554af8 100644 --- a/roles/Networker.yaml +++ b/roles/Networker.yaml @@ -9,6 +9,8 @@ subnet: internal_api_subnet Tenant: subnet: tenant_subnet + tags: + - external_bridge HostnameFormatDefault: '%stackname%-networker-%index%' ServicesDefault: - OS::TripleO::Services::Aide diff --git a/roles/README.rst b/roles/README.rst index ab0ce196c1..96b3351be5 100644 --- a/roles/README.rst +++ b/roles/README.rst @@ -60,6 +60,9 @@ Role Options with both 'primary' and 'controller' is used as the primary role for the deployment process. If no roles have 'primary' and 'controller', the first role in this file is used as the primary role. + The third tag that can be defined here is external_bridge, which is used + to define which node must have a bridge created in a multiple-nic network + config. * description: (string) as few sentences describing the role and information pertaining to the usage of the role. diff --git a/roles_data.yaml b/roles_data.yaml index 961268af6e..32011d26a0 100644 --- a/roles_data.yaml +++ b/roles_data.yaml @@ -196,6 +196,9 @@ description: | Basic Compute Node role CountDefault: 1 + # Create external Neutron bridge (unset if using ML2/OVS without DVR) + tags: + - external_bridge networks: InternalApi: subnet: internal_api_subnet