From 40731e572f2b503a3ccc603642a3721a5ce1cf7a Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Thu, 25 Jun 2020 10:05:54 -0700 Subject: [PATCH] Fix neutron subnet lookup ignoring endpoint_type The recent patch[1] that adds a neutron subnet lookup using the user context is not honoring the interface/endpoint_type or region_name settings for neutron in the octavia configuration file. This is causing problems for deployments that use the "internal" endpoint for neutron and the current code will always return the "public" endpoint. This patch corrects this problem by including those filter parameters when the neutron endpoint is looked up in keystone. [1] https://review.opendev.org/726042 Change-Id: I7b8f7c7d653b37395f9a660be67f954a3a6f26d9 Story: 2007863 Task: 40173 --- octavia/common/clients.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/octavia/common/clients.py b/octavia/common/clients.py index 4b24d5cc9e..771944db03 100644 --- a/octavia/common/clients.py +++ b/octavia/common/clients.py @@ -120,7 +120,9 @@ class NeutronAuth(object): neutron_endpoint = CONF.neutron.endpoint if not neutron_endpoint: session = keystone.KeystoneSession().get_session() - endpoint_data = session.get_endpoint_data(service_type='network') + endpoint_data = session.get_endpoint_data( + service_type='network', interface=CONF.neutron.endpoint_type, + region_name=CONF.neutron.region_name) neutron_endpoint = endpoint_data.catalog_url kwargs = {