From 3bbf0e3e8de0fcea014d20587913fc463d0ed405 Mon Sep 17 00:00:00 2001 From: Joshua Hesketh Date: Fri, 10 Jul 2015 14:07:44 +1000 Subject: [PATCH] Migrate flavor data is only available in kilo Migrate the flavor data while on the kilo branch no that the function is no longer in master. Change-Id: I289539fe4bbfb7a452bae9698a76aeadb7e0da48 --- .../real_db_upgrade/nova_mysql_migrations.sh | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/turbo_hipster/task_plugins/real_db_upgrade/nova_mysql_migrations.sh b/turbo_hipster/task_plugins/real_db_upgrade/nova_mysql_migrations.sh index 945ef83..1b12d61 100755 --- a/turbo_hipster/task_plugins/real_db_upgrade/nova_mysql_migrations.sh +++ b/turbo_hipster/task_plugins/real_db_upgrade/nova_mysql_migrations.sh @@ -115,20 +115,6 @@ EOF for i in `seq $start_version $increment $end_version` do - # TODO(jhesketh): This is a bit of a hack until we update our datasets to - # have the flavour data migrated. We know 291 does the migration check - # so we'll migrate just before then - if [ $i == 291 ] - then - set -x - echo "MySQL counters before migrate_flavor_data:" - mysql -u $DB_USER --password=$DB_PASS $DB_NAME -e "show status like 'innodb%';" - sudo /sbin/ip netns exec nonet `dirname $0`/nova-manage-wrapper.sh $VENV_PATH --config-file $WORKING_DIR_PATH/nova-$1.conf --verbose db migrate_flavor_data --force - echo "MySQL counters after migrate_flavor_data:" - mysql -u $DB_USER --password=$DB_PASS $DB_NAME -e "show status like 'innodb%';" - set +x - fi - set -x sudo /sbin/ip netns exec nonet `dirname $0`/nova-manage-wrapper.sh $VENV_PATH --config-file $WORKING_DIR_PATH/nova-$1.conf --verbose db sync --version $i manage_exit=$? @@ -221,6 +207,20 @@ stable_release_db_sync() { git reset --hard remotes/origin/stable/kilo pip_requires db_sync "kilo" + + # TODO(jhesketh): This is a bit of a hack until we update our datasets to + # have the flavour data migrated. We have to do this before upgrading from + # kilo + if [ $i == 291 ] + then + set -x + echo "MySQL counters before migrate_flavor_data:" + mysql -u $DB_USER --password=$DB_PASS $DB_NAME -e "show status like 'innodb%';" + sudo /sbin/ip netns exec nonet `dirname $0`/nova-manage-wrapper.sh $VENV_PATH --config-file $WORKING_DIR_PATH/nova-kilo.conf --verbose db migrate_flavor_data --force + echo "MySQL counters after migrate_flavor_data:" + mysql -u $DB_USER --password=$DB_PASS $DB_NAME -e "show status like 'innodb%';" + set +x + fi fi # TODO(jhesketh): Add in Liberty here once released