aboutsummaryrefslogtreecommitdiffstats
path: root/puppet/major_upgrade_steps.j2.yaml
diff options
context:
space:
mode:
authorSofer Athlan-Guyot <sathlang@redhat.com>2017-04-03 18:28:21 +0200
committerAthlan-Guyot sofer <sathlang@redhat.com>2017-04-06 08:28:54 +0000
commit11389e5ac3c328fac7f4387e44aa12671d717f0e (patch)
tree11ac5c2479a6caf5e76a8b926da584e18ff0db60 /puppet/major_upgrade_steps.j2.yaml
parent011d000c05bee0a01c536521e21fdc3267941858 (diff)
Ensure upgrade step orchestration accross roles.
Currently we don't enforce step ordering across role, only within role. With custom role, we can reach a step5 on one role while the cluster is still at step3, breaking the contract announced in the README[1] where each step has a guarantied cluster state. We have to remove the conditional here as well as jinja has no way to access this information, but we need jinja to iterate over all enabled role to create the orchestration. This deals only with Upgrade tasks, there is another review to deal with UpgradeBatch tasks. [1] https://github.com/openstack/tripleo-heat-templates/blob/master/puppet/services/README.rst Closes-Bug: #1679486 Change-Id: Ibc6b64424cde56419fe82f984d3cc3620f7eb028 (cherry picked from commit d286892c785b8b81a866ea3c6a459d1fc4a347e8)
Diffstat (limited to 'puppet/major_upgrade_steps.j2.yaml')
-rw-r--r--puppet/major_upgrade_steps.j2.yaml14
1 files changed, 6 insertions, 8 deletions
diff --git a/puppet/major_upgrade_steps.j2.yaml b/puppet/major_upgrade_steps.j2.yaml
index 5aba90e8..e4d1e2a0 100644
--- a/puppet/major_upgrade_steps.j2.yaml
+++ b/puppet/major_upgrade_steps.j2.yaml
@@ -40,11 +40,6 @@ conditions:
equals:
- {get_param: [role_data, {{role.name}}, upgrade_batch_tasks]}
- []
- {{role.name}}UpgradeConfigEnabled:
- not:
- equals:
- - {get_param: [role_data, {{role.name}}, upgrade_tasks]}
- - []
{%- endfor %}
resources:
@@ -188,7 +183,6 @@ resources:
# do, and there should be minimal performance hit (creating the
# config is cheap compared to the time to apply the deployment).
{%- if step > 0 %}
- condition: {{role.name}}UpgradeConfigEnabled
{% if role.name in enabled_roles %}
depends_on:
- {{role.name}}Upgrade_Step{{step -1}}
@@ -204,9 +198,13 @@ resources:
{{role.name}}Upgrade_Step{{step}}:
type: OS::Heat::SoftwareDeploymentGroup
{%- if step > 0 %}
- condition: {{role.name}}UpgradeConfigEnabled
+ # Make sure we wait that all roles have finished their own
+ # previous step before going to the next, so we can guarantee
+ # state for each steps.
depends_on:
- - {{role.name}}Upgrade_Step{{step -1}}
+ {%- for role_inside in enabled_roles %}
+ - {{role_inside.name}}Upgrade_Step{{step -1}}
+ {%- endfor %}
{%- endif %}
properties:
name: {{role.name}}Upgrade_Step{{step}}