Public bug reported: When bulk creating auto address IPv6 subnets, port update happens within a transaction:
2019-03-28 15:48:50.894 2377 ERROR neutron.pecan_wsgi.hooks.translation [req-e84aba73-3fc5-4b3f-bf41-a7e762af4bdf 166b7ed45cd6404e884ba63f89e88bf9 2ce6b2792eee4dc88639a3575f1ac7f0 - default default] POST failed.: RuntimeError: Method <function update_port at 0x7f72eb2fe8c0> cannot be called within a transaction. Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pecan/core.py", line 678, in __call__ self.invoke_controller(controller, args, kwargs, state) File "/usr/lib/python2.7/dist-packages/pecan/core.py", line 569, in invoke_controller result = controller(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 93, in wrapped setattr(e, '_RETRY_EXCEEDED', True) File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 89, in wrapped return f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 150, in wrapper ectxt.value = e.inner_exc File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 138, in wrapper return f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 128, in wrapped LOG.debug("Retry wrapper got retriable exception: %s", e) File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 124, in wrapped return f(*dup_args, **dup_kwargs) File "/usr/lib/python2.7/dist-packages/neutron/pecan_wsgi/controllers/utils.py", line 76, in wrapped return f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/neutron/pecan_wsgi/controllers/resource.py", line 159, in post return self.create(resources) File "/usr/lib/python2.7/dist-packages/neutron/pecan_wsgi/controllers/resource.py", line 177, in create return {key: creator(*creator_args, **creator_kwargs)} File "/usr/lib/python2.7/dist-packages/neutron/common/utils.py", line 674, in inner return f(self, context, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 163, in wrapped return method(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 93, in wrapped setattr(e, '_RETRY_EXCEEDED', True) File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 89, in wrapped return f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 150, in wrapper ectxt.value = e.inner_exc File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 138, in wrapper return f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 128, in wrapped LOG.debug("Retry wrapper got retriable exception: %s", e) File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 124, in wrapped return f(*dup_args, **dup_kwargs) File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/plugin.py", line 1075, in create_subnet_bulk subnet_def.RESOURCE_NAME, context, subnets) File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/plugin.py", line 716, in _create_bulk_ml2 {'resource': resource, 'item': item}) File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/plugin.py", line 706, in _create_bulk_ml2 result, mech_context = obj_creator(context, item) File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/plugin.py", line 1048, in _create_subnet_db self._create_subnet_postcommit(context, result, net_db, ipam_sub) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 163, in wrapped return method(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/neutron/db/db_base_plugin_v2.py", line 716, in _create_subnet_postcommit self.update_port(context, port_id, port_info) File "/usr/lib/python2.7/dist-packages/neutron/common/utils.py", line 673, in inner "transaction.") % f) RuntimeError: Method <function update_port at 0x7f72eb2fe8c0> cannot be called within a transaction. ** Affects: neutron Importance: High Assignee: Oleg Bondarev (obondarev) Status: New -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1825521 Title: Bulk IPv6 subnet create: update port called within a transaction Status in neutron: New Bug description: When bulk creating auto address IPv6 subnets, port update happens within a transaction: 2019-03-28 15:48:50.894 2377 ERROR neutron.pecan_wsgi.hooks.translation [req-e84aba73-3fc5-4b3f- bf41-a7e762af4bdf 166b7ed45cd6404e884ba63f89e88bf9 2ce6b2792eee4dc88639a3575f1ac7f0 - default default] POST failed.: RuntimeError: Method <function update_port at 0x7f72eb2fe8c0> cannot be called within a transaction. Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pecan/core.py", line 678, in __call__ self.invoke_controller(controller, args, kwargs, state) File "/usr/lib/python2.7/dist-packages/pecan/core.py", line 569, in invoke_controller result = controller(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 93, in wrapped setattr(e, '_RETRY_EXCEEDED', True) File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 89, in wrapped return f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 150, in wrapper ectxt.value = e.inner_exc File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 138, in wrapper return f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 128, in wrapped LOG.debug("Retry wrapper got retriable exception: %s", e) File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 124, in wrapped return f(*dup_args, **dup_kwargs) File "/usr/lib/python2.7/dist-packages/neutron/pecan_wsgi/controllers/utils.py", line 76, in wrapped return f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/neutron/pecan_wsgi/controllers/resource.py", line 159, in post return self.create(resources) File "/usr/lib/python2.7/dist-packages/neutron/pecan_wsgi/controllers/resource.py", line 177, in create return {key: creator(*creator_args, **creator_kwargs)} File "/usr/lib/python2.7/dist-packages/neutron/common/utils.py", line 674, in inner return f(self, context, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 163, in wrapped return method(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 93, in wrapped setattr(e, '_RETRY_EXCEEDED', True) File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 89, in wrapped return f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 150, in wrapper ectxt.value = e.inner_exc File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 138, in wrapper return f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 128, in wrapped LOG.debug("Retry wrapper got retriable exception: %s", e) File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 124, in wrapped return f(*dup_args, **dup_kwargs) File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/plugin.py", line 1075, in create_subnet_bulk subnet_def.RESOURCE_NAME, context, subnets) File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/plugin.py", line 716, in _create_bulk_ml2 {'resource': resource, 'item': item}) File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/plugin.py", line 706, in _create_bulk_ml2 result, mech_context = obj_creator(context, item) File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/plugin.py", line 1048, in _create_subnet_db self._create_subnet_postcommit(context, result, net_db, ipam_sub) File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 163, in wrapped return method(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/neutron/db/db_base_plugin_v2.py", line 716, in _create_subnet_postcommit self.update_port(context, port_id, port_info) File "/usr/lib/python2.7/dist-packages/neutron/common/utils.py", line 673, in inner "transaction.") % f) RuntimeError: Method <function update_port at 0x7f72eb2fe8c0> cannot be called within a transaction. To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1825521/+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