Reviewed: https://review.openstack.org/446145 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=44b6fcb4d26eaa5e28f147d903482f8fdd37d911 Submitter: Jenkins Branch: master
commit 44b6fcb4d26eaa5e28f147d903482f8fdd37d911 Author: Kevin Benton <blak...@gmail.com> Date: Wed Mar 15 12:42:33 2017 -0700 Use correct retry mechanism in tags This replaces wrap_db_retry with neutron.db.api.retry_if_session_inactive() in the tags plugin. wrap_db_retry is missing a bunch of exception types we can encounter and are expected to retry in normal database operations in Neutron (e.g. staledataerror in the bug report). This patch doesn't include a unit test because there is already quite a bit of coverage ensuring the decorator handles these types of exceptions. Closes-Bug: #1673243 Change-Id: I65b10ee54301401cd4525152a82a604ac8744582 ** 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/1673243 Title: test_subnet_tags gate failure Status in neutron: Fix Released Bug description: http://logs.openstack.org/50/439750/2/gate/gate-neutron-dsvm-api- ubuntu-xenial/d434861/logs/testr_results.html.gz 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource [req-c03cb69d-aa18-409d-a002-0927d616362b tempest-TagSubnetTestJSON-1826626474 tempest-TagSubnetTestJSON-1826626474] update_all failed: No details. 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource Traceback (most recent call last): 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/api/v2/resource.py", line 79, in resource 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource result = method(request=request, **args) 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/extensions/tag.py", line 130, in update_all 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource parent_id, body) 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_log/helpers.py", line 48, in wrapper 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource return method(*args, **kwargs) 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 151, in wrapper 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__ 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource self.force_reraise() 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb) 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 139, in wrapper 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource return f(*args, **kwargs) 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/services/tag/tag_plugin.py", line 96, in update_tags 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource if tag_db.tag in tags_removed 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/objects/base.py", line 468, in delete_objects 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource context, cls.db_model, **cls.modify_fields_to_db(kwargs)) 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/objects/db/api.py", line 102, in delete_objects 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource return len(db_objs) 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 553, in __exit__ 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource self.rollback() 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__ 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource compat.reraise(exc_type, exc_value, exc_tb) 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 550, in __exit__ 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource self.commit() 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 455, in commit 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource self._prepare_impl() 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 435, in _prepare_impl 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource self.session.flush() 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2080, in flush 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource self._flush(objects) 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2198, in _flush 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource transaction.rollback(_capture_exception=True) 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__ 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource compat.reraise(exc_type, exc_value, exc_tb) 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2162, in _flush 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource flush_context.execute() 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource rec.execute(self) 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource uow 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource mapper, table, update) 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 732, in _emit_update_statements 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource (table.description, len(records), rows)) 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource StaleDataError: UPDATE statement on table 'standardattributes' expected to update 4 row(s); 3 were matched. 2017-03-15 16:38:27.076 30202 ERROR neutron.api.v2.resource To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1673243/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp