Override nova's glance endpoint only when necessary

nova::glance_api_servers is deprecated because the corresponding nova
parameter is deprecated. There is a new nova::glance_endpoint_override,
but it should be set only in situations where the intent is to *not*
use ksa to discover glance's endpoint. For example, in a DCN/Edge
deployment, we override the endpoint to force nova to use the glance
service running at the edge site.

Change-Id: I42af3e39da76ae94ca7bbf2797f776c28a75f7e7
Depends-On: Ib7fac4f37ef02d8f577abc98e4cc78b750caba54
This commit is contained in:
Alan Bishop 2020-02-14 10:57:17 -08:00
parent cfa808af7b
commit cda3c9b340
3 changed files with 25 additions and 2 deletions

View File

@ -78,5 +78,5 @@ outputs:
- cinder_volume:
cinder::glance::glance_api_servers: *glance_api_edge_uri
nova_compute:
nova::glance_api_servers: *glance_api_edge_uri
nova::glance_endpoint_override: *glance_api_edge_uri

View File

@ -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')}: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_endpoint_override: *glance_api_edge_uri
- {}

View File

@ -375,7 +375,6 @@ outputs:
nova::db::database_max_retries: -1
nova::db::sync::db_sync_timeout: {get_param: DatabaseSyncTimeout}
nova::db::sync_api::db_sync_timeout: {get_param: DatabaseSyncTimeout}
nova::glance_api_servers: {get_param: [EndpointMap, GlanceInternal, uri]}
nova::use_ipv6: {get_param: NovaIPv6}
nova::network::neutron::neutron_ovs_bridge: {get_param: NovaOVSBridge}
nova::cron::archive_deleted_rows::minute: {get_param: NovaCronArchiveDeleteRowsMinute}