1) If you run "db-manage revision --autogenerate" on master with
PostgreSQL it won't show any extra changes that are needed
http://paste.openstack.org/show/129531/, but on the MySQL it will show
some extra indexes http://paste.openstack.org/show/129532/. This indexes
is specific of MySQL which creates them with primary keys or foreign
keys. As it was decided earlier this should not be fixed as this dialect
specific (https://review.openstack.org/80518), so test skip this
difference.

2) I'm not sure that alembic have any checks for changing of primary
keys, and if it is so this does't expect to work as both autogenerate
and test rely on alembic with this checks. So, this is not Neutron bug.

** Changed in: neutron
       Status: New => Opinion

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

Title:
  Checks for DB models and migrations sync not working

Status in OpenStack Neutron (virtual network service):
  Opinion

Bug description:
  I noticed a couple of issues, which might be related.

  
  1. "db-manage revision --autogenerate" on master with no code changes 
generates:

  def upgrade():
      op.drop_index('idx_autoinc_vr_id', 
table_name='ha_router_vrid_allocations')

  
  2. With the following change to the IPAllocation() model, the revision is not 
detected. Also, the unit tests for model/migration sync do not give an error.

  diff --git a/neutron/db/models_v2.py b/neutron/db/models_v2.py
  --- a/neutron/db/models_v2.py
  +++ b/neutron/db/models_v2.py
  @@ -98,8 +98,8 @@ class IPAllocation(model_base.BASEV2):
   
       port_id = sa.Column(sa.String(36), sa.ForeignKey('ports.id',
                                                        ondelete="CASCADE"),
  -                        nullable=True)
  -    ip_address = sa.Column(sa.String(64), nullable=False, primary_key=True)
  +                        nullable=True, primary_key=True)
  +    ip_address = sa.Column(sa.String(64), nullable=False)
       subnet_id = sa.Column(sa.String(36), sa.ForeignKey('subnets.id',
                                                          ondelete="CASCADE"),
                             nullable=False, primary_key=True)

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to