summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSofer Athlan-Guyot <sathlang@redhat.com>2017-04-03 18:28:21 +0200
committermarios <marios@redhat.com>2017-04-04 11:44:43 +0300
commitd286892c785b8b81a866ea3c6a459d1fc4a347e8 (patch)
treeb0f018e293faf2b2ff15bb8e8afef214d50e053f
parent0b11bcee715dda0410e98960874cb9e0ad4a6a35 (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
-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}}