tripleo-heat-templates/extraconfig/tasks/major_upgrade_pacemaker_migrations.sh
Pradeep Kilambi 2018c38ed4 Deploy Aodh services, replacing Ceilometer Alarm
Ceilometer Alarm is deprecated in Liberty by Aodh.

This patch:
* manage Aodh Keystone resources
* deploy Aodh API under WSGI, Notifier, Listener and Evaluator
* manage new parameters to customize Aodh deployment
* uses ceilometer DB for the upgrade path
* pacemaker config
* Add migration logic to remove pcs resources

Depends-On: I5333faa72e52d2aa2a622ac2d4b60825aadc52b5
Depends-On: Ib6c9c4c35da3fb55e0ca8e2d5a58ebaf4204d792

Co-Authored-By: Emilien Macchi <emilien@redhat.com>

Change-Id: Ib47a22884afb032ebc1655e1a4a06bfe70249134
2016-03-20 10:27:21 -04:00

40 lines
1.9 KiB
Bash

#!/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.
function remove_ceilometer_alarm {
if pcs status | grep openstack-ceilometer-alarm; then
# Disable pacemaker resources for ceilometer-alarms
pcs resource disable openstack-ceilometer-alarm-evaluator
check_resource openstack-ceilometer-alarm-evaluator stopped 600
pcs resource delete openstack-ceilometer-alarm-evaluator
pcs resource disable openstack-ceilometer-alarm-notifier
check_resource openstack-ceilometer-alarm-notifier stopped 600
pcs resource delete openstack-ceilometer-alarm-notifier
# remove constraints
pcs constraint remove ceilometer-delay-then-ceilometer-alarm-evaluator-constraint
pcs constraint remove ceilometer-alarm-evaluator-with-ceilometer-delay-colocation
pcs constraint remove ceilometer-alarm-evaluator-then-ceilometer-alarm-notifier-constraint
pcs constraint remove ceilometer-alarm-notifier-with-ceilometer-alarm-evaluator-colocation
pcs constraint remove ceilometer-alarm-notifier-then-ceilometer-notification-constraint
pcs constraint remove ceilometer-notification-with-ceilometer-alarm-notifier-colocation
fi
# uninstall openstack-ceilometer-alarm package
yum -y remove openstack-ceilometer-alarm
}