From 271bc72dae91cd5d3e0cbf37f9c9931bbaec13f7 Mon Sep 17 00:00:00 2001
From: Pierre Riteau <pierre@stackhpc.com>
Date: Thu, 23 Jul 2020 15:43:31 +0200
Subject: [PATCH] Set endpoint type variables to publicURL in public-openrc.sh

Change-Id: I9d7f0bf7daa6d1abe31de0e76a508820ed123c28
Story: 2007950
Task: 40426
---
 ansible/roles/public-openrc/templates/public-openrc.sh.j2 | 6 ++++++
 .../notes/public-os-endpoint-type-a678a8ddc51ce3b1.yaml   | 8 ++++++++
 2 files changed, 14 insertions(+)
 create mode 100644 releasenotes/notes/public-os-endpoint-type-a678a8ddc51ce3b1.yaml

diff --git a/ansible/roles/public-openrc/templates/public-openrc.sh.j2 b/ansible/roles/public-openrc/templates/public-openrc.sh.j2
index a78008871..d0356e800 100644
--- a/ansible/roles/public-openrc/templates/public-openrc.sh.j2
+++ b/ansible/roles/public-openrc/templates/public-openrc.sh.j2
@@ -5,6 +5,12 @@
 export OS_AUTH_URL={{ public_openrc_auth_url }}
 {% elif "export OS_INTERFACE" in line %}
 export OS_INTERFACE=public
+{% elif "export OS_ENDPOINT_TYPE" in line %}
+export OS_ENDPOINT_TYPE=publicURL
+{% elif "export OS_MANILA_ENDPOINT_TYPE" in line %}
+export OS_MANILA_ENDPOINT_TYPE=publicURL
+{% elif "export OS_MISTRAL_ENDPOINT_TYPE" in line %}
+export OS_MISTRAL_ENDPOINT_TYPE=publicURL
 {% elif "export OS_CACERT" in line and kolla_external_fqdn_cacert is not none %}
 export OS_CACERT={{ kolla_external_fqdn_cacert }}
 {% else %}
diff --git a/releasenotes/notes/public-os-endpoint-type-a678a8ddc51ce3b1.yaml b/releasenotes/notes/public-os-endpoint-type-a678a8ddc51ce3b1.yaml
new file mode 100644
index 000000000..737152018
--- /dev/null
+++ b/releasenotes/notes/public-os-endpoint-type-a678a8ddc51ce3b1.yaml
@@ -0,0 +1,8 @@
+---
+fixes:
+  - |
+    Changes the value of ``OS_ENDPOINT_TYPE``, ``OS_MANILA_ENDPOINT_TYPE``, and
+    ``OS_MISTRAL_ENDPOINT_TYPE`` in ``public-openrc.sh`` to use ``publicURL``,
+    which should fix issues with legacy CLI tools on hosts without access to
+    the internal API. See `story 2007950
+    <https://storyboard.openstack.org/#!/story/2007950>`__ for details.