diff options
author | Jiri Stransky <jistr@redhat.com> | 2016-02-26 14:53:29 +0100 |
---|---|---|
committer | Jiri Stransky <jistr@redhat.com> | 2016-03-03 14:44:06 +0100 |
commit | 3894f1c0ae8f865ea760455edc40f00dc100805d (patch) | |
tree | 61784a957477a851b90f7d2dc61cc44e52d4139b /extraconfig | |
parent | 8411e5a5bc6855d46522122710439e0d2623a2aa (diff) |
Function library for major upgrades
This commit introduces a bash file to be sourced into major upgrade
scripts. Into this file we can put specific pieces of migration logic in
the form of bash functions, which can then be called from the upgrade
scripts.
Change-Id: Ibf7aa84d3880e9218c488dec9d707300e1784744
Diffstat (limited to 'extraconfig')
-rw-r--r-- | extraconfig/tasks/major_upgrade_pacemaker.yaml | 2 | ||||
-rw-r--r-- | extraconfig/tasks/major_upgrade_pacemaker_migrations.sh | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/extraconfig/tasks/major_upgrade_pacemaker.yaml b/extraconfig/tasks/major_upgrade_pacemaker.yaml index 1080fd18..1dc4b0f0 100644 --- a/extraconfig/tasks/major_upgrade_pacemaker.yaml +++ b/extraconfig/tasks/major_upgrade_pacemaker.yaml @@ -40,6 +40,7 @@ resources: params: UPGRADE_LEVEL_NOVA_COMPUTE: {get_param: UpgradeLevelNovaCompute} - get_file: pacemaker_common_functions.sh + - get_file: major_upgrade_pacemaker_migrations.sh - get_file: major_upgrade_controller_pacemaker_1.sh ControllerPacemakerUpgradeDeployment_Step1: @@ -57,6 +58,7 @@ resources: list_join: - '' - - get_file: pacemaker_common_functions.sh + - get_file: major_upgrade_pacemaker_migrations.sh - get_file: major_upgrade_controller_pacemaker_2.sh ControllerPacemakerUpgradeDeployment_Step2: diff --git a/extraconfig/tasks/major_upgrade_pacemaker_migrations.sh b/extraconfig/tasks/major_upgrade_pacemaker_migrations.sh new file mode 100644 index 00000000..7fd26945 --- /dev/null +++ b/extraconfig/tasks/major_upgrade_pacemaker_migrations.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Special pieces of upgrade migration logic go into this +# file. E.g. Pacemaker cluster transitions for existing deployments, +# matching changes to overcloud_controller_pacemaker.pp (Puppet +# handles deployment, this file handles migrations). +# +# This file shouldn't execute any action on its own, all logic should +# be wrapped into bash functions. Upgrade scripts will source this +# file and call the functions defined in this file where appropriate. +# +# The migration functions should be idempotent. If the migration has +# been already applied, it should be possible to call the function +# again without damaging the deployment or failing the upgrade. |