diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-08-18 15:45:07 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-08-18 15:45:07 +0000 |
commit | 388a6f28fa51d3f0931e87ef99809eb43e02c772 (patch) | |
tree | 3e570eb6d83ee1bbb91dd8d307482481ec45b92a /extraconfig/tasks/aodh_data_migration.sh | |
parent | 67586863cf1ec984c76fe02966f5fea1a8f1a548 (diff) | |
parent | 420f786a45bcd0e85c33d66d350d0e7f148f7074 (diff) |
Merge "Upgrade scripts to migrate aodh alarm data"
Diffstat (limited to 'extraconfig/tasks/aodh_data_migration.sh')
-rw-r--r-- | extraconfig/tasks/aodh_data_migration.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/extraconfig/tasks/aodh_data_migration.sh b/extraconfig/tasks/aodh_data_migration.sh new file mode 100644 index 00000000..d4c29673 --- /dev/null +++ b/extraconfig/tasks/aodh_data_migration.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# This delivers the aodh data migration script to be invoked as part of the tripleo +# major upgrade workflow to migrate all the alarm data from mongodb to mysql. +# This needs to run post controller node upgrades so new aodh mysql db configured and +# running. +# +set -eu + +#Get existing mongodb connection +MONGO_DB_CONNECTION="$(crudini --get /etc/ceilometer/ceilometer.conf database connection)" + +# Get the aodh database string from hiera data +MYSQL_DB_CONNECTION="$(crudini --get /etc/aodh/aodh.conf database connection)" + +#Run migration +/usr/bin/aodh-data-migration --nosql-conn $MONGO_DB_CONNECTION --sql-conn $MYSQL_DB_CONNECTION + + |