← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1615820] [NEW] test_undo_router_interface_change_on_csnat_error_revert_failure fails with integrity constraint violation

 

Public bug reported:

http://logs.openstack.org/53/358753/1/check/gate-neutron-python27
-ubuntu-xenial/d8f4b7e/testr_results.html.gz

WARNING [neutron.quota.resource_registry] subnetpool is already registered
 WARNING [neutron.quota.resource_registry] port is already registered
 WARNING [neutron.quota.resource_registry] subnet is already registered
 WARNING [neutron.quota.resource_registry] network is already registered
   ERROR [neutron.api.rpc.agentnotifiers.l3_rpc_agent_api] No plugin for L3 routing registered. Cannot notify agents with the message routers_updated
 WARNING [neutron.scheduler.dhcp_agent_scheduler] No more DHCP agents
 WARNING [neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api] Unable to schedule network 330127fd-a570-4e0d-b27c-e2970cc776b8: no agents available; will retry on subsequent port and subnet creation events.
 WARNING [neutron.scheduler.dhcp_agent_scheduler] No more DHCP agents
 WARNING [neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api] Unable to schedule network 330127fd-a570-4e0d-b27c-e2970cc776b8: no agents available; will retry on subsequent port and subnet creation events.
   ERROR [neutron.api.rpc.agentnotifiers.l3_rpc_agent_api] No plugin for L3 routing registered. Cannot notify agents with the message routers_updated
 WARNING [neutron.scheduler.dhcp_agent_scheduler] No more DHCP agents
 WARNING [neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api] Unable to schedule network 330127fd-a570-4e0d-b27c-e2970cc776b8: no agents available; will retry on subsequent port and subnet creation events.
   ERROR [neutron.callbacks.manager] Error during notification for neutron.db.l3_db._notify_routers_callback-8767758024633 port, after_delete
Traceback (most recent call last):
  File "neutron/callbacks/manager.py", line 148, in _notify_loop
    callback(resource, event, trigger, **kwargs)
  File "neutron/db/l3_db.py", line 1842, in _notify_routers_callback
    l3plugin.notify_routers_updated(context, router_ids)
AttributeError: 'NoneType' object has no attribute 'notify_routers_updated'
}}}

Traceback (most recent call last):
  File "neutron/tests/unit/db/test_l3_dvr_db.py", line 563, in test_undo_router_interface_change_on_csnat_error_revert_failure
    self._test_undo_router_interface_change_on_csnat_error(True)
  File "neutron/tests/unit/db/test_l3_dvr_db.py", line 566, in _test_undo_router_interface_change_on_csnat_error
    router, subnet_v4, subnet_v6 = self._setup_router_with_v4_and_v6()
  File "neutron/tests/unit/db/test_l3_dvr_db.py", line 551, in _setup_router_with_v4_and_v6
    {'subnet_id': subnet_v6['subnet']['id']})
  File "neutron/db/l3_dvr_db.py", line 335, in add_router_interface
    port['fixed_ips'][-1]['subnet_id'])
  File "neutron/db/l3_dvr_db.py", line 782, in _add_csnat_router_interface_port
    {'port': port_data})
  File "neutron/plugins/common/utils.py", line 197, in create_port
    return core_plugin.create_port(context, {'port': port_data})
  File "neutron/common/utils.py", line 618, in inner
    return f(self, context, *args, **kwargs)
  File "neutron/plugins/ml2/plugin.py", line 1238, in create_port
    result, mech_context = self._create_port_db(context, port)
  File "neutron/plugins/ml2/plugin.py", line 1206, in _create_port_db
    port_db = self.create_port_db(context, port)
  File "neutron/db/db_base_plugin_v2.py", line 1153, in create_port_db
    self.ipam.allocate_ips_for_port_and_store(context, port, port_id)
  File "neutron/db/ipam_pluggable_backend.py", line 191, in allocate_ips_for_port_and_store
    revert_on_fail=False)
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
    self.force_reraise()
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
    six.reraise(self.type_, self.value, self.tb)
  File "neutron/db/ipam_pluggable_backend.py", line 172, in allocate_ips_for_port_and_store
    ips = self._allocate_ips_for_port(context, port_copy)
  File "neutron/db/ipam_pluggable_backend.py", line 203, in _allocate_ips_for_port
    host=p.get(portbindings.HOST_ID))
  File "neutron/db/ipam_backend_mixin.py", line 578, in _ipam_get_subnets
    return [self._make_subnet_dict(c, context=context) for c in query]
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2760, in __iter__
    self.session._autoflush()
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1293, in _autoflush
    self.flush()
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2019, in flush
    self._flush(objects)
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2137, in _flush
    transaction.rollback(_capture_exception=True)
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2101, in _flush
    flush_context.execute()
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute
    rec.execute(self)
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute
    uow
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj
    mapper, table, insert)
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 767, in _emit_insert_statements
    execute(statement, multiparams)
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
    util.raise_from_cause(newraise, exc_info)
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
oslo_db.exception.DBDuplicateEntry: (sqlite3.IntegrityError) UNIQUE constraint failed: ports.network_id, ports.mac_address [SQL: u'INSERT INTO ports (project_id, id, name, network_id, mac_address, admin_state_up, status, device_id, device_owner, standard_attr_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: ('', '369df189-6176-473b-9403-682465090a52', '', u'330127fd-a570-4e0d-b27c-e2970cc776b8', '12:34:56:78:5e:66', 1, 'DOWN', '1a0d5e1a-7580-45aa-a245-3f0718749c59', 'network:router_centralized_snat', 15)]

** Affects: neutron
     Importance: Critical
         Status: Confirmed


** Tags: gate-failure unittest

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

** Changed in: neutron
   Importance: Undecided => Critical

** Tags added: gate-failure unittest

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

Title:
  test_undo_router_interface_change_on_csnat_error_revert_failure fails
  with integrity constraint violation

Status in neutron:
  Confirmed

Bug description:
  http://logs.openstack.org/53/358753/1/check/gate-neutron-python27
  -ubuntu-xenial/d8f4b7e/testr_results.html.gz

  WARNING [neutron.quota.resource_registry] subnetpool is already registered
   WARNING [neutron.quota.resource_registry] port is already registered
   WARNING [neutron.quota.resource_registry] subnet is already registered
   WARNING [neutron.quota.resource_registry] network is already registered
     ERROR [neutron.api.rpc.agentnotifiers.l3_rpc_agent_api] No plugin for L3 routing registered. Cannot notify agents with the message routers_updated
   WARNING [neutron.scheduler.dhcp_agent_scheduler] No more DHCP agents
   WARNING [neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api] Unable to schedule network 330127fd-a570-4e0d-b27c-e2970cc776b8: no agents available; will retry on subsequent port and subnet creation events.
   WARNING [neutron.scheduler.dhcp_agent_scheduler] No more DHCP agents
   WARNING [neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api] Unable to schedule network 330127fd-a570-4e0d-b27c-e2970cc776b8: no agents available; will retry on subsequent port and subnet creation events.
     ERROR [neutron.api.rpc.agentnotifiers.l3_rpc_agent_api] No plugin for L3 routing registered. Cannot notify agents with the message routers_updated
   WARNING [neutron.scheduler.dhcp_agent_scheduler] No more DHCP agents
   WARNING [neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api] Unable to schedule network 330127fd-a570-4e0d-b27c-e2970cc776b8: no agents available; will retry on subsequent port and subnet creation events.
     ERROR [neutron.callbacks.manager] Error during notification for neutron.db.l3_db._notify_routers_callback-8767758024633 port, after_delete
  Traceback (most recent call last):
    File "neutron/callbacks/manager.py", line 148, in _notify_loop
      callback(resource, event, trigger, **kwargs)
    File "neutron/db/l3_db.py", line 1842, in _notify_routers_callback
      l3plugin.notify_routers_updated(context, router_ids)
  AttributeError: 'NoneType' object has no attribute 'notify_routers_updated'
  }}}

  Traceback (most recent call last):
    File "neutron/tests/unit/db/test_l3_dvr_db.py", line 563, in test_undo_router_interface_change_on_csnat_error_revert_failure
      self._test_undo_router_interface_change_on_csnat_error(True)
    File "neutron/tests/unit/db/test_l3_dvr_db.py", line 566, in _test_undo_router_interface_change_on_csnat_error
      router, subnet_v4, subnet_v6 = self._setup_router_with_v4_and_v6()
    File "neutron/tests/unit/db/test_l3_dvr_db.py", line 551, in _setup_router_with_v4_and_v6
      {'subnet_id': subnet_v6['subnet']['id']})
    File "neutron/db/l3_dvr_db.py", line 335, in add_router_interface
      port['fixed_ips'][-1]['subnet_id'])
    File "neutron/db/l3_dvr_db.py", line 782, in _add_csnat_router_interface_port
      {'port': port_data})
    File "neutron/plugins/common/utils.py", line 197, in create_port
      return core_plugin.create_port(context, {'port': port_data})
    File "neutron/common/utils.py", line 618, in inner
      return f(self, context, *args, **kwargs)
    File "neutron/plugins/ml2/plugin.py", line 1238, in create_port
      result, mech_context = self._create_port_db(context, port)
    File "neutron/plugins/ml2/plugin.py", line 1206, in _create_port_db
      port_db = self.create_port_db(context, port)
    File "neutron/db/db_base_plugin_v2.py", line 1153, in create_port_db
      self.ipam.allocate_ips_for_port_and_store(context, port, port_id)
    File "neutron/db/ipam_pluggable_backend.py", line 191, in allocate_ips_for_port_and_store
      revert_on_fail=False)
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
      self.force_reraise()
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
      six.reraise(self.type_, self.value, self.tb)
    File "neutron/db/ipam_pluggable_backend.py", line 172, in allocate_ips_for_port_and_store
      ips = self._allocate_ips_for_port(context, port_copy)
    File "neutron/db/ipam_pluggable_backend.py", line 203, in _allocate_ips_for_port
      host=p.get(portbindings.HOST_ID))
    File "neutron/db/ipam_backend_mixin.py", line 578, in _ipam_get_subnets
      return [self._make_subnet_dict(c, context=context) for c in query]
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2760, in __iter__
      self.session._autoflush()
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1293, in _autoflush
      self.flush()
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2019, in flush
      self._flush(objects)
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2137, in _flush
      transaction.rollback(_capture_exception=True)
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
      compat.reraise(exc_type, exc_value, exc_tb)
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2101, in _flush
      flush_context.execute()
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute
      rec.execute(self)
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute
      uow
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj
      mapper, table, insert)
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 767, in _emit_insert_statements
      execute(statement, multiparams)
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
      return meth(self, multiparams, params)
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
      return connection._execute_clauseelement(self, multiparams, params)
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
      compiled_sql, distilled_params
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
      context)
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
      util.raise_from_cause(newraise, exc_info)
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
      reraise(type(exception), exception, tb=exc_tb, cause=cause)
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
      context)
    File "/home/jenkins/workspace/gate-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
      cursor.execute(statement, parameters)
  oslo_db.exception.DBDuplicateEntry: (sqlite3.IntegrityError) UNIQUE constraint failed: ports.network_id, ports.mac_address [SQL: u'INSERT INTO ports (project_id, id, name, network_id, mac_address, admin_state_up, status, device_id, device_owner, standard_attr_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: ('', '369df189-6176-473b-9403-682465090a52', '', u'330127fd-a570-4e0d-b27c-e2970cc776b8', '12:34:56:78:5e:66', 1, 'DOWN', '1a0d5e1a-7580-45aa-a245-3f0718749c59', 'network:router_centralized_snat', 15)]

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