aboutsummaryrefslogtreecommitdiffstats
path: root/common/major_upgrade_steps.j2.yaml
diff options
context:
space:
mode:
authormarios <marios@redhat.com>2017-08-15 16:41:04 +0300
committermarios <marios@redhat.com>2017-09-20 14:26:05 +0300
commit10eed9c1ae1bfbf86361066736e3d17634770456 (patch)
treee2a2bcedefb49d433c10804d5b7e8793c3f04e1d /common/major_upgrade_steps.j2.yaml
parent5a7472c1696d9f173a1fd4387e349cda2eb44ff8 (diff)
Adds post_upgrade_tasks for any service post-upgrade ansible tasks
This adds a new config/deployment per role that will come after any post deploy steps. It drives the same ansible config as the upgrade_tasks but instead collects the post_upgrade_tasks for any service in the given role. The workflow is upgrade_tasks, then post deploy steps (either puppet/ or docker/ depending on the env) and then the post_upgrade_tasks added here. This is added to the pacemaker/cinder-volume.yaml service for now see the bug below for more info Change-Id: Iced34fecf02ebddc91df9302de54d2f4c2cab680 Closes-Bug: 1706951 (cherry picked from commit 2e182bffeeb099cb5e0b1747086fb0e0f57b7b5d)
Diffstat (limited to 'common/major_upgrade_steps.j2.yaml')
-rw-r--r--common/major_upgrade_steps.j2.yaml37
1 files changed, 37 insertions, 0 deletions
diff --git a/common/major_upgrade_steps.j2.yaml b/common/major_upgrade_steps.j2.yaml
index 5eb93d39..36b342f9 100644
--- a/common/major_upgrade_steps.j2.yaml
+++ b/common/major_upgrade_steps.j2.yaml
@@ -187,6 +187,43 @@ resources:
role_data: {get_param: role_data}
ctlplane_service_ips: {get_param: ctlplane_service_ips}
+{%- for step in range(0, upgrade_steps_max) %}
+ {%- for role in roles %}
+ {{role.name}}PostUpgradeConfig_Config{{step}}:
+ type: OS::TripleO::UpgradeConfig
+ depends_on:
+ {%- for role_inside in enabled_roles %}
+ {%- if step > 0 %}
+ - {{role_inside.name}}PostUpgradeConfig_Deployment{{step -1}}
+ {%- else %}
+ - AllNodesPostUpgradeSteps
+ {%- endif %}
+ {%- endfor %}
+ properties:
+ UpgradeStepConfig: {get_param: [role_data, {{role.name}}, post_upgrade_tasks]}
+ step: {{step}}
+ {%- endfor %}
+
+ {%- for role in enabled_roles %}
+ {{role.name}}PostUpgradeConfig_Deployment{{step}}:
+ type: OS::Heat::SoftwareDeploymentGroup
+ depends_on:
+ {%- for role_inside in enabled_roles %}
+ {%- if step > 0 %}
+ - {{role_inside.name}}PostUpgradeConfig_Deployment{{step -1}}
+ {%- else %}
+ - AllNodesPostUpgradeSteps
+ {%- endif %}
+ {%- endfor %}
+ properties:
+ servers: {get_param: [servers, {{role.name}}]}
+ config: {get_resource: {{role.name}}PostUpgradeConfig_Config{{step}}}
+ input_values:
+ role: {{role.name}}
+ update_identifier: {get_param: UpdateIdentifier}
+ {%- endfor %}
+{%- endfor %}
+
outputs:
# Output the config for each role, just use Step1 as the config should be
# the same for all steps (only the tag provided differs)