Also write an upgrade_tasks_playbook
authormarios <marios@redhat.com>
Fri, 4 Aug 2017 11:55:48 +0000 (14:55 +0300)
committerMarios Andreou <marios@redhat.com>
Tue, 15 Aug 2017 11:48:48 +0000 (11:48 +0000)
To get this to work upgrade_tasks need to be rewritten with 'when'
statements like the update tasks (in parent review from shardy).
So that we don't break the existing upgrades workflow, we add these
as part of the config download see the depends on

Related-Bug: 1708115
Depends-On: Ief593dc758a2ffe33c1cbcbda9289393fcf023e4
Change-Id: Ib01b96a2c26721747d81d98e3d57c4c388663004

common/deploy-steps.j2

index b36bb97..8d17c22 100644 (file)
@@ -11,6 +11,7 @@
 # primary role is: {{primary_role_name}}
 {% set deploy_steps_max = 6 -%}
 {% set update_steps_max = 6 -%}
+{% set upgrade_steps_max = 6 -%}
 
 heat_template_version: pike
 
@@ -337,4 +338,20 @@ outputs:
               with_sequence: count={{deploy_steps_max-1}}
               loop_control:
                 loop_var: step
+      upgrade_steps_tasks: |
+{%- for role in roles %}
+            - include: {{role.name}}/upgrade_tasks.yaml
+              when: role_name == '{{role.name}}'
+{%- endfor %}
+      upgrade_steps_playbook: |
+        - hosts: overcloud
+          tasks:
+            - include: upgrade_steps_tasks.yaml
+              with_sequence: count={{upgrade_steps_max-1}}
+              loop_control:
+                loop_var: step
+            - include: deploy_steps_tasks.yaml
+              with_sequence: count={{deploy_steps_max-1}}
+              loop_control:
+                loop_var: step