Allow configuring distributed image import

Glance has recently added distributed image import support where
a new parameter 'worker_self_reference_url' has been added by which
other workers will get to know how to contact the worker which has
staged the image.

In this patch, adding configuration of 'worker_self_reference_url'
by providing it the internal API URL for each node where glance api
will run when glance-direct method of image-import is enabled.

Change-Id: I2b5aba62e11133981569b2576ba99df64cea20ba
This commit is contained in:
Pranali Deore 2021-03-24 11:45:06 +05:30
parent 0835d2a25c
commit 46027a8f25
3 changed files with 22 additions and 0 deletions

View File

@ -598,6 +598,9 @@ outputs:
- tripleo::profile::base::glance::netapp::netapp_share: {get_param: NetappShareLocation}
glance::api::filesystem_store_metadata_file: '/etc/glance/glance-metadata-file.json'
glance::api::filesystem_store_file_perm: '0644'
- if:
- contains: ['glance-direct', {get_param: GlanceEnabledImportMethods}]
- glance::api::worker_self_reference_url: {get_param: [EndpointMap, GlanceInternal, uri_no_suffix]}
- if:
- not: {equals: [{get_param: GlanceDiskFormats}, []]}
- glance::api::disk_formats: {get_param: GlanceDiskFormats}

View File

@ -30,6 +30,12 @@ parameters:
EnableInternalTLS:
type: boolean
default: false
GlanceEnabledImportMethods:
default: 'web-download'
description: >
List of enabled Image Import Methods. Valid values in the list are
'glance-direct', 'web-download', or 'copy-image'
type: comma_delimited_list
resources:
GlanceApiBase:
@ -71,3 +77,9 @@ outputs:
cinder::glance::glance_api_servers: *glance_api_edge_uri
nova_compute:
nova::glance::endpoint_override: *glance_api_edge_uri
config_settings:
map_merge:
- get_attr: [GlanceApiBase, role_data, config_settings]
- if:
- contains: ['glance-direct', {get_param: GlanceEnabledImportMethods}]
- glance::api::worker_self_reference_url: *glance_api_edge_uri

View File

@ -0,0 +1,7 @@
---
features:
- |
To support Glance Distributed Image Import, adding configuration of
``worker_self_reference_url`` by providing the internal API URL for
each node where glance api will run with glance-direct method of
image-import is enabled.