← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1307295] Re: duplicate entry exception for vxlan-allocation

 

** 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/1307295

Title:
  duplicate entry exception for vxlan-allocation

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

Bug description:
  I run multiple neutron-servers using haproxy. Here's the exception
  thrown by all the neutron-servers when services restart:

  2014-04-14 11:42:18.315 6457 ERROR neutron.service [-] Unrecoverable error: please check log for details.
  2014-04-14 11:42:18.315 6457 TRACE neutron.service Traceback (most recent call last):
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/service.py", line 103, in serve_wsgi
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     service.start()
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/service.py", line 72, in start
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     self.wsgi_app = _run_wsgi(self.app_name)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/service.py", line 117, in _run_wsgi
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     app = config.load_paste_app(app_name)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/common/config.py", line 145, in load_paste_app
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     app = deploy.loadapp("config:%s" % config_path, name=app_name)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 247, in loadapp
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     return loadobj(APP, uri, name=name, **kw)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 272, in loadobj
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     return context.create()
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 710, in create
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     return self.object_type.invoke(self)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 144, in invoke
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     **context.local_conf)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/util.py", line 56, in fix_call
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     val = callable(*args, **kw)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/paste/urlmap.py", line 25, in urlmap_factory
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     app = loader.get_app(app_name, global_conf=global_conf)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 350, in get_app
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     name=name, global_conf=global_conf).create()
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 710, in create
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     return self.object_type.invoke(self)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 144, in invoke
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     **context.local_conf)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/util.py", line 56, in fix_call
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     val = callable(*args, **kw)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/auth.py", line 69, in pipeline_factory
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     app = loader.get_app(pipeline[-1])
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 350, in get_app
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     name=name, global_conf=global_conf).create()
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 710, in create
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     return self.object_type.invoke(self)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 146, in invoke
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     return fix_call(context.object, context.global_conf, **context.local_conf)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/util.py", line 56, in fix_call
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     val = callable(*args, **kw)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/api/v2/router.py", line 71, in factory
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     return cls(**local_config)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/api/v2/router.py", line 75, in __init__
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     plugin = manager.NeutronManager.get_plugin()
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/manager.py", line 211, in get_plugin
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     return cls.get_instance().plugin
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/manager.py", line 206, in get_instance
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     cls._create_instance()
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/openstack/common/lockutils.py", line 249, in inner
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     return f(*args, **kwargs)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/manager.py", line 200, in _create_instance
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     cls._instance = cls()
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/manager.py", line 112, in __init__
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     plugin_provider)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/manager.py", line 140, in _get_plugin_instance
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     return plugin_class()
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/plugins/ml2/plugin.py", line 106, in __init__
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     self.type_manager.initialize()
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/plugins/ml2/managers.py", line 74, in initialize
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     driver.obj.initialize()
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/plugins/ml2/drivers/type_vxlan.py", line 81, in initialize
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     self._sync_vxlan_allocations()
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/plugins/ml2/drivers/type_vxlan.py", line 172, in _sync_vxlan_allocations
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     session.add(alloc)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/session.py", line 402, in __exit__
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     self.commit()
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/session.py", line 314, in commit
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     self._prepare_impl()
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/session.py", line 298, in _prepare_impl
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     self.session.flush()
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/openstack/common/db/sqlalchemy/session.py", line 615, in _wrap
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     _raise_if_duplicate_entry_error(e, get_engine().name)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/openstack/common/db/sqlalchemy/session.py", line 559, in _raise_if_duplicate_entry_error
  2014-04-14 11:42:18.315 6457 TRACE neutron.service     raise exception.DBDuplicateEntry(columns, integrity_error)
  2014-04-14 11:42:18.315 6457 TRACE neutron.service DBDuplicateEntry: (IntegrityError) (1062, "Duplicate entry '1' for key 'PRIMARY'") 'INSERT INTO ml2_vxlan_allocations (vxlan_vni, allocated) VALUES (%s, %s)' ((1, 0), (2, 0), (3, 0), (4, 0), (5, 0), (6, 0), (7, 0), (8, 0)  ... displaying 10 of 100000 total bound parameter sets ...  (99999, 0), (100000, 0))
  2014-04-14 11:42:18.315 6457 TRACE neutron.service 
  2014-04-14 11:42:18.331 6457 CRITICAL neutron [-] (IntegrityError) (1062, "Duplicate entry '1' for key 'PRIMARY'") 'INSERT INTO ml2_vxlan_allocations (vxlan_vni, allocated) VALUES (%s, %s)' ((1, 0), (2, 0), (3, 0), (4, 0), (5, 0), (6, 0), (7, 0), (8, 0)  ... displaying 10 of 100000 total bound parameter sets ...  (99999, 0), (100000, 0))

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


References