Migrate fails to downgrade database
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack DBaaS (Trove) |
Fix Released
|
Medium
|
Simon Chang |
Bug Description
trove-manage db_downgrade command fail to downgrade trove database to before v30. Here are the steps to replicate the issue, error details and workaround.
trove-manage db_sync
trove-manage db_downgrade 29
Migration script: 030_add_
Error:
TRACE root OperationalError: (OperationalError) (1025, "Error on rename of './trove/
Workaround: Delete the foreign key associated with the slave_of_id column in the instances table.
********
trove-manage db_downgrade 28
Migration script: 029_add_
Error:
TRACE root OperationalError: (OperationalError) (1025, "Error on rename of './trove/
Workaround: Delete the foreign key associated with the datastore_
********
trove-manage db_downgrade 26
Migration script: 027_add_
Error:
TRACE root IntegrityError: (IntegrityError) (1217, 'Cannot delete or update a parent row: a foreign key constraint fails') '\nDROP TABLE capabilities' ()
Workaround: Reverse the drop table sequence in the downgrade method of 027_add_
i.e. instead of drop_tables(
********
trove-manage db_downgrade 15
Migration script: 016_add_
Error:
TRACE root IntegrityError: (IntegrityError) (1217, 'Cannot delete or update a parent row: a foreign key constraint fails') '\nDROP TABLE datastores' ()
Workaround: Delete the foreign key associated with the datastore_id column in the datastore_versions table
description: | updated |
Changed in trove: | |
assignee: | nobody → Simon Chang (changsimon) |
Changed in trove: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → juno-3 |
Changed in trove: | |
milestone: | juno-3 → juno-rc1 |
Changed in trove: | |
status: | Fix Committed → Fix Released |
Changed in trove: | |
milestone: | juno-rc1 → 2014.2 |
Fix proposed to branch: master /review. openstack. org/113582
Review: https:/