Only run rolling upgrade for neutron, vpnaas, fwaas

Due to only neutron, vpnass and fwaas have supported for rolling upgrade
database migration, this patch set add --subproject argument to limited
the upgrade to these.

Co-Authored-By: Ha Manh Dong <donghm@vn.fujitsu.com>
Change-Id: I007e0068622fd630eb9f2f29b604015376ae7cd3
Implements: blueprint apply-service-upgrade-procedure
This commit is contained in:
Duong Ha-Quang 2018-05-17 16:26:41 +07:00 committed by Ha Manh Dong
parent 25f2e6b754
commit 4f4de70594
1 changed files with 8 additions and 2 deletions

View File

@ -22,12 +22,18 @@ fi
# of the KOLLA_UPGRADE variable being set, including empty.
if [[ "${!KOLLA_UPGRADE[@]}" ]]; then
if [[ "${!NEUTRON_DB_EXPAND[@]}" ]]; then
DB_ACTION="--expand"
echo "Expanding database"
neutron-db-manage upgrade --expand
fi
if [[ "${!NEUTRON_DB_CONTRACT[@]}" ]]; then
DB_ACTION="--contract"
echo "Contracting database"
neutron-db-manage upgrade --contract
fi
if [[ "${!NEUTRON_ROLLING_UPGRADE_SERVICES[@]}" ]]; then
for service in ${NEUTRON_ROLLING_UPGRADE_SERVICES}; do
neutron-db-manage --subproject $service upgrade $DB_ACTION
done
fi
exit 0
fi