diff options
author | Oliver Walsh <owalsh@redhat.com> | 2017-10-20 23:27:15 +0100 |
---|---|---|
committer | Oliver Walsh <owalsh@redhat.com> | 2017-11-10 09:25:25 +0000 |
commit | 4217767d8782abae02b11f553fc14daf7cd72916 (patch) | |
tree | 40a20fb6bd90c57faed62de6192d3b208a6a0194 /common/services.yaml | |
parent | 690b938c58af1446bd27c34b17fa45e865241e99 (diff) |
Refactor cellv2 host discovery logic to avoid races
The compute service list is polled until all expected hosts are reported or a
timeout occurs (600s).
Adds a cellv2_discovery flag to puppet services. Used to generate a list of
hosts that should have cellv2 host mappings.
Adds a canonical fqdn and that should match the fqdn reported by a host.
Adds the ability to upload a config script for docker config instead of using
complex bash on-liners.
Closes-bug: 1720821
Change-Id: I33e2f296526c957cb5f96dff19682a4e60c6a0f0
(cherry picked from commit 61fcfca045aeb5be1ee280d8dd9c260fb39b9084)
Diffstat (limited to 'common/services.yaml')
-rw-r--r-- | common/services.yaml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/common/services.yaml b/common/services.yaml index a0015c7e..f7062066 100644 --- a/common/services.yaml +++ b/common/services.yaml @@ -89,6 +89,31 @@ resources: service_names: {get_attr: [ServiceChain, role_data, service_names]} docker_config: {get_attr: [ServiceChain, role_data, docker_config]} + DockerConfigScripts: + type: OS::Heat::Value + properties: + type: json + value: + yaql: + expression: + # select 'docker_config_scripts' only from services that have it + coalesce($.data.service_names, []).zip(coalesce($.data.docker_config_scripts, [])).where($[1] != null).select($[1]).reduce($1.mergeWith($2), {}) + data: + service_names: {get_attr: [ServiceChain, role_data, service_names]} + docker_config_scripts: {get_attr: [ServiceChain, role_data, docker_config_scripts]} + + CellV2Discovery: + type: OS::Heat::Value + properties: + type: boolean + value: + yaql: + expression: + # If any service in this role requires cellv2_discovery then this value is true + coalesce($.data.cellv2_discovery, []).contains(true) + data: + cellv2_discovery: {get_attr: [ServiceChain, role_data, cellv2_discovery]} + LoggingSourcesConfig: type: OS::Heat::Value properties: @@ -282,5 +307,7 @@ outputs: puppet_config: {get_attr: [PuppetConfig, value]} kolla_config: {get_attr: [KollaConfig, value]} docker_config: {get_attr: [DockerConfig, value]} + docker_config_scripts: {get_attr: [DockerConfigScripts, value]} docker_puppet_tasks: {get_attr: [DockerPuppetTasks, value]} host_prep_tasks: {get_attr: [HostPrepTasks, value]} + cellv2_discovery: {get_attr: [CellV2Discovery, value]} |