neutron-vpnaas db migration breaks in MySQL 5.6

Bug #1544349 reported by Al Miller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Al Miller

Bug Description

Starting in MySQL 5.6, it is illegal to alter a column that is subject to a Foreign Key constraint, and any migration doing such will fail. Other projects (I have found examples in Barbican and Trove) work around this by removing the constraint, performing the ALTER, and reinstating the constraint.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-vpnaas (master)

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

Changed in neutron:
assignee: nobody → Al Miller (al-miller)
status: New → In Progress
Changed in neutron:
importance: Undecided → High
tags: added: vpnaas
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-vpnaas (master)

Reviewed: https://review.openstack.org/278796
Committed: https://git.openstack.org/cgit/openstack/neutron-vpnaas/commit/?id=f4babb050ba5a54c9c9f91e2d1ac370539dadf3c
Submitter: Jenkins
Branch: master

commit f4babb050ba5a54c9c9f91e2d1ac370539dadf3c
Author: ajmiller <email address hidden>
Date: Wed Feb 10 15:34:34 2016 -0800

    Remove Foreign Key constraint during ALTER

    Beginning with MySQL 5.6, ALTER will fail if there are foreign key
    constraints affecting the column being altered. This patch
    removes the constraint, before applying the update and then
    restores the constraint.

    Change-Id: I0982ec34d51f9e8004d85512bc8e0cde7b84b4f2
    Depends-On: Id3f199d688d648f4618a6850d094e26ca6bb9a7f
    Closes-Bug: 1544349

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

This issue was fixed in the openstack/neutron-vpnaas 8.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-vpnaas (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/296553

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-vpnaas (stable/liberty)

Reviewed: https://review.openstack.org/296553
Committed: https://git.openstack.org/cgit/openstack/neutron-vpnaas/commit/?id=015d580aa461ef980f1c5608a8a02d7897bf4417
Submitter: Jenkins
Branch: stable/liberty

commit 015d580aa461ef980f1c5608a8a02d7897bf4417
Author: ajmiller <email address hidden>
Date: Wed Feb 10 15:34:34 2016 -0800

    Remove Foreign Key constraint during ALTER

    Beginning with MySQL 5.6, ALTER will fail if there are foreign key
    constraints affecting the column being altered. This patch
    removes the constraint, before applying the update and then
    restores the constraint.

    Change-Id: I0982ec34d51f9e8004d85512bc8e0cde7b84b4f2
    Depends-On: Id3f199d688d648f4618a6850d094e26ca6bb9a7f
    Closes-Bug: 1544349
    (cherry picked from commit f4babb050ba5a54c9c9f91e2d1ac370539dadf3c)

tags: added: in-stable-liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron-vpnaas 7.2.0

This issue was fixed in the openstack/neutron-vpnaas 7.2.0 release.

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.