From 3894f1c0ae8f865ea760455edc40f00dc100805d Mon Sep 17 00:00:00 2001 From: Jiri Stransky Date: Fri, 26 Feb 2016 14:53:29 +0100 Subject: 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 --- extraconfig/tasks/major_upgrade_pacemaker.yaml | 2 ++ extraconfig/tasks/major_upgrade_pacemaker_migrations.sh | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 extraconfig/tasks/major_upgrade_pacemaker_migrations.sh (limited to 'extraconfig') 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. -- cgit 1.2.3-korg