yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #82869
[Bug 1882062] [NEW] neutron-ovn-db-sync-util fails with Mechanism driver 'ovn-sync' failed in create_port_postcommit: AttributeError: 'PortContext' object has no attribute 'session'
Public bug reported:
This appears to be a mishap in the move from networking-ovn -> neutron
codebase.
2020-06-04 09:45:21.603 968615 INFO neutron.services.qos.drivers.ovn.driver [req-13b1fc86-4b97-4684-a295-16ec9658d128 - - - - -] Starting OVNQosDriver
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers [req-13b1fc86-4b97-4684-a295-16ec9658d128 - - - - -] Mechanism driver 'ovn-sync' failed in create_port_postcommit: AttributeError: 'PortContext' object has no attribute 'session'
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers Traceback (most recent call last):
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/managers.py", line 477, in _call_on_drivers
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers getattr(driver.obj, method_name)(context)
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers File "/usr/lib/python3/dist-packages/neutron/cmd/ovn/neutron_ovn_db_sync_util.py", line 67, in create_port_postcommit
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers self.ovn_client.create_port(context, port)
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py", line 442, in create_port
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers db_rev.bump_revision(context, port, ovn_const.TYPE_PORTS)
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers File "/usr/lib/python3/dist-packages/neutron_lib/db/api.py", line 232, in wrapped
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers method = f if context.session.is_active else f_with_retry
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers AttributeError: 'PortContext' object has no attribute 'session'
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers
2020-06-04 09:45:21.974 968615 ERROR neutron.plugins.ml2.plugin [req-13b1fc86-4b97-4684-a295-16ec9658d128 - - - - -] mechanism_manager.create_port_postcommit failed, deleting port '669df769-a7b2-4dfe-95d6-5f5ce7f6bb94': neutron.plugins.ml2.common.exceptions.MechanismDriverError
2020-06-04 09:45:23.446 968615 CRITICAL neutron [req-13b1fc86-4b97-4684-a295-16ec9658d128 - - - - -] Unhandled error: neutron.plugins.ml2.common.exceptions.MechanismDriverError
2020-06-04 09:45:23.446 968615 ERROR neutron Traceback (most recent call last):
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/bin/neutron-ovn-db-sync-util", line 10, in <module>
2020-06-04 09:45:23.446 968615 ERROR neutron sys.exit(main())
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/cmd/ovn/neutron_ovn_db_sync_util.py", line 216, in main
2020-06-04 09:45:23.446 968615 ERROR neutron synchronizer.do_sync()
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py", line 93, in do_sync
2020-06-04 09:45:23.446 968615 ERROR neutron self.sync_networks_ports_and_dhcp_opts(ctx)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py", line 1008, in sync_networks_ports_and_dhcp_opts
2020-06-04 09:45:23.446 968615 ERROR neutron self._sync_metadata_ports(ctx, db_ports)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py", line 920, in _sync_metadata_ports
2020-06-04 09:45:23.446 968615 ERROR neutron self._ovn_client.create_metadata_port(ctx, net)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py", line 2277, in create_metadata_port
2020-06-04 09:45:23.446 968615 ERROR neutron p_utils.create_port(self._plugin, context, port)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron_lib/plugins/utils.py", line 335, in create_port
2020-06-04 09:45:23.446 968615 ERROR neutron return core_plugin.create_port(
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/common/utils.py", line 687, in inner
2020-06-04 09:45:23.446 968615 ERROR neutron return f(self, context, *args, **kwargs)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron_lib/db/api.py", line 233, in wrapped
2020-06-04 09:45:23.446 968615 ERROR neutron return method(*args, **kwargs)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron_lib/db/api.py", line 139, in wrapped
2020-06-04 09:45:23.446 968615 ERROR neutron setattr(e, '_RETRY_EXCEEDED', True)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-06-04 09:45:23.446 968615 ERROR neutron self.force_reraise()
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-06-04 09:45:23.446 968615 ERROR neutron six.reraise(self.type_, self.value, self.tb)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
2020-06-04 09:45:23.446 968615 ERROR neutron raise value
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron_lib/db/api.py", line 135, in wrapped
2020-06-04 09:45:23.446 968615 ERROR neutron return f(*args, **kwargs)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_db/api.py", line 154, in wrapper
2020-06-04 09:45:23.446 968615 ERROR neutron ectxt.value = e.inner_exc
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-06-04 09:45:23.446 968615 ERROR neutron self.force_reraise()
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-06-04 09:45:23.446 968615 ERROR neutron six.reraise(self.type_, self.value, self.tb)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
2020-06-04 09:45:23.446 968615 ERROR neutron raise value
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_db/api.py", line 142, in wrapper
2020-06-04 09:45:23.446 968615 ERROR neutron return f(*args, **kwargs)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron_lib/db/api.py", line 183, in wrapped
2020-06-04 09:45:23.446 968615 ERROR neutron LOG.debug("Retry wrapper got retriable exception: %s", e)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-06-04 09:45:23.446 968615 ERROR neutron self.force_reraise()
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-06-04 09:45:23.446 968615 ERROR neutron six.reraise(self.type_, self.value, self.tb)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
2020-06-04 09:45:23.446 968615 ERROR neutron raise value
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron_lib/db/api.py", line 179, in wrapped
2020-06-04 09:45:23.446 968615 ERROR neutron return f(*dup_args, **dup_kwargs)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/plugin.py", line 1410, in create_port
2020-06-04 09:45:23.446 968615 ERROR neutron return self._after_create_port(context, result, mech_context)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/plugin.py", line 1423, in _after_create_port
2020-06-04 09:45:23.446 968615 ERROR neutron self.delete_port(context, result['id'], l3_port_check=False)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-06-04 09:45:23.446 968615 ERROR neutron self.force_reraise()
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-06-04 09:45:23.446 968615 ERROR neutron six.reraise(self.type_, self.value, self.tb)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
2020-06-04 09:45:23.446 968615 ERROR neutron raise value
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/plugin.py", line 1418, in _after_create_port
2020-06-04 09:45:23.446 968615 ERROR neutron self.mechanism_manager.create_port_postcommit(mech_context)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/managers.py", line 715, in create_port_postcommit
2020-06-04 09:45:23.446 968615 ERROR neutron self._call_on_drivers("create_port_postcommit", context)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/managers.py", line 493, in _call_on_drivers
2020-06-04 09:45:23.446 968615 ERROR neutron raise ml2_exc.MechanismDriverError(
2020-06-04 09:45:23.446 968615 ERROR neutron neutron.plugins.ml2.common.exceptions.MechanismDriverError
2020-06-04 09:45:23.446 968615 ERROR neutron
** Affects: neutron
Importance: Undecided
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/1882062
Title:
neutron-ovn-db-sync-util fails with Mechanism driver 'ovn-sync' failed
in create_port_postcommit: AttributeError: 'PortContext' object has no
attribute 'session'
Status in neutron:
New
Bug description:
This appears to be a mishap in the move from networking-ovn -> neutron
codebase.
2020-06-04 09:45:21.603 968615 INFO neutron.services.qos.drivers.ovn.driver [req-13b1fc86-4b97-4684-a295-16ec9658d128 - - - - -] Starting OVNQosDriver
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers [req-13b1fc86-4b97-4684-a295-16ec9658d128 - - - - -] Mechanism driver 'ovn-sync' failed in create_port_postcommit: AttributeError: 'PortContext' object has no attribute 'session'
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers Traceback (most recent call last):
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/managers.py", line 477, in _call_on_drivers
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers getattr(driver.obj, method_name)(context)
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers File "/usr/lib/python3/dist-packages/neutron/cmd/ovn/neutron_ovn_db_sync_util.py", line 67, in create_port_postcommit
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers self.ovn_client.create_port(context, port)
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py", line 442, in create_port
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers db_rev.bump_revision(context, port, ovn_const.TYPE_PORTS)
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers File "/usr/lib/python3/dist-packages/neutron_lib/db/api.py", line 232, in wrapped
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers method = f if context.session.is_active else f_with_retry
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers AttributeError: 'PortContext' object has no attribute 'session'
2020-06-04 09:45:21.965 968615 ERROR neutron.plugins.ml2.managers
2020-06-04 09:45:21.974 968615 ERROR neutron.plugins.ml2.plugin [req-13b1fc86-4b97-4684-a295-16ec9658d128 - - - - -] mechanism_manager.create_port_postcommit failed, deleting port '669df769-a7b2-4dfe-95d6-5f5ce7f6bb94': neutron.plugins.ml2.common.exceptions.MechanismDriverError
2020-06-04 09:45:23.446 968615 CRITICAL neutron [req-13b1fc86-4b97-4684-a295-16ec9658d128 - - - - -] Unhandled error: neutron.plugins.ml2.common.exceptions.MechanismDriverError
2020-06-04 09:45:23.446 968615 ERROR neutron Traceback (most recent call last):
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/bin/neutron-ovn-db-sync-util", line 10, in <module>
2020-06-04 09:45:23.446 968615 ERROR neutron sys.exit(main())
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/cmd/ovn/neutron_ovn_db_sync_util.py", line 216, in main
2020-06-04 09:45:23.446 968615 ERROR neutron synchronizer.do_sync()
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py", line 93, in do_sync
2020-06-04 09:45:23.446 968615 ERROR neutron self.sync_networks_ports_and_dhcp_opts(ctx)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py", line 1008, in sync_networks_ports_and_dhcp_opts
2020-06-04 09:45:23.446 968615 ERROR neutron self._sync_metadata_ports(ctx, db_ports)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py", line 920, in _sync_metadata_ports
2020-06-04 09:45:23.446 968615 ERROR neutron self._ovn_client.create_metadata_port(ctx, net)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py", line 2277, in create_metadata_port
2020-06-04 09:45:23.446 968615 ERROR neutron p_utils.create_port(self._plugin, context, port)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron_lib/plugins/utils.py", line 335, in create_port
2020-06-04 09:45:23.446 968615 ERROR neutron return core_plugin.create_port(
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/common/utils.py", line 687, in inner
2020-06-04 09:45:23.446 968615 ERROR neutron return f(self, context, *args, **kwargs)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron_lib/db/api.py", line 233, in wrapped
2020-06-04 09:45:23.446 968615 ERROR neutron return method(*args, **kwargs)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron_lib/db/api.py", line 139, in wrapped
2020-06-04 09:45:23.446 968615 ERROR neutron setattr(e, '_RETRY_EXCEEDED', True)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-06-04 09:45:23.446 968615 ERROR neutron self.force_reraise()
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-06-04 09:45:23.446 968615 ERROR neutron six.reraise(self.type_, self.value, self.tb)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
2020-06-04 09:45:23.446 968615 ERROR neutron raise value
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron_lib/db/api.py", line 135, in wrapped
2020-06-04 09:45:23.446 968615 ERROR neutron return f(*args, **kwargs)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_db/api.py", line 154, in wrapper
2020-06-04 09:45:23.446 968615 ERROR neutron ectxt.value = e.inner_exc
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-06-04 09:45:23.446 968615 ERROR neutron self.force_reraise()
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-06-04 09:45:23.446 968615 ERROR neutron six.reraise(self.type_, self.value, self.tb)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
2020-06-04 09:45:23.446 968615 ERROR neutron raise value
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_db/api.py", line 142, in wrapper
2020-06-04 09:45:23.446 968615 ERROR neutron return f(*args, **kwargs)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron_lib/db/api.py", line 183, in wrapped
2020-06-04 09:45:23.446 968615 ERROR neutron LOG.debug("Retry wrapper got retriable exception: %s", e)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-06-04 09:45:23.446 968615 ERROR neutron self.force_reraise()
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-06-04 09:45:23.446 968615 ERROR neutron six.reraise(self.type_, self.value, self.tb)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
2020-06-04 09:45:23.446 968615 ERROR neutron raise value
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron_lib/db/api.py", line 179, in wrapped
2020-06-04 09:45:23.446 968615 ERROR neutron return f(*dup_args, **dup_kwargs)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/plugin.py", line 1410, in create_port
2020-06-04 09:45:23.446 968615 ERROR neutron return self._after_create_port(context, result, mech_context)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/plugin.py", line 1423, in _after_create_port
2020-06-04 09:45:23.446 968615 ERROR neutron self.delete_port(context, result['id'], l3_port_check=False)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-06-04 09:45:23.446 968615 ERROR neutron self.force_reraise()
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-06-04 09:45:23.446 968615 ERROR neutron six.reraise(self.type_, self.value, self.tb)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
2020-06-04 09:45:23.446 968615 ERROR neutron raise value
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/plugin.py", line 1418, in _after_create_port
2020-06-04 09:45:23.446 968615 ERROR neutron self.mechanism_manager.create_port_postcommit(mech_context)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/managers.py", line 715, in create_port_postcommit
2020-06-04 09:45:23.446 968615 ERROR neutron self._call_on_drivers("create_port_postcommit", context)
2020-06-04 09:45:23.446 968615 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/managers.py", line 493, in _call_on_drivers
2020-06-04 09:45:23.446 968615 ERROR neutron raise ml2_exc.MechanismDriverError(
2020-06-04 09:45:23.446 968615 ERROR neutron neutron.plugins.ml2.common.exceptions.MechanismDriverError
2020-06-04 09:45:23.446 968615 ERROR neutron
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1882062/+subscriptions
Follow ups