aboutsummaryrefslogtreecommitdiffstats
path: root/puppet/major_upgrade_steps.j2.yaml
diff options
context:
space:
mode:
authorSteven Hardy <shardy@redhat.com>2017-01-30 10:17:53 +0000
committerSteven Hardy <shardy@redhat.com>2017-02-03 11:43:47 +0000
commitefa4c0ffd2000c0b2f14679caaf781e28150f248 (patch)
tree0ed4475eb13139f87c55c266b980d5fcadd9fa2c /puppet/major_upgrade_steps.j2.yaml
parent87af02d67336ff26c47f67c40df23dad9e66b7fd (diff)
Simplify/fix config enabled conditions for upgrades
We should enable each kind of upgrade per role, not per step so rework the conditions, and also only apply it to the deployment (to save the round-trip to the nodes applying an empty config) but don't disable the *Config resources as the overhead of these is small, and we reference the Step1 config in the outputs, even if it's empty. Change-Id: Iee2f1fb5b1d8b0b6001c6ab0f2a4ef2858cef281 Partially-Implements: blueprint overcloud-upgrades-per-service
Diffstat (limited to 'puppet/major_upgrade_steps.j2.yaml')
-rw-r--r--puppet/major_upgrade_steps.j2.yaml18
1 files changed, 6 insertions, 12 deletions
diff --git a/puppet/major_upgrade_steps.j2.yaml b/puppet/major_upgrade_steps.j2.yaml
index 458407af..00f863e4 100644
--- a/puppet/major_upgrade_steps.j2.yaml
+++ b/puppet/major_upgrade_steps.j2.yaml
@@ -19,31 +19,27 @@ parameters:
conditions:
# Conditions to disable any steps where the task list is empty
-{% for step in range(0, upgrade_steps_max) %}
- {% for role in roles %}
- UpgradeBatchConfig_Step{{step}}Enabled:
+{%- for role in roles %}
+ {{role.name}}UpgradeBatchConfigEnabled:
not:
equals:
- {get_param: [role_data, {{role.name}}, upgrade_batch_tasks]}
- []
- UpgradeConfig_Step{{step}}Enabled:
+ {{role.name}}UpgradeConfigEnabled:
not:
equals:
- {get_param: [role_data, {{role.name}}, upgrade_tasks]}
- []
- {% endfor %}
-{% endfor %}
+{%- endfor %}
resources:
# Upgrade Steps for all roles, batched updates
-# FIXME(shardy): would be nice to make the number of steps configurable
{% for step in range(0, upgrade_steps_max) %}
{% for role in roles %}
# Step {{step}} resources
{{role.name}}UpgradeBatchConfig_Step{{step}}:
type: OS::TripleO::UpgradeConfig
- condition: UpgradeBatchConfig_Step{{step}}Enabled
# The UpgradeConfig resources could actually be created without
# serialization, but the event output is easier to follow if we
# do, and there should be minimal performance hit (creating the
@@ -60,7 +56,7 @@ resources:
{{role.name}}UpgradeBatch_Step{{step}}:
type: OS::Heat::StructuredDeploymentGroup
- condition: UpgradeBatchConfig_Step{{step}}Enabled
+ condition: {{role.name}}UpgradeBatchConfigEnabled
{% if step > 0 %}
depends_on:
{% for dep in roles %}
@@ -83,13 +79,11 @@ resources:
{% endfor %}
# Upgrade Steps for all roles
-# FIXME(shardy): would be nice to make the number of steps configurable
{% for step in range(0, upgrade_steps_max) %}
{% for role in roles %}
# Step {{step}} resources
{{role.name}}UpgradeConfig_Step{{step}}:
type: OS::TripleO::UpgradeConfig
- condition: UpgradeConfig_Step{{step}}Enabled
# The UpgradeConfig resources could actually be created without
# serialization, but the event output is easier to follow if we
# do, and there should be minimal performance hit (creating the
@@ -112,7 +106,7 @@ resources:
{% if not role.disable_upgrade_deployment|default(false) %}
{{role.name}}Upgrade_Step{{step}}:
type: OS::Heat::StructuredDeploymentGroup
- condition: UpgradeConfig_Step{{step}}Enabled
+ condition: {{role.name}}UpgradeConfigEnabled
depends_on:
{% if step > 0 %}
{% for dep in roles %}