Browse Source

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
(cherry picked from commit 40731e572f2b503a3ccc603642a3721a5ce1cf7a)
changes/64/738264/1
Michael Johnson 2 weeks ago
parent
commit
b4bc92ebf1
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      octavia/common/clients.py

+ 3
- 1
octavia/common/clients.py View File

@@ -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 = {


Loading…
Cancel
Save