Table cisco_ml2_apic_contracts has wrong router_id field length: 64 vs 36 in routers.id

Bug #1465678 reported by Vladislav Belogrudov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-cisco
Fix Committed
Low
Vladislav Belogrudov
neutron
Fix Released
Low
Henry Gessau

Bug Description

Some database engines require foreign keys to be of the same size as referenced fields. cisco_ml2_apic_contracts.router_id is a foreign key to routers.id - the former is varchar(64) while the latter is varchar(36). Database migration scripts fail while running new OpenStack installations (tested with MySQL Cluster/NDB).

This bug is very similar to https://bugs.launchpad.net/neutron/+bug/1463806 - the same type of changes should be applied to fix the issue.

Tags: db cisco
Changed in neutron:
assignee: nobody → Vladislav Belogrudov (vlad-belogrudov)
status: New → In Progress
Henry Gessau (gessau)
tags: added: cisco
Changed in networking-cisco:
status: New → Confirmed
Changed in neutron:
importance: Undecided → Low
Changed in networking-cisco:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-cisco (master)

Reviewed: https://review.openstack.org/192213
Committed: https://git.openstack.org/cgit/openstack/networking-cisco/commit/?id=20248d212b0f0932f7b157d7fd9545803562e35a
Submitter: Jenkins
Branch: master

commit 20248d212b0f0932f7b157d7fd9545803562e35a
Author: Vladislav Belogrudov <email address hidden>
Date: Tue Jun 16 16:57:43 2015 +0300

    Correct cisco_ml2_apic_contracts.router_id length

    Some database engines require exact match of sizes of foreign keys
    and referenced fields. Foreign key router_id of table
    cisco_ml2_apic_contracts is varchar(64) but it references field
    id varchar(36) of table routers. This gives error while running
    migration scripts in such databases.

    Change-Id: Id4591bf3cc16596fe3bde9f630ef675b0a4f8350
    Closes-Bug: #1465678

Changed in networking-cisco:
status: Confirmed → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Kyle Mestery (<email address hidden>) on branch: master
Review: https://review.openstack.org/192615
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Can you validate that we no longer need this targeting neutron?

Changed in neutron:
assignee: Vladislav Belogrudov (vlad-belogrudov) → Henry Gessau (gessau)
Revision history for this message
Henry Gessau (gessau) wrote :

It is still needed in neutron. I revived and updated the patch.

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

Reviewed: https://review.openstack.org/192615
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=ee1477ac1a8ef90413a0cb2acf90cd1b2889882b
Submitter: Jenkins
Branch: master

commit ee1477ac1a8ef90413a0cb2acf90cd1b2889882b
Author: Vladislav Belogrudov <email address hidden>
Date: Wed Jun 17 14:20:16 2015 +0300

    Correct cisco_ml2_apic_contracts.router_id length

    Some database engines require exact match of sizes of foreign keys
    and referenced fields. Foreign key router_id of table
    cisco_ml2_apic_contracts is varchar(64) but it references field
    id varchar(36) of table routers. This gives error while running
    migration scripts in such databases.

    This change only applies to new OpenStack installations

    Change-Id: I94a21ffbb82446499b1a55bd8b666d7395e4908a
    Related-Bug: #1463806
    Closes-Bug: #1465678

Changed in neutron:
status: In Progress → Fix Committed
Sam Betts (sambetts)
Changed in networking-cisco:
milestone: none → 2.0.0
Sam Betts (sambetts)
Changed in networking-cisco:
assignee: nobody → Vladislav Belogrudov (vlad-belogrudov)
Henry Gessau (gessau)
Changed in neutron:
status: Fix Committed → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0b1

This issue was fixed in the openstack/neutron 8.0.0.0b1 development milestone.

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.