ml2 transaction_guard broke out of tree plugins

Bug #1611533 reported by YAMAMOTO Takashi
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
DragonFlow
Fix Released
High
Omer Anson
networking-midonet
Fix Released
Critical
Unassigned
networking-odl
Fix Released
Critical
Unassigned
neutron
Fix Released
Medium
YAMAMOTO Takashi

Bug Description

recent change [1] broke l3 plugin for networking-midonet.

[1] I9924600c57648f7eccaa5abb6979419d9547a2ff

l3 plugins for networking-odl and dragonflow seem to have similar code and would be affected too.

eg.
http://logs.openstack.org/87/199387/36/check/gate-tempest-dsvm-networking-midonet-ml2/ceb0331/logs/q-svc.txt.gz?level=TRACE

2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource [req-af588d02-2944-411f-aa22-eafca4fdabeb tempest-TestSecurityGroupsBasicOps-509565194 -] remove_router_interface failed: No details.
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource Traceback (most recent call last):
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/api/v2/resource.py", line 79, in resource
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource result = method(request=request, **args)
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 151, in wrapper
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource self.force_reraise()
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 139, in wrapper
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/api/v2/base.py", line 217, in _handle_action
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource ret_value = getattr(self._plugin, name)(*arg_list, **kwargs)
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_log/helpers.py", line 48, in wrapper
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource return method(*args, **kwargs)
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource File "/opt/stack/new/networking-midonet/midonet/neutron/services/l3/l3_midonet.py", line 190, in remove_router_interface
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource context, router_id, interface_info)
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/db/l3_db.py", line 1756, in remove_router_interface
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource context, router_id, interface_info)
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/db/l3_db.py", line 924, in remove_router_interface
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource context, router_id, subnet_id, device_owner)
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/db/l3_db.py", line 901, in _remove_interface_by_subnet
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource l3_port_check=False)
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/common/utils.py", line 611, in inner
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource raise RuntimeError(_("Method cannot be called within a "
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource RuntimeError: Method cannot be called within a transaction.
2016-08-09 12:31:57.844 25876 ERROR neutron.api.v2.resource
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource [req-c9ae4bf8-2baf-4327-be58-bb3006b4d9c9 tempest-TestSecurityGroupsBasicOps-2112515119 -] delete failed: No details.
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource Traceback (most recent call last):
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/api/v2/resource.py", line 79, in resource
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource result = method(request=request, **args)
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/api/v2/base.py", line 522, in delete
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource return self._delete(request, id, **kwargs)
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 151, in wrapper
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource self.force_reraise()
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 139, in wrapper
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/api/v2/base.py", line 544, in _delete
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource obj_deleter(request.context, id, **kwargs)
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_log/helpers.py", line 48, in wrapper
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource return method(*args, **kwargs)
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource File "/opt/stack/new/networking-midonet/midonet/neutron/services/l3/l3_midonet.py", line 220, in delete_floatingip
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource super(MidonetL3ServicePlugin, self).delete_floatingip(context, id)
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/db/l3_db.py", line 1779, in delete_floatingip
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource floating_ip = self._delete_floatingip(context, id)
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/db/l3_db.py", line 1301, in _delete_floatingip
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource l3_port_check=False)
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/common/utils.py", line 611, in inner
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource raise RuntimeError(_("Method cannot be called within a "
2016-08-09 12:31:58.293 25876 ERROR neutron.api.v2.resource RuntimeError: Method cannot be called within a transaction.

Tags: gate-failure
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/353127

Changed in neutron:
assignee: nobody → YAMAMOTO Takashi (yamamoto)
status: New → In Progress
Changed in networking-midonet:
assignee: nobody → YAMAMOTO Takashi (yamamoto)
importance: Undecided → Critical
tags: added: gate-failure
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-midonet (master)

Fix proposed to branch: master
Review: https://review.openstack.org/353236

Changed in networking-midonet:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-midonet (master)

Reviewed: https://review.openstack.org/353236
Committed: https://git.openstack.org/cgit/openstack/networking-midonet/commit/?id=616aff852c03a8bdf13c9c3af62dcafaec3a52fa
Submitter: Jenkins
Branch: master

commit 616aff852c03a8bdf13c9c3af62dcafaec3a52fa
Author: YAMAMOTO Takashi <email address hidden>
Date: Wed Aug 10 12:40:48 2016 +0900

    Specify GUARD_TRANSACTION=False where necessary

    Closes-Bug: #1611533
    Depends-On: I5aa099c2264636336ab0b76c0826b506e2dc44b6
    Change-Id: I7afcad9acafbe7333f5bdbec8827d87d508f14da

Changed in networking-midonet:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by YAMAMOTO Takashi (<email address hidden>) on branch: master
Review: https://review.openstack.org/353127

Revision history for this message
Nate Johnston (nate-johnston) wrote :

Since https://review.openstack.org/#/c/275110/ is now merged I believe this is closed from the Neutron side.

Changed in neutron:
status: In Progress → Fix Committed
importance: Undecided → Medium
Changed in neutron:
status: Fix Committed → Fix Released
Revision history for this message
Isaku Yamahata (yamahata) wrote :

networking-odl is also affected and fixed. The fix is just work around, correct?
In long term, correct interface for l3 to call ml2 plugin.

Changed in networking-odl:
importance: Undecided → Critical
assignee: nobody → Isaku Yamahata (yamahata)
Omer Anson (omer-anson)
Changed in dragonflow:
assignee: nobody → Omer Anson (omer-anson)
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to dragonflow (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/359845

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to dragonflow (master)

Reviewed: https://review.openstack.org/359845
Committed: https://git.openstack.org/cgit/openstack/dragonflow/commit/?id=e9eceb7a1a1148287c6fbc119959ffd3b92fcdcc
Submitter: Jenkins
Branch: master

commit e9eceb7a1a1148287c6fbc119959ffd3b92fcdcc
Author: Omer Anson <email address hidden>
Date: Wed Aug 24 11:53:22 2016 +0300

    Use revision plugin rather than version_db for routers

    In order to use version_db for routers, a database session has to exist
    around the router modification as well as the version creation action.
    This behaviour is no longer supported by Neutron.

    However, Neutron have a 'revisions' plugin with the same functionality.
    So we move routers to use that plugin for its versioning.

    Note that this is done for ML2 only.

    Change-Id: Idd035c8f812e23b0ec748175c5180f822144b04b
    Related-Bug: 1613551
    Related-Bug: 1611533

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on dragonflow (master)

Change abandoned by WangJian (<email address hidden>) on branch: master
Review: https://review.openstack.org/355736

Omer Anson (omer-anson)
Changed in dragonflow:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-midonet 3.0.0

This issue was fixed in the openstack/networking-midonet 3.0.0 release.

Changed in networking-odl:
status: New → In Progress
Revision history for this message
Isaku Yamahata (yamahata) wrote :
Changed in networking-odl:
status: In Progress → Fix Released
Changed in networking-midonet:
assignee: YAMAMOTO Takashi (yamamoto) → nobody
Changed in networking-odl:
assignee: Isaku Yamahata (yamahata) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on networking-odl (master)

Change abandoned by Michel Peterson (<email address hidden>) on branch: master
Review: https://review.openstack.org/356839
Reason: Cleaning up changes that seem to be abandoned or are older than two months. If you think this was an error and the change is still relevant, please be free to restore it. Sorry for any inconvenience that I might have caused by this.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.