From c40fa705581ff864ca926bc7b8d246883a8442f0 Mon Sep 17 00:00:00 2001 From: Alan Bishop Date: Mon, 23 Mar 2020 08:46:06 -0700 Subject: [PATCH] DCN/Edge: Handle ipv6 address for local glance endpoint In a DCN/Edge deployment, the glance endpoint is overridden so that nova and cinder use the local glance-api service. When the deployment is using ipv6, ensure the endpoint URI has brackets around the ipv6 address. Closes-Bug: #1868579 Change-Id: I8e71a1f6df732c352b018472c30c662f1e726aaa (cherry picked from commit 95b01718045d8c26f259ac91c7dba5cae3fd1447) Conflicts: deployment/haproxy/haproxy-edge-container-puppet.yaml --- .../glance-api-edge-container-puppet.yaml | 2 +- .../haproxy-edge-container-puppet.yaml | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/deployment/glance/glance-api-edge-container-puppet.yaml b/deployment/glance/glance-api-edge-container-puppet.yaml index 357e1556a4..dcc7f95d7a 100644 --- a/deployment/glance/glance-api-edge-container-puppet.yaml +++ b/deployment/glance/glance-api-edge-container-puppet.yaml @@ -57,7 +57,7 @@ outputs: value: &glance_api_edge_uri str_replace: template: - "PROTOCOL://%{hiera('NETWORK')}:9292" + "PROTOCOL://%{hiera('NETWORK_uri')}:9292" params: PROTOCOL: if: diff --git a/deployment/haproxy/haproxy-edge-container-puppet.yaml b/deployment/haproxy/haproxy-edge-container-puppet.yaml index ad9e404f98..c0818dd39f 100644 --- a/deployment/haproxy/haproxy-edge-container-puppet.yaml +++ b/deployment/haproxy/haproxy-edge-container-puppet.yaml @@ -58,6 +58,20 @@ resources: outputs: + glance_api_edge_uri: + description: URI of the glance-api service runing at the edge site. + value: &glance_api_edge_uri + str_replace: + template: + "PROTOCOL://%{hiera('NETWORK_uri')}:9292" + params: + PROTOCOL: + if: + - internal_tls_enabled + - https + - http + NETWORK: {get_param: [ServiceNetMap, GlanceApiEdgeNetwork]} + role_data: description: Role data for the HAproxy role for DCN/Edge. value: @@ -121,3 +135,13 @@ outputs: tripleo::haproxy::ui: false tripleo::haproxy::zaqar_api: false tripleo::haproxy::zaqar_ws: false + service_config_settings: + map_merge: + - get_attr: [HAProxyBase, role_data, service_config_settings] + - if: + - glance_api_proxy_enabled + - cinder_volume: + cinder::glance::glance_api_servers: *glance_api_edge_uri + nova_compute: + nova::glance_api_servers: *glance_api_edge_uri + - {}