From 49c6cdca927f2f262ba54b22f19713a65ae42563 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Thu, 27 Apr 2017 13:10:54 +0000 Subject: [PATCH] Use publicURL as default of OPENSTACK_ENDPOINT_TYPE consistently The current default settings of openstack_dashboard OPENSTACK_ENDPOINT_TYPE has two default values 'publicURL' and 'internalURL' and this leads to require both endpoints in deployments. Having two default values for one setting is confusing. The comment in local_settings.py says OPENSTACK_ENDPOINT_TYPE defaults to publicURL and operators does not think internalURL is used. I believe there is no negative side because if operators want to deploy horizon out side of their OpenStack clouds they use publicURL and if they want to deploy horizon behind load balancer or something they would use internalURL as OPENSTACK_ENDPOINT_TYPE. This also help the current devstack setup which only configures public endpoint (interface) and Horizon does not work by default for Identity dashboard. Closes-Bug: #1686717 Change-Id: If5c7bbc5188f6df65661c41d777a9c7846fe9008 --- openstack_dashboard/api/keystone.py | 2 +- ...tting-openstack-endpoint-type-ebdeda92ba0d1587.yaml | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/setting-openstack-endpoint-type-ebdeda92ba0d1587.yaml diff --git a/openstack_dashboard/api/keystone.py b/openstack_dashboard/api/keystone.py index e6ca1d2aa8..73a0f5dff4 100644 --- a/openstack_dashboard/api/keystone.py +++ b/openstack_dashboard/api/keystone.py @@ -172,7 +172,7 @@ def keystoneclient(request, admin=False): else: endpoint_type = getattr(settings, 'OPENSTACK_ENDPOINT_TYPE', - 'internalURL') + 'publicURL') # Take care of client connection caching/fetching a new client. # Admin vs. non-admin clients are cached separately for token matching. diff --git a/releasenotes/notes/setting-openstack-endpoint-type-ebdeda92ba0d1587.yaml b/releasenotes/notes/setting-openstack-endpoint-type-ebdeda92ba0d1587.yaml new file mode 100644 index 0000000000..ef286c0a98 --- /dev/null +++ b/releasenotes/notes/setting-openstack-endpoint-type-ebdeda92ba0d1587.yaml @@ -0,0 +1,10 @@ +--- +upgrade: + - | + ``OPENSTACK_ENDPOINT_TYPE`` setting now has a consistent default value + and it defaults to ``publicURL``. If you use the default value, + previously (at least Ocata release) Horizon used ``internalURL`` for + keystone and ``publicURL`` for other services. The default value is + now ``publicURL``, so if you want horizon to use ``internalURL`` to + talk with back-end services, ensure to set ``OPENSTACK_ENDPOINT_TYPE`` + to ``internalURL``.