summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authormarios <marios@redhat.com>2017-09-26 15:33:13 +0300
committerMarios Andreou <marios@redhat.com>2017-10-04 06:35:26 +0000
commita2ab21881c4b2a61cb09b48cf8ffe12600042338 (patch)
tree9d36e3395f91604eaa1574523b1f66a4339634c9 /common
parentf2d8fa73f6cec2e3d754dbd9a9973918cc9832d0 (diff)
Disable role host_prep_tasks on controlplane upgrade
During the controlplane upgrade the host_prep_tasks are being executed on the disable_upgrade_deployment roles too. This sets the role specific host_prep_tasks to an empty list for those roles during an upgrade, as executing them during the controlplane upgrade (during -e major-upgrade-composable-steps-docker.yaml) causes problems. They will be executed as part of the non controller upgrade as they are written to the stack outputs to be used as ansible playbooks (see bug 1708115 for more info on this) Change-Id: I42c963440b9b1e8222097c3d4e83ffcbe820886c Closes-Bug: 1719604 (cherry picked from commit 684267a7a4fbff489f6324020289afbdcaaca8f5)
Diffstat (limited to 'common')
-rw-r--r--common/deploy-steps.j27
1 files changed, 7 insertions, 0 deletions
diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2
index c076a09d..a1bd8826 100644
--- a/common/deploy-steps.j2
+++ b/common/deploy-steps.j2
@@ -4,6 +4,9 @@
# On upgrade certain roles can be disabled for operator driven upgrades
# See major_upgrade_steps.j2.yaml and post-upgrade.j2.yaml
{%- set enabled_roles = roles -%}
+ {%- set is_upgrade = false -%}
+{%- else %}
+ {%- set is_upgrade = true -%}
{%- endif -%}
{%- set primary_role = [enabled_roles[0]] -%}
{%- for role in enabled_roles -%}
@@ -189,7 +192,11 @@ resources:
tasks:
# Join host_prep_tasks with the other per-host configuration
list_concat:
+{%- if is_upgrade|default(false) and role.disable_upgrade_deployment|default(false) %}
+ - []
+{%- else %}
- {get_param: [role_data, {{role.name}}, host_prep_tasks]}
+{%- endif %}
-
{%- raw %}
# Write the manifest for baremetal puppet configuration