Online DB schema upgrade

Registered by Michal Dulko on 2015-09-16

This blueprint aims in adopting concepts adopted previously by Nova [1].

To achieve zero downtime upgrades we need to support running two versions of Cinder simultaneously. This isn't possible if a DB migration removed a column or table between versions - older version will fail DB calls for such resource. To achieve this we should ban contracting schema migrations and eventually make it possible to do them using separate cinder-manage command to be executed by deployer once upgrade is completed.

Also data movements (for example to another column) affect downtime, as we cannot do operations while transfering the data. The idea here is to make sure all services are backwards compatible with data from the DB and we can run such data movements in a partial way.

[1] http://www.danplanet.com/blog/2015/10/07/upgrades-in-nova-database-migrations/

Blueprint information

Status:
Complete
Approver:
Sean McGinnis
Priority:
High
Drafter:
Michal Dulko
Direction:
Approved
Assignee:
Michal Dulko
Definition:
Approved
Series goal:
Accepted for mitaka
Implementation:
Implemented
Milestone target:
milestone icon mitaka-rc1
Started by
Michal Dulko on 2015-11-23
Completed by
Michal Dulko on 2016-03-15

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/online-schema-upgrades,n,z

Addressed by: https://review.openstack.org/245976
    Add spec for online-schema-upgrades

Addressed by: https://review.openstack.org/248768
    Block subtractive operations in DB migrations

Addressed by: https://review.openstack.org/245854
    Add ConsistencyGroupVolumeTypeMapping table

Addressed by: https://review.openstack.org/264744
    Update online-schema-upgrades spec

Addressed by: https://review.openstack.org/330391
    Add generic code for online data migrations

Gerrit topic: https://review.openstack.org/#q,topic:bp/summarymessage,n,z

This spec is marked as implemented but it appears the actual implementation is in https://review.openstack.org/#/c/330391/ and has not yet merged. Was this implemented elsewhere or does that patch still need to land to satisfy this bp/spec? -dolphm

<dulek> Yes and no. ;) We have the DB schema migrations guidelines merged into devref and are reviewing the code accordingly, so basic intent of this blueprint is achieved. However if we wanted to do the contracting DB schema migrations, we'll need the patch in question.

Gerrit topic: https://review.openstack.org/#q,topic:bp/generic-volume-group,n,z

Addressed by: https://review.openstack.org/350350
    WIP: Migrate consistency groups to groups

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.