From ba44524d4603b9f53a06e44af80b46a24661bdb1 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Tue, 25 Apr 2017 15:13:38 +0000 Subject: Fix dependencies for PreConfig/PostConfig resources We have a circular dependency errror since https://review.openstack.org/#/c/452734/ landed. This adjusts the dependencies to ensure we run pre-config before the first puppet deploy step, and removes the duplicate declaration of the ControllerPostConfig resource. Also we ensure the first container step always depends on the same step puppet deploy. Change-Id: I70c5a39fb36b951bdeb04c15bddac7d00eebf08a Closes-Bug: #1686098 --- docker/docker-steps.j2 | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'docker') diff --git a/docker/docker-steps.j2 b/docker/docker-steps.j2 index d41b1056..1d5605b2 100644 --- a/docker/docker-steps.j2 +++ b/docker/docker-steps.j2 @@ -256,14 +256,12 @@ resources: # BEGIN BAREMETAL CONFIG STEPS - {% if role.name == 'Controller' %} - ControllerPreConfig: - type: OS::TripleO::Tasks::ControllerPreConfig + {{role.name}}PreConfig: + type: OS::TripleO::Tasks::{{role.name}}PreConfig properties: - servers: {get_param: [servers, Controller]} + servers: {get_param: [servers, {{role.name}}]} input_values: update_identifier: {get_param: DeployIdentifier} - {% endif %} {{role.name}}Config: type: OS::TripleO::{{role.name}}Config @@ -309,10 +307,12 @@ resources: type: OS::Heat::StructuredDeploymentGroup {% if step == 1 %} depends_on: - - {{role.name}}PreConfig - {{role.name}}KollaJsonDeployment - {{role.name}}GenPuppetDeployment - {{role.name}}GenerateConfigDeployment + {%- for dep in roles %} + - {{dep.name}}Deployment_Step{{step}} # baremetal steps of the same level run first + {%- endfor %} {% else %} depends_on: {% for dep in roles %} @@ -353,15 +353,4 @@ resources: properties: servers: {get_param: [servers, {{role.name}}]} - {% if role.name == 'Controller' %} - ControllerPostConfig: - depends_on: - - ControllerExtraConfigPost - type: OS::TripleO::Tasks::ControllerPostConfig - properties: - servers: {get_param: [servers, Controller]} - input_values: - update_identifier: {get_param: DeployIdentifier} - {% endif %} - {% endfor %} -- cgit 1.2.3-korg