Migrate flavour data at migration 291

It's a little hacky but saves checking the logs for a failed upgrade
and then applying the migration and re-doing it. (Which would be
complicated due to the way handle_results works).

Change-Id: I8fd0c206c027f8cf984ba9fbd011cb6c6277f2b7
This commit is contained in:
Joshua Hesketh 2015-04-21 17:25:55 +10:00
parent 9e8ddc0e1d
commit a209001e3f
1 changed files with 8 additions and 0 deletions

View File

@ -115,6 +115,14 @@ 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
sudo /sbin/ip netns exec nonet `dirname $0`/nova-manage-wrapper.sh $VENV_PATH --config-file $WORKING_DIR_PATH/nova-$1.conf --verbose migrate-flavor-data
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=$?