Rolling upgrades: online schema migration

Bug #1509944 reported by Grzegorz Grasza
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Medium
Grzegorz Grasza

Bug Description

Future incompatible changes in sqlalchemy migrations, like removing, renaming columns and tables can break rolling upgrades (upgrades when multiple Keystone instances are run at different versions).

To address this, we can ban schema changes which cause incompatibilities, specifically drops and alters, like in Nova:

https://github.com/openstack/nova/blob/stable/liberty/nova/tests/unit/db/test_migrations.py#L224-L225

Grzegorz Grasza (xek)
Changed in keystone:
assignee: nobody → Grzegorz Grasza (xek)
status: New → In Progress
Revision history for this message
Grzegorz Grasza (xek) wrote :

I will be rebasing this against the "Move extensions to core" work

Changed in keystone:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/241603

Changed in keystone:
assignee: Grzegorz Grasza (xek) → Dolph Mathews (dolph)
Changed in keystone:
assignee: Dolph Mathews (dolph) → Grzegorz Grasza (xek)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/241603
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=8234b92e5751c22e39d38eb4628c54c9b86d13de
Submitter: Jenkins
Branch: master

commit 8234b92e5751c22e39d38eb4628c54c9b86d13de
Author: Grzegorz Grasza <email address hidden>
Date: Wed Nov 4 14:41:53 2015 +0100

    Unit test for checking cross-version migrations compatibility

    Future incompatible changes in database schema, like removing,
    renaming columns and tables can break rolling upgrades (upgrades when
    Keystone services are run at different versions simultaneously). This
    patch bans schema changes which cause incompatibilities - specifically
    drops and alters. Note that it is not bullet-proof - some incompatible
    schema changes like adding incompatible constraints may still get through.

    Closes-Bug: #1509944
    Partially-Implements: bp online-schema-migration
    Change-Id: I080cba842adfd0be5d14a51a5ada1ae2ea62863b

Changed in keystone:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/keystone 9.0.0.0b3

This issue was fixed in the openstack/keystone 9.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints