diff --git a/octavia_dashboard/sdk_connection.py b/octavia_dashboard/sdk_connection.py index 87e0e52a..d0fc67fe 100644 --- a/octavia_dashboard/sdk_connection.py +++ b/octavia_dashboard/sdk_connection.py @@ -16,6 +16,7 @@ from django.conf import settings import octavia_dashboard from openstack import config as occ from openstack import connection +from openstack_dashboard.api import base def get_sdk_connection(request): @@ -44,7 +45,7 @@ def get_sdk_connection(request): project_id=request.user.project_id, project_domain_id=request.user.domain_id, auth_token=request.user.token.unscoped_token, - auth_url=request.user.endpoint), + auth_url=base.url_for(request, 'identity')), app_name='octavia-dashboard', app_version=octavia_dashboard.__version__) return connection.from_config(cloud_config=cloud_config) diff --git a/releasenotes/notes/fix-incorrect-region-endpoint-1afc5ebdc6fc4110.yaml b/releasenotes/notes/fix-incorrect-region-endpoint-1afc5ebdc6fc4110.yaml new file mode 100644 index 00000000..925662b4 --- /dev/null +++ b/releasenotes/notes/fix-incorrect-region-endpoint-1afc5ebdc6fc4110.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixed a bug when using multi-region deployments, the octavia-dashboard may + have used the wrong keystone catalog to get the load-balancer endpoint.