yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #94203
[Bug 2071822] Re: Failed to update port: KeyError: 'binding:profile'
Reviewed: https://review.opendev.org/c/openstack/neutron/+/923412
Committed: https://opendev.org/openstack/neutron/commit/e5a8829c565755e4c7d4e8b2d52536234c90d8b4
Submitter: "Zuul (22348)"
Branch: master
commit e5a8829c565755e4c7d4e8b2d52536234c90d8b4
Author: Terry Wilson <twilson@xxxxxxxxxx>
Date: Wed Jul 3 09:27:09 2024 -0500
Return empty BpInfo if missing binding:profile
https://review.opendev.org/c/openstack/neutron/+/867359 inadvertently
dropped a return when binding:profile was missing, making it possible
to hit a KeyError when trying to access port["binding:profile"]. This
was seen in the Maintenance thread after adding a port.
Fixes: b6750fb2b8
Closes-Bug: #2071822
Change-Id: I232daa2905904d464ddf84e66e857f8b1f08e941
** 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/2071822
Title:
Failed to update port: KeyError: 'binding:profile'
Status in neutron:
Fix Released
Bug description:
When adding a port, the maintenance task can produce:
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance [req-b78617f7-7a4f-4b76-836e-16a49c85e3db - - - - -] Failed to update port fd11a4f2-ddc8-47ee-a929-58094f991e06: KeyError: 'binding:profile'
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance Traceback (most recent call last):
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance File "/usr/lib/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py", line 620, in check_port_has_address_scope
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance self._ovn_client.get_external_ids_from_port(
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance File "/usr/lib/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py", line 571, in get_external_ids_from_port
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance port_info = self._get_port_options(port)
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance File "/usr/lib/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py", line 321, in _get_port_options
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance bp_info = utils.validate_and_get_data_from_binding_profile(port)
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance File "/usr/lib/python3.9/site-packages/neutron/common/ovn/utils.py", line 333, in validate_and_get_data_from_binding_profile
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance binding_profile = copy.deepcopy(port[constants.OVN_PORT_BINDING_PROFILE])
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance KeyError: 'binding:profile'
This is because
https://review.opendev.org/c/openstack/neutron/+/867359 inadvertently
removed an early exit when OVN_PORT_BINDING_PROFILE was not present.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2071822/+subscriptions
References