← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1613759] Re: InvalidRequestError exception in neutron while creating instance.

 

Reviewed:  https://review.openstack.org/367099
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=7b4350a4cb6da34b92deb578a0af837bcf14e023
Submitter: Jenkins
Branch:    master

commit 7b4350a4cb6da34b92deb578a0af837bcf14e023
Author: Kevin Benton <kevin@xxxxxxxxxx>
Date:   Wed Sep 7 17:11:06 2016 -0700

    Don't use nested transaction in provisioning blocks
    
    Relying on duplicate entries for existing provisioning
    block detection led to lots of log noise whenever we
    would encounter a deadlock because the savepoint would
    go missing. Additionally, since this would happen inside
    of another transaction, we couldn't be guaranteed until
    the final commit that this was unique anyway so the whole
    transaction could throw a duplicate exception.
    
    Since the outer transaction has to handle duplicate exceptions
    anyway, this patch just adjusts the logic to check for the
    existing of a record first with a regular query. If there
    is a race the outer transaction will still fail with a duplicate
    as before, but we at least won't have a bunch of missing savepoint
    exception noise.
    
    Closes-Bug: #1613759
    Change-Id: I02d30427505591e24d7bdc1ba654d3757ab9a33d


** Changed in: neutron
       Status: In Progress => 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/1613759

Title:
  InvalidRequestError exception in neutron while creating instance.

Status in neutron:
  Fix Released

Bug description:
  While creating an instance Neutron is throwing below exception. The
  exception is thrown when port_update is called.

  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource [req-c1458e07-373c-47e6-bfaf-f17d6c47e9bb 32dfec2833b8480ca1748426a9ea1e6f 840e5d0b98f34307948bf847e7ecbe3d - - -] update failed: No details.
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource Traceback (most recent call last):
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/api/v2/resource.py", line 79, in resource
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     result = method(request=request, **args)
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/api/v2/base.py", line 571, in update
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     return self._update(request, id, body, **kwargs)
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_db/api.py", line 151, in wrapper
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     ectxt.value = e.inner_exc
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     self.force_reraise()
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_db/api.py", line 139, in wrapper
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     return f(*args, **kwargs)
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/db/api.py", line 82, in wrapped
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     traceback.format_exc())
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     self.force_reraise()
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/db/api.py", line 77, in wrapped
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     return f(*args, **kwargs)
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/api/v2/base.py", line 617, in _update
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     obj = obj_updater(request.context, id, **kwargs)
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/common/utils.py", line 618, in inner
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     return f(self, context, *args, **kwargs)
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/plugins/ml2/plugin.py", line 1418, in update_port
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     bound_mech_contexts.append(mech_context)
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 490, in __exit__
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     self.rollback()
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     compat.reraise(exc_type, exc_value, exc_tb)
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 487, in __exit__
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     self.commit()
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 390, in commit
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     self._assert_active(prepared_ok=True)
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource   File "/var/lib/kolla/venv/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 218, in _assert_active
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource     "This Session's transaction has been rolled back "
  2016-08-16 12:42:57.991 50 ERROR neutron.api.v2.resource InvalidRequestError: This Session's transaction has been rolled back by a nested rollback() call.  To begin a new transaction, issue Session.rollback() first.

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


References