From c56889100073baa367898093f844e3083fc82f3e Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Wed, 14 Dec 2016 14:09:36 +0000 Subject: Move UpgradeInitCommand to role templates We can't run this during the upgrade steps, because there are things which need to happen before any role configuration happens, e.g installing the new hiera heat-config hook, which must be done before e.g "ControllerDeployment" runs or the stack update hangs. Partially-Implements: blueprint overcloud-upgrades-per-service Change-Id: I365b57513590662c3f78a33dc625747f457c48c5 --- puppet/major_upgrade_steps.j2.yaml | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (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 f8dad433..8d954c09 100644 --- a/puppet/major_upgrade_steps.j2.yaml +++ b/puppet/major_upgrade_steps.j2.yaml @@ -15,36 +15,8 @@ parameters: Setting to a previously unused value during stack-update will trigger the Upgrade resources to re-run on all roles. - UpgradeInitCommand: - type: string - description: | - Command or script snippet to run on all overcloud nodes to - initialize the upgrade process. E.g. a repository switch. - default: '' - resources: - # For the UpgradeInit also rename /etc/resolv.conf.save for +bug/1567004 - UpgradeInitConfig: - type: OS::Heat::SoftwareConfig - properties: - group: script - config: - list_join: - - '' - - - "#!/bin/bash\n\n" - - "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n" - - get_param: UpgradeInitCommand - -{% for role in roles %} - {{role.name}}Upgrade_Init: - type: OS::Heat::StructuredDeploymentGroup - properties: - name: {{role.name}}Upgrade_Init - servers: {get_param: [servers, {{role.name}}]} - config: {get_resource: UpgradeInitConfig} -{% endfor %} - # Upgrade Steps for all roles # FIXME(shardy): would be nice to make the number of steps configurable {% for step in range(1, 8) %} @@ -56,10 +28,8 @@ resources: # serialization, but the event output is easier to follow if we # do, and there should be minimal performance hit (creating the # config is cheap compared to the time to apply the deployment). + {% if step > 1 %} depends_on: - {% if step == 1 %} - - {{role.name}}Upgrade_Init - {% else %} {% for dep in roles %} - {{dep.name}}Upgrade_Step{{step -1}} {% endfor %} -- cgit 1.2.3-korg