From 8d9c0336ecc2b8469c78c7798e5b1871264b8087 Mon Sep 17 00:00:00 2001 From: James Denton Date: Tue, 15 Jan 2019 12:47:07 +0000 Subject: [PATCH] Make container_interface optional for provider network As Neutron agents move to bare metal by default, the container_interface attribute for a Neutron provider network (e.g. br-vlan, br-vxlan, etc) is unnecessary and confusing. This patch aims to change it from a required attribute to an optional one. Change-Id: I52692f5a36e7064c3a6ac6ccafc2420549685a66 --- doc/source/admin/openstack-operations/managing-networks.rst | 4 +++- etc/openstack_deploy/openstack_user_config.yml.example | 5 ++++- osa_toolkit/generate.py | 2 +- ...er-network-container-interface-opt-80263aebc5b8e7c3.yaml | 6 ++++++ 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/provider-network-container-interface-opt-80263aebc5b8e7c3.yaml diff --git a/doc/source/admin/openstack-operations/managing-networks.rst b/doc/source/admin/openstack-operations/managing-networks.rst index 6fb527d1c1..9ced1752bf 100644 --- a/doc/source/admin/openstack-operations/managing-networks.rst +++ b/doc/source/admin/openstack-operations/managing-networks.rst @@ -45,7 +45,9 @@ add a new block underneath the ``provider_networks`` section: The ``container_bridge`` setting defines the physical network bridge used to connect the veth pair from the physical host to the container. Inside the container, the ``container_interface`` setting defines the name -at which the physical network will be made available. +at which the physical network will be made available. The +``container_interface`` setting is not required when Neutron agents are +deployed on bare metal. Make sure that both settings are uniquely defined across their provider networks and that the network interface is correctly configured inside your operating system. diff --git a/etc/openstack_deploy/openstack_user_config.yml.example b/etc/openstack_deploy/openstack_user_config.yml.example index 1e15398884..9bab1abaa1 100644 --- a/etc/openstack_deploy/openstack_user_config.yml.example +++ b/etc/openstack_deploy/openstack_user_config.yml.example @@ -140,7 +140,10 @@ # # Option: container_interface (required, string) # Name of unique interface in containers to use for this network. -# Typical values include 'eth1', 'eth2', etc. +# Typical values include 'eth1', 'eth2', etc. This option is OPTIONAL +# for Neutron provider network definitions when Neutron agents are +# deployed on bare metal (default), but REQUIRED when agents are +# deployed in containers and for all other non-Neutron use-cases. # NOTE: Container interface is different from host interfaces. # # Option: container_type (required, string) diff --git a/osa_toolkit/generate.py b/osa_toolkit/generate.py index e646b3e295..6d680a6d8b 100755 --- a/osa_toolkit/generate.py +++ b/osa_toolkit/generate.py @@ -736,7 +736,7 @@ def container_skel_load(container_skel, inventory, config): ip_q=ip_from_q, q_name=q_name, netmask=netmask, - interface=p_net['container_interface'], + interface=p_net.get('container_interface'), bridge=p_net['container_bridge'], net_type=p_net.get('container_type'), net_mtu=p_net.get('container_mtu'), diff --git a/releasenotes/notes/provider-network-container-interface-opt-80263aebc5b8e7c3.yaml b/releasenotes/notes/provider-network-container-interface-opt-80263aebc5b8e7c3.yaml new file mode 100644 index 0000000000..5c4cc3fc4a --- /dev/null +++ b/releasenotes/notes/provider-network-container-interface-opt-80263aebc5b8e7c3.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + The ``container_interface`` provider network option is no longer required + for Neutron provider network definitions when related agents or OVN + controllers are deployed on bare metal.