db_sync code incompatible with Mariadb 10.0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack DBaaS (Trove) |
Fix Released
|
High
|
Victoria Martinez de la Cruz | ||
Liberty |
Fix Committed
|
High
|
Unassigned | ||
Mitaka |
Fix Committed
|
High
|
Unassigned | ||
Newton |
Fix Released
|
High
|
Victoria Martinez de la Cruz |
Bug Description
Installing trove (kilo version) and it fails when running trove-manage db_sync
OperationalError: (OperationalError) (1832, "Cannot change column 'datastore_
This is due to the current version of mariadb 10.0 being more strict about altering columns used in foreign key constraints.
Workaround:
1. Create trove database:
CREATE DATABASE trove;
GRANT ALL PRIVILEGES ON trove.* TO trove@'localhost' IDENTIFIED BY 'pass';
GRANT ALL PRIVILEGES ON trove.* TO trove@'%' IDENTIFIED BY 'pass';
2. Disable FK checks globally (affects all sessions):
use trove;
SET GLOBAL foreign_
3. Setup all config files on Trove controller, then run:
su -s /bin/sh -c "trove-manage db_sync" trove
4. Enable FK again
SET GLOBAL foreign_
Changed in trove: | |
importance: | Undecided → High |
status: | New → Confirmed |
milestone: | none → liberty-3 |
Changed in trove: | |
assignee: | nobody → Victoria Martinez de la Cruz (vkmc) |
Changed in trove: | |
status: | Confirmed → Triaged |
Changed in trove: | |
milestone: | liberty-3 → ongoing |
Changed in trove: | |
milestone: | ongoing → liberty-rc1 |
Changed in trove: | |
milestone: | next → newton-1 |
This is not blocking for Liberty-RC1