gw_port not persistent in session for expire call

Bug #1716243 reported by Kevin Benton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Kevin Benton

Bug Description

occasional functional failure. Example: http://logs.openstack.org/33/499433/4/gate/gate-neutron-dsvm-functional-ubuntu-xenial/3cc7baf/testr_results.html.gz

Traceback (most recent call last):
  File "neutron/tests/base.py", line 118, in func
    return f(self, *args, **kwargs)
  File "neutron/tests/functional/services/l3_router/test_l3_dvr_ha_router_plugin.py", line 391, in test_dvr_ha_router_create_attach_internal_external_detach_delete
    self._clear_external_gateway(router)
  File "neutron/tests/functional/services/l3_router/test_l3_dvr_ha_router_plugin.py", line 320, in _clear_external_gateway
    {'router': {l3.EXTERNAL_GW_INFO: {}}})
  File "neutron/db/extraroute_db.py", line 65, in update_router
    context, id, router)
  File "neutron/db/l3_db.py", line 1844, in update_router
    id, router)
  File "neutron/db/api.py", line 162, in wrapped
    return method(*args, **kwargs)
  File "neutron/db/api.py", line 92, in wrapped
    setattr(e, '_RETRY_EXCEEDED', True)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
    self.force_reraise()
  File "/opt/stack/new/neutron/.tox/dsvm-functional/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/api.py", line 88, in wrapped
    return f(*args, **kwargs)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/api.py", line 150, in wrapper
    ectxt.value = e.inner_exc
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
    self.force_reraise()
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
    six.reraise(self.type_, self.value, self.tb)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/api.py", line 138, in wrapper
    return f(*args, **kwargs)
  File "neutron/db/api.py", line 127, in wrapped
    LOG.debug("Retry wrapper got retriable exception: %s", e)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
    self.force_reraise()
  File "/opt/stack/new/neutron/.tox/dsvm-functional/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/api.py", line 123, in wrapped
    return f(*dup_args, **dup_kwargs)
  File "neutron/db/l3_db.py", line 275, in update_router
    self._update_router_gw_info(context, id, gw_info)
  File "neutron/db/l3_gwmode_db.py", line 69, in _update_router_gw_info
    context, router_id, info, router=router)
  File "neutron/db/l3_db.py", line 506, in _update_router_gw_info
    network_id)
  File "neutron/db/l3_db.py", line 425, in _delete_current_gw_port
    self._delete_router_gw_port_db(context, router)
  File "neutron/db/l3_db.py", line 443, in _delete_router_gw_port_db
    context.session.expire(gw_port)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1533, in expire
    self._expire_state(state, attribute_names)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1536, in _expire_state
    self._validate_persistent(state)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1976, in _validate_persistent
    state_str(state))
sqlalchemy.exc.InvalidRequestError: Instance '<Port at 0x7f8622f98b50>' is not persistent within this Session

Changed in neutron:
importance: Undecided → High
tags: added: gate-failure
Changed in neutron:
assignee: nobody → Kevin Benton (kevinbenton)
Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/502331
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=4d228320921fbb74d8e5c88c860099fc298a88fc
Submitter: Jenkins
Branch: master

commit 4d228320921fbb74d8e5c88c860099fc298a88fc
Author: Kevin Benton <email address hidden>
Date: Sun Sep 10 08:59:23 2017 -0700

    Remove gw_port expire call

    This was initially added as part of the patch here:
    I09e8a694cdff7f64a642a39b45cbd12422132806
    However, it doesn't serve a purpose anymore because nothing
    references the gateway port DB object before it is deleted.

    Closes-Bug: #1716243
    Change-Id: I87b614f8aef73aab8b5dd8217c99db1fe3ade742

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/502560

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/pike)

Reviewed: https://review.openstack.org/502560
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=c77ab618096dd88abbc50b855c6c0335067ff689
Submitter: Jenkins
Branch: stable/pike

commit c77ab618096dd88abbc50b855c6c0335067ff689
Author: Kevin Benton <email address hidden>
Date: Sun Sep 10 08:59:23 2017 -0700

    Remove gw_port expire call

    This was initially added as part of the patch here:
    I09e8a694cdff7f64a642a39b45cbd12422132806
    However, it doesn't serve a purpose anymore because nothing
    references the gateway port DB object before it is deleted.

    Closes-Bug: #1716243
    Change-Id: I87b614f8aef73aab8b5dd8217c99db1fe3ade742
    (cherry picked from commit 4d228320921fbb74d8e5c88c860099fc298a88fc)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 11.0.1

This issue was fixed in the openstack/neutron 11.0.1 release.

tags: added: neutron-proactive-backport-potential
tags: removed: neutron-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 12.0.0.0b1

This issue was fixed in the openstack/neutron 12.0.0.0b1 development milestone.

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.