Run online data migrations for nova
Note that this is actually only required when going from mitaka->newton, but in order to land things very early in newton, we need this to be run. Since it's valid in mitaka too, we can go ahead and land it there, and then copy or move it to from-mitaka later. Change-Id: Ibc02acc60b1023039f2613f8949b95d55169fd30
This commit is contained in:
parent
009c1e1b5a
commit
379990af18
|
@ -96,6 +96,10 @@ RUN_JAVELIN=${RUN_JAVELIN:-True}
|
|||
# consider it a fail. Defaults to 30 seconds.
|
||||
SERVICE_TIMEOUT=${SERVICE_TIMEOUT:-30}
|
||||
|
||||
# Should we run any online migrations manually during the upgrade
|
||||
# process?
|
||||
FORCE_ONLINE_MIGRATIONS=${FORCE_ONLINE_MIGRATIONS:-True}
|
||||
|
||||
# Local variables:
|
||||
# mode: shell-script
|
||||
# End:
|
||||
|
|
|
@ -68,6 +68,11 @@ $NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF api_db sync || die $LINENO "A
|
|||
|
||||
iniset $NOVA_CONF upgrade_levels compute auto
|
||||
|
||||
if [[ "$FORCE_ONLINE_MIGRATIONS" == "True" ]]; then
|
||||
# Run "online" migrations that can complete before we start
|
||||
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db online_data_migrations || die $LINENO "Failed to run online_data_migrations"
|
||||
fi
|
||||
|
||||
# Start Nova
|
||||
start_nova_api
|
||||
start_nova
|
||||
|
@ -76,6 +81,11 @@ start_nova
|
|||
ensure_services_started nova-api nova-conductor nova-compute
|
||||
ensure_logs_exist n-api n-cond n-cpu
|
||||
|
||||
if [[ "$FORCE_ONLINE_MIGRATIONS" == "True" ]]; then
|
||||
# Run "online" migrations after we've got all the services running
|
||||
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db online_data_migrations || die $LINENO "Failed to run online_data_migrations"
|
||||
fi
|
||||
|
||||
set +o xtrace
|
||||
echo "*********************************************************************"
|
||||
echo "SUCCESS: End $0"
|
||||
|
|
Loading…
Reference in New Issue