25->24 DB migration fails

Bug #1368213 reported by Rushi Agrawal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Xing Yang

Bug Description

See log: http://paste.openstack.org/show/110125/
Tried on a fresh devstack. No volumes, etc were created

Revision history for this message
Jay Bryant (jsbryant) wrote :

I have seen issues in the downgrade path as well but haven't been able to get a chance to further debug.

Changed in cinder:
importance: Undecided → High
Revision history for this message
Xing Yang (xing-yang) wrote :

Looks like this has to do with 025_add_consistencygroup.py. I'll take a look.

Changed in cinder:
assignee: nobody → Xing Yang (xing-yang)
Revision history for this message
Rushi Agrawal (rushiagr) wrote :

Any plans of including this in Juno RCs?

Revision history for this message
Xing Yang (xing-yang) wrote :

I would like to, but I'm still trying to repro this. I have an idea on how to fix this, but can't really validate it without reproducing it first.

Revision history for this message
John Griffith (john-griffith) wrote :

Until we get more details and the ability to reproduce this I'm marking as incomplete for now.

Changed in cinder:
status: New → Incomplete
importance: High → Undecided
Xing Yang (xing-yang)
Changed in cinder:
status: Incomplete → In Progress
Revision history for this message
Xing Yang (xing-yang) wrote :

Reproduced this on a fresh devstack install.

Error from Rushi's output while running "cinder-manage db sync 24" from 25:
OperationalError: (OperationalError) (1025, "Error on rename of './cinder/#sql-2423_62' to './cinder/snapshots' (errno: 150)") '\nALTER TABLE snapshots DROP COLUMN cgsnapshot_id' ()
2014-09-11 18:05:55.095 TRACE cinder

The reason that drop column failed was because of the foreign key constraint. MySQL cannot drop column until the foreign key constraint is removed. So the solution is to remove the foreign key first, and then drop the column.

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

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

Xing Yang (xing-yang)
Changed in cinder:
milestone: none → juno-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/122971
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=71e78407954d108879bd51664f97fb5aeb5729dc
Submitter: Jenkins
Branch: master

commit 71e78407954d108879bd51664f97fb5aeb5729dc
Author: Xing Yang <email address hidden>
Date: Sat Sep 20 18:23:11 2014 -0400

    DB migration 25->24 failed when dropping column

    "cinder-manage db sync 24" failed when dropping column cgsnapshot_id
    from the snapshots table.

    The reason that drop column failed was because of the foreign key
    constraint. MySQL cannot drop column until the foreign key constraint
    is removed. So the solution is to remove the foreign key first, and
    then drop the column. This affects the cgsnapshot_id column in the
    snapshots table and the consistencygroup_id column in the volumes table.

    Change-Id: I89d5016be450ec91c7a7b1c42803add3f62c88df
    Closes-Bug: #1368213

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: juno-rc1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.