From 4217767d8782abae02b11f553fc14daf7cd72916 Mon Sep 17 00:00:00 2001 From: Oliver Walsh Date: Fri, 20 Oct 2017 23:27:15 +0100 Subject: 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) --- common/deploy-steps.j2 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'common/deploy-steps.j2') diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 5c923a99..542bf720 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -194,6 +194,7 @@ resources: kolla_config: {get_param: [role_data, {{role.name}}, kolla_config]} bootstrap_server_id: {get_param: [servers, {{primary_role_name}}, '0']} puppet_step_config: {get_param: [role_data, {{role.name}}, step_config]} + docker_config_scripts: {get_param: [role_data, {{role.name}}, docker_config_scripts]} tasks: # Join host_prep_tasks with the other per-host configuration list_concat: @@ -217,6 +218,11 @@ resources: # FIXME: can we move docker-puppet somewhere so it's installed via a package? - name: Write docker-puppet.py copy: content="{{docker_puppet_script}}" dest=/var/lib/docker-puppet/docker-puppet.py force=yes mode=0600 + - name: Create /var/lib/docker-config-scripts + file: path=/var/lib/docker-config-scripts state=directory + - name: Write docker config scripts + copy: content="{{item.value.content}}" dest="/var/lib/docker-config-scripts/{{item.key}}" force=yes mode="{{item.value.mode|default('0600', true)}}" + with_dict: "{{docker_config_scripts}}" # Here we are dumping all the docker container startup configuration data # so that we can have access to how they are started outside of heat # and docker-cmd. This lets us create command line tools to test containers. -- cgit 1.2.3-korg