← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1619312] Re: dvr: can't migrate legacy router to DVR

 

Reviewed:  https://review.openstack.org/370430
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=25e65df7974c238517ab51ea07079ab0482ad44a
Submitter: Jenkins
Branch:    master

commit 25e65df7974c238517ab51ea07079ab0482ad44a
Author: Brian Haley <brian.haley@xxxxxxx>
Date:   Wed Sep 14 16:52:07 2016 -0400

    Fix migration of legacy router to DVR
    
    We have to ensure ML2's create_port method is not called
    in a transaction.
    
    This adds a temporary hack to set an attribute on the context
    to skip this check to accomodate an L3 code-path that has a port
    creation entangled in a transaction.  This attribute will
    ultimately be removed once this path is refactored.
    
    Change-Id: I9c41a7848b22c437bedcdd7eb57f7c9da873b06d
    Closes-bug: #1619312


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

Title:
  dvr: can't migrate legacy router to DVR

Status in neutron:
  Fix Released

Bug description:
  As the title say:

  2016-09-01 16:38:46.026 ERROR neutron.api.v2.resource [req-d738cdb2-01bb-41a7-a2a9-534bf8b06377 admin 85a2b05da4be46b19bc5f7cf41055e45] update failed: No details.
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource Traceback (most recent call last):
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/opt/openstack/neutron/neutron/api/v2/resource.py", line 79, in resource
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     result = method(request=request, **args)
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/opt/openstack/neutron/neutron/api/v2/base.py", line 575, in update
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     return self._update(request, id, body, **kwargs)
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 151, in wrapper
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     ectxt.value = e.inner_exc
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     self.force_reraise()
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 139, in wrapper
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     return f(*args, **kwargs)
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/opt/openstack/neutron/neutron/db/api.py", line 82, in wrapped
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     traceback.format_exc())
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     self.force_reraise()
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/opt/openstack/neutron/neutron/db/api.py", line 77, in wrapped
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     return f(*args, **kwargs)
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/opt/openstack/neutron/neutron/api/v2/base.py", line 623, in _update
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     obj = obj_updater(request.context, id, **kwargs)
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/opt/openstack/neutron/neutron/db/extraroute_db.py", line 76, in update_router
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     context, id, router)
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/opt/openstack/neutron/neutron/db/l3_db.py", line 1722, in update_router
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     id, router)
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/opt/openstack/neutron/neutron/db/l3_db.py", line 282, in update_router
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     router_db = self._update_router_db(context, id, r)
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/opt/openstack/neutron/neutron/db/l3_hamode_db.py", line 533, in _update_router_db
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     context, router_id, data)
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/opt/openstack/neutron/neutron/db/l3_dvr_db.py", line 143, in _update_router_db
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     context.elevated(), router_db):
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/opt/openstack/neutron/neutron/db/l3_dvr_db.py", line 829, in _create_snat_intf_ports_if_not_exists
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     intf['fixed_ips'][0]['subnet_id'], do_pop=False)
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/opt/openstack/neutron/neutron/db/l3_dvr_db.py", line 782, in _add_csnat_router_interface_port
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     {'port': port_data})
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/opt/openstack/neutron/neutron/plugins/common/utils.py", line 197, in create_port
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     return core_plugin.create_port(context, {'port': port_data})
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource   File "/opt/openstack/neutron/neutron/common/utils.py", line 617, in inner
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource     "transaction.") % f)
  2016-09-01 16:38:46.026 TRACE neutron.api.v2.resource RuntimeError: Method <function create_port at 0x7ff66e6cc8c0> cannot be called within a transaction.

  
  This was done on master.

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


References