From 87af02d67336ff26c47f67c40df23dad9e66b7fd Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Thu, 2 Feb 2017 12:03:03 +0000 Subject: Disable puppet on upgrade for roles not upgrading Where the role has disabled upgrades, we need to skip both the ansible and puppet steps. To do this we refactor the post.j2.yaml so that it can be included in the upgrade template with an adjusted list of roles. Note this requires https://review.openstack.org/#/c/425220/ - this change will be required for local testing of this patch (run mistral-db-mange populate after updating tripleo-common and restart the mistral services, or update your repos and re-run openstack undercloud install). Partially-Implements: blueprint overcloud-upgrades-per-service Change-Id: Ie7d0fa6fef3528bd93e6cde076b964ea8de3185a --- puppet/major_upgrade_steps.j2.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'puppet/major_upgrade_steps.j2.yaml') diff --git a/puppet/major_upgrade_steps.j2.yaml b/puppet/major_upgrade_steps.j2.yaml index eae85991..458407af 100644 --- a/puppet/major_upgrade_steps.j2.yaml +++ b/puppet/major_upgrade_steps.j2.yaml @@ -1,4 +1,5 @@ {% set upgrade_steps_max = 8 -%} +{% set enabled_roles = roles|rejectattr('disable_upgrade_deployment')|list -%} heat_template_version: ocata description: 'Upgrade steps for all roles' @@ -135,6 +136,19 @@ resources: {% endfor %} {% endfor %} + # Post upgrade deployment steps for all roles + # This runs the normal configuration (e.g puppet) steps unless upgrade + # is disabled for the role + AllNodesPostUpgradeSteps: + type: OS::TripleO::PostUpgradeSteps + depends_on: +{%- for dep in enabled_roles %} + - {{dep.name}}Upgrade_Step{{upgrade_steps_max - 1}} +{%- endfor %} + properties: + servers: {get_param: servers} + role_data: {get_param: role_data} + 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) -- cgit 1.2.3-korg