← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1615572] [NEW] db vs migration mismatch in fwaas tables

 

Public bug reported:

    AssertionError: Models and migration scripts aren't in sync:
    [ ( 'remove_index',
        Index('firewall_group_id', Column('firewall_group_id', VARCHAR(length=36), ForeignKey(u'firewall_groups_v2.id'), ForeignKey(u'firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, nullable=False), unique=True)),
      ( 'remove_index',
        Index('port_id', Column('port_id', VARCHAR(length=36), ForeignKey(u'ports.id'), ForeignKey(u'ports.id'), table=<firewall_group_port_associations_v2>, nullable=False), unique=True)),
      ( 'remove_fk',
        ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdd488ed0>, None, name=u'firewall_group_port_associations_v2_ibfk_2', ondelete=u'CASCADE', table=Table('firewall_group_port_associations_v2', MetaData(bind=None), Column('firewall_group_id', VARCHAR(length=36), ForeignKey(u'firewall_groups_v2.id'), ForeignKey(u'firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, nullable=False), Column('port_id', VARCHAR(length=36), ForeignKey(u'ports.id'), ForeignKey(u'ports.id'), table=<firewall_group_port_associations_v2>, nullable=False), schema=None))),
      ( 'remove_fk',
        ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdd488dd0>, None, name=u'firewall_group_port_associations_v2_ibfk_1', ondelete=u'CASCADE', table=Table('firewall_group_port_associations_v2', MetaData(bind=None), Column('firewall_group_id', VARCHAR(length=36), ForeignKey(u'firewall_groups_v2.id'), ForeignKey(u'firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, nullable=False), Column('port_id', VARCHAR(length=36), ForeignKey(u'ports.id'), ForeignKey(u'ports.id'), table=<firewall_group_port_associations_v2>, nullable=False), schema=None))),
      ( 'add_fk',
        ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdf29da10>, None, table=Table('firewall_group_port_associations_v2', MetaData(bind=None), Column('firewall_group_id', String(length=36), ForeignKey('firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, primary_key=True, nullable=False), Column('port_id', String(length=36), ForeignKey('ports.id'), table=<firewall_group_port_associations_v2>, primary_key=True, nullable=False), schema=None))),
      ( 'add_fk',
        ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdf29da90>, None, table=Table('firewall_group_port_associations_v2', MetaData(bind=None), Column('firewall_group_id', String(length=36), ForeignKey('firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, primary_key=True, nullable=False), Column('port_id', String(length=36), ForeignKey('ports.id'), table=<firewall_group_port_associations_v2>, primary_key=True, nullable=False), schema=None))),
      [ ( 'modify_type',
          None,
          'firewall_groups_v2',
          'project_id',
          { 'existing_nullable': True,
            'existing_server_default': False},
          VARCHAR(length=36),
          String(length=255))],
      [ ( 'modify_type',
          None,
          'firewall_groups_v2',
          'status',
          { 'existing_nullable': True,
            'existing_server_default': False},
          VARCHAR(length=255),
          String(length=16))],
      ( 'add_fk',
        ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdf29d250>, None, table=Table('firewall_groups_v2', MetaData(bind=None), Column('project_id', String(length=255), table=<firewall_groups_v2>), Column('id', String(length=36), table=<firewall_groups_v2>, primary_key=True, nullable=False, default=ColumnDefault(<function <lambda> at 0x7fbfe03bc758>)), Column('name', String(length=255), table=<firewall_groups_v2>), Column('description', String(length=1024), table=<firewall_groups_v2>), Column('public', Boolean(), table=<firewall_groups_v2>), Column('ingress_firewall_policy_id', String(length=36), ForeignKey('firewall_policies_v2.id'), table=<firewall_groups_v2>), Column('egress_firewall_policy_id', String(length=36), ForeignKey('firewall_policies_v2.id'), table=<firewall_groups_v2>), Column('admin_state_up', Boolean(), table=<firewall_groups_v2>), Column('status', String(length=16), table=<firewall_groups_v2>), schema=None))),
      ( 'add_fk',
        ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdf29d310>, None, table=Table('firewall_groups_v2', MetaData(bind=None), Column('project_id', String(length=255), table=<firewall_groups_v2>), Column('id', String(length=36), table=<firewall_groups_v2>, primary_key=True, nullable=False, default=ColumnDefault(<function <lambda> at 0x7fbfe03bc758>)), Column('name', String(length=255), table=<firewall_groups_v2>), Column('description', String(length=1024), table=<firewall_groups_v2>), Column('public', Boolean(), table=<firewall_groups_v2>), Column('ingress_firewall_policy_id', String(length=36), ForeignKey('firewall_policies_v2.id'), table=<firewall_groups_v2>), Column('egress_firewall_policy_id', String(length=36), ForeignKey('firewall_policies_v2.id'), table=<firewall_groups_v2>), Column('admin_state_up', Boolean(), table=<firewall_groups_v2>), Column('status', String(length=16), table=<firewall_groups_v2>), schema=None))),
      [ ( 'modify_type',
          None,
          'firewall_policies_v2',
          'project_id',
          { 'existing_nullable': True,
            'existing_server_default': False},
          VARCHAR(length=36),
          String(length=255))],
      [ ( 'modify_nullable',
          None,
          'firewall_rules_v2',
          'ip_version',
          { 'existing_server_default': False,
            'existing_type': INTEGER(display_width=11)},
          False,
          True)],
      [ ( 'modify_type',
          None,
          'firewall_rules_v2',
          'project_id',
          { 'existing_nullable': True,
            'existing_server_default': False},
          VARCHAR(length=36),
          String(length=255))]]

** Affects: networking-midonet
     Importance: Undecided
         Status: New

** Affects: neutron
     Importance: Undecided
         Status: New


** Tags: fwaas gate-failure

** Tags added: fwaas gate-failure

** Also affects: networking-midonet
   Importance: Undecided
       Status: New

** Description changed:

- db vs migration mismatch in fwaas tables
- 
- eg. http://logs.openstack.org/87/199387/39/check/gate-networking-
- midonet-python34-db/b33517d/testr_results.html.gz
- 
- Traceback (most recent call last):
-   File "/home/jenkins/workspace/gate-networking-midonet-python34-db/.tox/py34/lib/python3.4/site-packages/oslo_db/sqlalchemy/test_migrations.py", line 618, in test_models_sync
-     "Models and migration scripts aren't in sync:\n%s" % msg)
-   File "/home/jenkins/workspace/gate-networking-midonet-python34-db/.tox/py34/lib/python3.4/site-packages/unittest2/case.py", line 690, in fail
-     raise self.failureException(msg)
- AssertionError: Models and migration scripts aren't in sync:
- [ ( 'remove_table',
-     Table('firewall_group_port_associations_v2', MetaData(bind=None), Column('firewall_group_id', VARCHAR(length=36), ForeignKey('firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, nullable=False), Column('port_id', VARCHAR(length=36), ForeignKey('ports.id'), table=<firewall_group_port_associations_v2>, nullable=False), schema=None)),
-   ( 'remove_table',
-     Table('firewall_policy_rule_associations_v2', MetaData(bind=None), Column('firewall_policy_id', VARCHAR(length=36), ForeignKey('firewall_policies_v2.id'), table=<firewall_policy_rule_associations_v2>, primary_key=True, nullable=False), Column('firewall_rule_id', VARCHAR(length=36), ForeignKey('firewall_rules_v2.id'), table=<firewall_policy_rule_associations_v2>, primary_key=True, nullable=False), Column('position', INTEGER(display_width=11), table=<firewall_policy_rule_associations_v2>), schema=None)),
-   ( 'remove_table',
-     Table('firewall_rules_v2', MetaData(bind=None), Column('id', VARCHAR(length=36), table=<firewall_rules_v2>, primary_key=True, nullable=False), Column('name', VARCHAR(length=255), table=<firewall_rules_v2>), Column('description', VARCHAR(length=1024), table=<firewall_rules_v2>), Column('project_id', VARCHAR(length=36), table=<firewall_rules_v2>), Column('protocol', VARCHAR(length=40), table=<firewall_rules_v2>), Column('ip_version', INTEGER(display_width=11), table=<firewall_rules_v2>, nullable=False), Column('source_ip_address', VARCHAR(length=46), table=<firewall_rules_v2>), Column('destination_ip_address', VARCHAR(length=46), table=<firewall_rules_v2>), Column('source_port_range_min', INTEGER(display_width=11), table=<firewall_rules_v2>), Column('source_port_range_max', INTEGER(display_width=11), table=<firewall_rules_v2>), Column('destination_port_range_min', INTEGER(display_width=11), table=<firewall_rules_v2>), Column('destination_port_range_max', INTEGER(display_width=11), table=<firewall_rules_v2>), Column('action', ENUM('allow', 'deny', 'reject'), table=<firewall_rules_v2>), Column('public', TINYINT(display_width=1), table=<firewall_rules_v2>), Column('enabled', TINYINT(display_width=1), table=<firewall_rules_v2>), schema=None)),
-   ( 'remove_table',
-     Table('firewall_policies_v2', MetaData(bind=None), Column('id', VARCHAR(length=36), table=<firewall_policies_v2>, primary_key=True, nullable=False), Column('name', VARCHAR(length=255), table=<firewall_policies_v2>), Column('description', VARCHAR(length=1024), table=<firewall_policies_v2>), Column('project_id', VARCHAR(length=36), table=<firewall_policies_v2>), Column('audited', TINYINT(display_width=1), table=<firewall_policies_v2>), Column('public', TINYINT(display_width=1), table=<firewall_policies_v2>), Column('rule_count', INTEGER(display_width=11), table=<firewall_policies_v2>), schema=None)),
-   ( 'remove_table',
-     Table('firewall_groups_v2', MetaData(bind=None), Column('id', VARCHAR(length=36), table=<firewall_groups_v2>, primary_key=True, nullable=False), Column('name', VARCHAR(length=255), table=<firewall_groups_v2>), Column('description', VARCHAR(length=1024), table=<firewall_groups_v2>), Column('project_id', VARCHAR(length=36), table=<firewall_groups_v2>), Column('status', VARCHAR(length=255), table=<firewall_groups_v2>), Column('admin_state_up', TINYINT(display_width=1), table=<firewall_groups_v2>), Column('public', TINYINT(display_width=1), table=<firewall_groups_v2>), Column('egress_firewall_policy_id', VARCHAR(length=36), table=<firewall_groups_v2>), Column('ingress_firewall_policy_id', VARCHAR(length=36), table=<firewall_groups_v2>), schema=None))]
+     AssertionError: Models and migration scripts aren't in sync:
+     [ ( 'remove_index',
+         Index('firewall_group_id', Column('firewall_group_id', VARCHAR(length=36), ForeignKey(u'firewall_groups_v2.id'), ForeignKey(u'firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, nullable=False), unique=True)),
+       ( 'remove_index',
+         Index('port_id', Column('port_id', VARCHAR(length=36), ForeignKey(u'ports.id'), ForeignKey(u'ports.id'), table=<firewall_group_port_associations_v2>, nullable=False), unique=True)),
+       ( 'remove_fk',
+         ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdd488ed0>, None, name=u'firewall_group_port_associations_v2_ibfk_2', ondelete=u'CASCADE', table=Table('firewall_group_port_associations_v2', MetaData(bind=None), Column('firewall_group_id', VARCHAR(length=36), ForeignKey(u'firewall_groups_v2.id'), ForeignKey(u'firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, nullable=False), Column('port_id', VARCHAR(length=36), ForeignKey(u'ports.id'), ForeignKey(u'ports.id'), table=<firewall_group_port_associations_v2>, nullable=False), schema=None))),
+       ( 'remove_fk',
+         ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdd488dd0>, None, name=u'firewall_group_port_associations_v2_ibfk_1', ondelete=u'CASCADE', table=Table('firewall_group_port_associations_v2', MetaData(bind=None), Column('firewall_group_id', VARCHAR(length=36), ForeignKey(u'firewall_groups_v2.id'), ForeignKey(u'firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, nullable=False), Column('port_id', VARCHAR(length=36), ForeignKey(u'ports.id'), ForeignKey(u'ports.id'), table=<firewall_group_port_associations_v2>, nullable=False), schema=None))),
+       ( 'add_fk',
+         ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdf29da10>, None, table=Table('firewall_group_port_associations_v2', MetaData(bind=None), Column('firewall_group_id', String(length=36), ForeignKey('firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, primary_key=True, nullable=False), Column('port_id', String(length=36), ForeignKey('ports.id'), table=<firewall_group_port_associations_v2>, primary_key=True, nullable=False), schema=None))),
+       ( 'add_fk',
+         ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdf29da90>, None, table=Table('firewall_group_port_associations_v2', MetaData(bind=None), Column('firewall_group_id', String(length=36), ForeignKey('firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, primary_key=True, nullable=False), Column('port_id', String(length=36), ForeignKey('ports.id'), table=<firewall_group_port_associations_v2>, primary_key=True, nullable=False), schema=None))),
+       [ ( 'modify_type',
+           None,
+           'firewall_groups_v2',
+           'project_id',
+           { 'existing_nullable': True,
+             'existing_server_default': False},
+           VARCHAR(length=36),
+           String(length=255))],
+       [ ( 'modify_type',
+           None,
+           'firewall_groups_v2',
+           'status',
+           { 'existing_nullable': True,
+             'existing_server_default': False},
+           VARCHAR(length=255),
+           String(length=16))],
+       ( 'add_fk',
+         ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdf29d250>, None, table=Table('firewall_groups_v2', MetaData(bind=None), Column('project_id', String(length=255), table=<firewall_groups_v2>), Column('id', String(length=36), table=<firewall_groups_v2>, primary_key=True, nullable=False, default=ColumnDefault(<function <lambda> at 0x7fbfe03bc758>)), Column('name', String(length=255), table=<firewall_groups_v2>), Column('description', String(length=1024), table=<firewall_groups_v2>), Column('public', Boolean(), table=<firewall_groups_v2>), Column('ingress_firewall_policy_id', String(length=36), ForeignKey('firewall_policies_v2.id'), table=<firewall_groups_v2>), Column('egress_firewall_policy_id', String(length=36), ForeignKey('firewall_policies_v2.id'), table=<firewall_groups_v2>), Column('admin_state_up', Boolean(), table=<firewall_groups_v2>), Column('status', String(length=16), table=<firewall_groups_v2>), schema=None))),
+       ( 'add_fk',
+         ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdf29d310>, None, table=Table('firewall_groups_v2', MetaData(bind=None), Column('project_id', String(length=255), table=<firewall_groups_v2>), Column('id', String(length=36), table=<firewall_groups_v2>, primary_key=True, nullable=False, default=ColumnDefault(<function <lambda> at 0x7fbfe03bc758>)), Column('name', String(length=255), table=<firewall_groups_v2>), Column('description', String(length=1024), table=<firewall_groups_v2>), Column('public', Boolean(), table=<firewall_groups_v2>), Column('ingress_firewall_policy_id', String(length=36), ForeignKey('firewall_policies_v2.id'), table=<firewall_groups_v2>), Column('egress_firewall_policy_id', String(length=36), ForeignKey('firewall_policies_v2.id'), table=<firewall_groups_v2>), Column('admin_state_up', Boolean(), table=<firewall_groups_v2>), Column('status', String(length=16), table=<firewall_groups_v2>), schema=None))),
+       [ ( 'modify_type',
+           None,
+           'firewall_policies_v2',
+           'project_id',
+           { 'existing_nullable': True,
+             'existing_server_default': False},
+           VARCHAR(length=36),
+           String(length=255))],
+       [ ( 'modify_nullable',
+           None,
+           'firewall_rules_v2',
+           'ip_version',
+           { 'existing_server_default': False,
+             'existing_type': INTEGER(display_width=11)},
+           False,
+           True)],
+       [ ( 'modify_type',
+           None,
+           'firewall_rules_v2',
+           'project_id',
+           { 'existing_nullable': True,
+             'existing_server_default': False},
+           VARCHAR(length=36),
+           String(length=255))]]

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

Title:
  db vs migration mismatch in fwaas tables

Status in networking-midonet:
  New
Status in neutron:
  New

Bug description:
      AssertionError: Models and migration scripts aren't in sync:
      [ ( 'remove_index',
          Index('firewall_group_id', Column('firewall_group_id', VARCHAR(length=36), ForeignKey(u'firewall_groups_v2.id'), ForeignKey(u'firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, nullable=False), unique=True)),
        ( 'remove_index',
          Index('port_id', Column('port_id', VARCHAR(length=36), ForeignKey(u'ports.id'), ForeignKey(u'ports.id'), table=<firewall_group_port_associations_v2>, nullable=False), unique=True)),
        ( 'remove_fk',
          ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdd488ed0>, None, name=u'firewall_group_port_associations_v2_ibfk_2', ondelete=u'CASCADE', table=Table('firewall_group_port_associations_v2', MetaData(bind=None), Column('firewall_group_id', VARCHAR(length=36), ForeignKey(u'firewall_groups_v2.id'), ForeignKey(u'firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, nullable=False), Column('port_id', VARCHAR(length=36), ForeignKey(u'ports.id'), ForeignKey(u'ports.id'), table=<firewall_group_port_associations_v2>, nullable=False), schema=None))),
        ( 'remove_fk',
          ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdd488dd0>, None, name=u'firewall_group_port_associations_v2_ibfk_1', ondelete=u'CASCADE', table=Table('firewall_group_port_associations_v2', MetaData(bind=None), Column('firewall_group_id', VARCHAR(length=36), ForeignKey(u'firewall_groups_v2.id'), ForeignKey(u'firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, nullable=False), Column('port_id', VARCHAR(length=36), ForeignKey(u'ports.id'), ForeignKey(u'ports.id'), table=<firewall_group_port_associations_v2>, nullable=False), schema=None))),
        ( 'add_fk',
          ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdf29da10>, None, table=Table('firewall_group_port_associations_v2', MetaData(bind=None), Column('firewall_group_id', String(length=36), ForeignKey('firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, primary_key=True, nullable=False), Column('port_id', String(length=36), ForeignKey('ports.id'), table=<firewall_group_port_associations_v2>, primary_key=True, nullable=False), schema=None))),
        ( 'add_fk',
          ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdf29da90>, None, table=Table('firewall_group_port_associations_v2', MetaData(bind=None), Column('firewall_group_id', String(length=36), ForeignKey('firewall_groups_v2.id'), table=<firewall_group_port_associations_v2>, primary_key=True, nullable=False), Column('port_id', String(length=36), ForeignKey('ports.id'), table=<firewall_group_port_associations_v2>, primary_key=True, nullable=False), schema=None))),
        [ ( 'modify_type',
            None,
            'firewall_groups_v2',
            'project_id',
            { 'existing_nullable': True,
              'existing_server_default': False},
            VARCHAR(length=36),
            String(length=255))],
        [ ( 'modify_type',
            None,
            'firewall_groups_v2',
            'status',
            { 'existing_nullable': True,
              'existing_server_default': False},
            VARCHAR(length=255),
            String(length=16))],
        ( 'add_fk',
          ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdf29d250>, None, table=Table('firewall_groups_v2', MetaData(bind=None), Column('project_id', String(length=255), table=<firewall_groups_v2>), Column('id', String(length=36), table=<firewall_groups_v2>, primary_key=True, nullable=False, default=ColumnDefault(<function <lambda> at 0x7fbfe03bc758>)), Column('name', String(length=255), table=<firewall_groups_v2>), Column('description', String(length=1024), table=<firewall_groups_v2>), Column('public', Boolean(), table=<firewall_groups_v2>), Column('ingress_firewall_policy_id', String(length=36), ForeignKey('firewall_policies_v2.id'), table=<firewall_groups_v2>), Column('egress_firewall_policy_id', String(length=36), ForeignKey('firewall_policies_v2.id'), table=<firewall_groups_v2>), Column('admin_state_up', Boolean(), table=<firewall_groups_v2>), Column('status', String(length=16), table=<firewall_groups_v2>), schema=None))),
        ( 'add_fk',
          ForeignKeyConstraint(<sqlalchemy.sql.base.ColumnCollection object at 0x7fbfdf29d310>, None, table=Table('firewall_groups_v2', MetaData(bind=None), Column('project_id', String(length=255), table=<firewall_groups_v2>), Column('id', String(length=36), table=<firewall_groups_v2>, primary_key=True, nullable=False, default=ColumnDefault(<function <lambda> at 0x7fbfe03bc758>)), Column('name', String(length=255), table=<firewall_groups_v2>), Column('description', String(length=1024), table=<firewall_groups_v2>), Column('public', Boolean(), table=<firewall_groups_v2>), Column('ingress_firewall_policy_id', String(length=36), ForeignKey('firewall_policies_v2.id'), table=<firewall_groups_v2>), Column('egress_firewall_policy_id', String(length=36), ForeignKey('firewall_policies_v2.id'), table=<firewall_groups_v2>), Column('admin_state_up', Boolean(), table=<firewall_groups_v2>), Column('status', String(length=16), table=<firewall_groups_v2>), schema=None))),
        [ ( 'modify_type',
            None,
            'firewall_policies_v2',
            'project_id',
            { 'existing_nullable': True,
              'existing_server_default': False},
            VARCHAR(length=36),
            String(length=255))],
        [ ( 'modify_nullable',
            None,
            'firewall_rules_v2',
            'ip_version',
            { 'existing_server_default': False,
              'existing_type': INTEGER(display_width=11)},
            False,
            True)],
        [ ( 'modify_type',
            None,
            'firewall_rules_v2',
            'project_id',
            { 'existing_nullable': True,
              'existing_server_default': False},
            VARCHAR(length=36),
            String(length=255))]]

To manage notifications about this bug go to:
https://bugs.launchpad.net/networking-midonet/+bug/1615572/+subscriptions


Follow ups