← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1207811] Re: VPNaaS DB schema migration is not applied due to typo in FK name

 

** Changed in: neutron
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1207811

Title:
  VPNaaS DB schema migration is not applied due to typo in FK name

Status in OpenStack Neutron (virtual network service):
  Fix Released

Bug description:
  When applying migration 52ff27f7567a_support_for_vpnaas on MySQL I
  receive the following error:

  sqlalchemy.exc.OperationalError: (OperationalError) (1005, "Can't
  create table 'ovs_neutron.ipsecpeercidrs' (errno: 150)") '\nCREATE
  TABLE ipsecpeercidrs (\n\tcidr VARCHAR(32) NOT NULL,
  \n\tipsec_site_connection_id VARCHAR(36) NOT NULL, \n\tPRIMARY KEY
  (cidr, ipsec_site_connection_id), \n\tFOREIGN
  KEY(ipsec_site_connection_id) REFERENCES ipsecsiteonnections (id) ON
  DELETE CASCADE\n)\n\n' ()

  The error is caused by typo in FK name in 52ff27f7567a_support_for_vpnaas.py:
      sa.ForeignKeyConstraint(['ipsec_site_connection_id'],
                                  ['ipsecsiteonnections.id'],
                                  ondelete='CASCADE'),

  while neutron/db/vpn/vpn_db.py contains the correct definition:
           sa.ForeignKey('ipsec_site_connections.id',
                        ondelete="CASCADE"),

  So it's possible to generate DB schema correctly based on models
  definitions, but not to upgrade existing Neutron installation to the
  latest commit.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1207811/+subscriptions