Merge "Apply neutron database migration"

This commit is contained in:
Jenkins
2017-02-24 10:31:46 +00:00
committed by Gerrit Code Review

View File

@@ -6,3 +6,17 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head
exit 0
fi
# Migrate database and exit if KOLLA_UPGRADE variable is set. This catches all cases
# of the KOLLA_UPGRADE variable being set, including empty.
if [[ "${!KOLLA_UPGRADE[@]}" ]]; then
if [[ "${!NEUTRON_DB_EXPAND[@]}" ]]; then
echo "Expanding database"
neutron-db-manage upgrade --expand
fi
if [[ "${!NEUTRON_DB_CONTRACT[@]}" ]]; then
echo "Contracting database"
neutron-db-manage upgrade --contract
fi
exit 0
fi