This patch swaps the order of doing api_db sync with db_sync.
The API database migration should be run before the migrations for
the main/cell databases. This is because the former contains
information about how to find and connect to the latter.
This was discovered in Rocky since we added a data model change
(a new column to the cell_mappings table) that depends on db sync
being run after having added this new column to the api_db (i.e running
api_db sync before db sync). The data model change was the first time
where the actual sync order became meaningful.
This has been correctly done in devstack and the fact that grenade was
doing the db sync before api_db sync was hidden by the fact that
devstack had run at least once before reaching this part of grenade,
which meant that the database was already initialized.
Reviewed: https:/ /review. openstack. org/559358 /git.openstack. org/cgit/ openstack- dev/grenade/ commit/ ?id=dc7f4a4ba56 97d5a73a1e656d4 a1717964324eab
Committed: https:/
Submitter: Zuul
Branch: master
commit dc7f4a4ba5697d5 a73a1e656d4a171 7964324eab
Author: Surya Seetharaman <email address hidden>
Date: Fri Apr 6 17:26:36 2018 +0200
Do the api_db sync before db sync
This patch swaps the order of doing api_db sync with db_sync.
The API database migration should be run before the migrations for
the main/cell databases. This is because the former contains
information about how to find and connect to the latter.
This was discovered in Rocky since we added a data model change
(a new column to the cell_mappings table) that depends on db sync
being run after having added this new column to the api_db (i.e running
api_db sync before db sync). The data model change was the first time
where the actual sync order became meaningful.
This has been correctly done in devstack and the fact that grenade was
doing the db sync before api_db sync was hidden by the fact that
devstack had run at least once before reaching this part of grenade,
which meant that the database was already initialized.
Change-Id: Ic790ef7c3531c2 b67262131052479 7548246b2ef
Closes-Bug: #1761775