Migration testing with real data
The summit session identified the need to do migration tests with more than an empty database to catch consistency issues. Migration tests should insert sample data into the database to make sure that data is not lost, corrupted, and that the migrations succeed.
Blueprint information
- Status:
- Complete
- Approver:
- Russell Bryant
- Priority:
- High
- Drafter:
- Sean Dague
- Direction:
- Approved
- Assignee:
- Kurt Taylor
- Definition:
- Approved
- Series goal:
- Accepted for grizzly
- Implementation:
-
Implemented
- Milestone target:
-
2013.1
- Started by
- Kurt Taylor
- Completed by
- Russell Bryant
Related branches
Sprints
Whiteboard
During the Folsom release cycle we found that many database migrations that had to manipulate data did so incorrectly. This would have caused substantial loss to a customer during their OpenStack upgrade. To prevent this we need an easy way to do data checks for key migrations, as well as populate some data in all the tables during the migration tests so that failures to convert can be caught in the CI system.
Gerrit topic: https:/
Addressed by: https:/
refactored data upgrade tests in test_migrations
Gerrit topic: https:/
Addressed by: https:/
Adds _prerun_134 function to populate 'bw_usage_cache' table
Gerrit topic: https:/
Addressed by: https:/
Enhance IPAdresses migration tests and fix truncation issue
Etherpad work area for test coverage:
https:/
Addressed by: https:/
Add and check data functions for test_migrations 141
Gerrit topic: https:/
Addressed by: https:/
Canonizes IPv6 before insert it into the db
Addressed by: https:/
Add migration with data test for migration 151
Addressed by: https:/
Work Items
Work items:
Refactor test_migrations to be able to run checks during walk_versions: DONE
Enable Posgresql in CI for unit tests so migrations are run on PG: DONE
Enhance IPAddress migration with max length IPv6 and IPv4 addresses: DONE
Enhance IPAddress migration with non-cannonical IPv6 strings (ensures pg conversion): DONE
Add _prerun_134 function to populate some data in all tables (ensure data is different in critical ways, AZ bug showed what can happen when that's not true): DONE
Add migration test for 141 instance uuid: DONE
Add migration test for 143 rename instance info cache: POSTPONED
Add migration test for 151 change task log: DONE