db sync must be run once from the bootstrap node
Bug #1339047 reported by
Michael Kerrin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
High
|
Adam Gandelman |
Bug Description
For each service we need to run db sync once only to initlaize the database. In an HA setup we run the risk of the migration stepping on each other in which case it can case the db sync call to hang on one machine, error out out on an other controller.
Changed in tripleo: | |
importance: | Undecided → High |
Changed in tripleo: | |
assignee: | Michael Kerrin (michael-kerrin-w) → Adam Gandelman (gandelman-a) |
Changed in tripleo: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This is true for initial bootstrapping of the cloud but also post-rebuild. Currently, the boot-stack element calls a 'reset-db' script that creates databases and conditionally migrates them from the bootstrap node and only once (based on existence of a flag file). Note the argument to migrate the db here is never passed and it currently only initializes empty databases. Currently, DB migration really happens as part of the indvidual service elements post-configure, with the exception of neutron which actually *does* get migrated from reset-db (for some reason?)
os-create-db is idempotent enough to run every execution, and so are the migrations (in theory). I think we should be good to update boot-stack to alwasy run migrations only from the bootstrap node, and remove the duplicate calls from the individual service elements.