Add DeployIdentifier to Nova discover hosts container

Resolves an issue during scale out where the Nova init
container that runs discover hosts wasn't executing on a Heat
stack update if the container name and configs all stayed the same.

Change-Id: Ie2ecd3dbddb1cf3ee5bba6f7b33e11bc9b6b8b4e
Closes-bug: 1733966
This commit is contained in:
Dan Prince 2017-11-22 17:02:19 -05:00
parent eeabc17247
commit 263ea5e95c
1 changed files with 13 additions and 0 deletions

View File

@ -43,6 +43,12 @@ parameters:
default: false
description: Remove package if the service is being disabled during upgrade
type: boolean
DeployIdentifier:
default: ''
type: string
description: >
Setting this to a unique value will re-run any deployment tasks which
perform configuration on a Heat stack-update.
conditions:
@ -289,6 +295,13 @@ outputs:
- /var/lib/docker-config-scripts/nova_api_discover_hosts.sh:/nova_api_discover_hosts.sh:ro
user: root
command: "/usr/bin/bootstrap_host_exec nova_api /nova_api_discover_hosts.sh"
environment:
# NOTE: this should force this container to re-run on each
# update (scale-out, etc.)
- list_join:
- ''
- - 'TRIPLEO_DEPLOY_IDENTIFIER='
- {get_param: DeployIdentifier}
metadata_settings:
get_attr: [NovaApiBase, role_data, metadata_settings]
host_prep_tasks: {get_attr: [NovaApiLogging, host_prep_tasks]}