DCN: use FQDN in glance endpoint with internal TLS

Fix the glance-api endpoint used by cinder and nova services at DCN
sites. When internal TLS is enabled, the URI must use a FQDN and not
an IP address.

Closes-Bug: #1893453
Change-Id: I386a035f9688c54d617e714888c9c0fa14f34a1e
(cherry picked from commit 2035b88f5b)
This commit is contained in:
Alan Bishop 2020-08-27 12:22:02 -07:00
parent 1ecccef564
commit 9471eb030f
2 changed files with 24 additions and 20 deletions

View File

@ -55,16 +55,18 @@ outputs:
glance_api_edge_uri: glance_api_edge_uri:
description: URI of the glance-api service runing at the edge site. description: URI of the glance-api service runing at the edge site.
value: &glance_api_edge_uri value: &glance_api_edge_uri
str_replace: if:
template: - internal_tls_enabled
"PROTOCOL://%{hiera('NETWORK_uri')}:9292" - str_replace:
params: template:
PROTOCOL: "https://%{hiera('fqdn_NETWORK')}:9292"
if: params:
- internal_tls_enabled NETWORK: {get_param: [ServiceNetMap, GlanceApiEdgeNetwork]}
- https - str_replace:
- http template:
NETWORK: {get_param: [ServiceNetMap, GlanceApiEdgeNetwork]} "http://%{hiera('NETWORK_uri')}:9292"
params:
NETWORK: {get_param: [ServiceNetMap, GlanceApiEdgeNetwork]}
role_data: role_data:
description: Role data for the Glance API role for DCN/Edge. description: Role data for the Glance API role for DCN/Edge.

View File

@ -61,16 +61,18 @@ outputs:
glance_api_edge_uri: glance_api_edge_uri:
description: URI of the glance-api service runing at the edge site. description: URI of the glance-api service runing at the edge site.
value: &glance_api_edge_uri value: &glance_api_edge_uri
str_replace: if:
template: - internal_tls_enabled
"PROTOCOL://%{hiera('NETWORK_uri')}:9292" - str_replace:
params: template:
PROTOCOL: "https://%{hiera('fqdn_NETWORK')}:9292"
if: params:
- internal_tls_enabled NETWORK: {get_param: [ServiceNetMap, GlanceApiEdgeNetwork]}
- https - str_replace:
- http template:
NETWORK: {get_param: [ServiceNetMap, GlanceApiEdgeNetwork]} "http://%{hiera('NETWORK_uri')}:9292"
params:
NETWORK: {get_param: [ServiceNetMap, GlanceApiEdgeNetwork]}
role_data: role_data:
description: Role data for the HAproxy role for DCN/Edge. description: Role data for the HAproxy role for DCN/Edge.