aboutsummaryrefslogtreecommitdiffstats
path: root/puppet/puppet-steps.j2
diff options
context:
space:
mode:
authorMichele Baldessari <michele@acksyn.org>2017-03-17 15:36:50 +0100
committerMichele Baldessari <michele@acksyn.org>2017-03-18 22:38:25 +0100
commit557b0214162ac60b65db93deb4af71dee14a28dd (patch)
treedcef7f4c467608a509d85900a2a951be4eb33fb8 /puppet/puppet-steps.j2
parentbc8dcd1054f95620d69c4595eebb9157df9c7e7b (diff)
Make sure PrePuppet runs before any Deployment_Step
We used to have this in mitaka: https://github.com/openstack/tripleo-heat-templates/blob/stable/mitaka/puppet/controller-post.yaml#L45 but we lost it along the way. The problem without this change is that we are open to the following race: 1) ControllerDeployment_Step1 is started and manages to do a successful "systemctl start pacemaker" 2) PrePuppet gets called and in the HA deployment calls pacemaker_maintenance_mode.sh 3) pacemaker_maintenance_mode.sh will set the maintenance-mode=true property because the pacemaker service is already up: https://github.com/openstack/tripleo-heat-templates/blob/master/extraconfig/tasks/pacemaker_maintenance_mode.sh#L8-L9 4) If the maintenance property is set to true at this stage, the creation of any resource will take place but they won't really start. Note that this is not a straight cherry pick from commit bae48e60b3cb9b5f21490997ca39c1e0e23fd195 because in ocata only ControllerPrePuppet exists and not {{role.name}}PrePuppet like in pike. Change-Id: Icb7495edd00385b2975dd42f63085d20292ef9a9 Closes-Bug: #1673795 Co-Authored-By: Jiri Stransky <jstransk@redhat.com>
Diffstat (limited to 'puppet/puppet-steps.j2')
-rw-r--r--puppet/puppet-steps.j24
1 files changed, 3 insertions, 1 deletions
diff --git a/puppet/puppet-steps.j2 b/puppet/puppet-steps.j2
index 4eca2333..cfa70f79 100644
--- a/puppet/puppet-steps.j2
+++ b/puppet/puppet-steps.j2
@@ -43,7 +43,9 @@
{% for step in range(1, 6) %}
{{role.name}}Deployment_Step{{step}}:
type: OS::Heat::StructuredDeploymentGroup
- {% if step == 1 %}
+ {% if step == 1 and role.name == 'Controller' %}
+ depends_on: [ControllerPrePuppet, {{role.name}}PreConfig, {{role.name}}ArtifactsDeploy]
+ {% elif step == 1 and role.name != 'Controller' %}
depends_on: [{{role.name}}PreConfig, {{role.name}}ArtifactsDeploy]
{% else %}
depends_on: