Thanks, that's very helpful - I'll close this one :)

** Changed in: neutron
       Status: Incomplete => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2081161

Title:
   KeyError: 'ip_version' on processing dhcp opts

Status in neutron:
  Invalid

Bug description:
  release: 2023.1

  I'm using the networking-mlnx and ovn mechanism drivers and there is a
  bad interaction with some of the DHCP options networking-mlnx adds:

  ```
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers 
[req-d65bacb9-884c-4b3d-9e08-3c2f1e192998 
req-1a500bb1-5615-491a-ba85-bfe41257a17e f5c0b82c90544eae800299324a3637b8 
3ffaeaac91904e0ca02f7aca7c00b81a - - default default] Mechanism driver 'ovn' 
failed in update_port_postcommit: KeyError: 'ip_version'
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers Traceback (most 
recent call last):
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers   File 
"/var/lib/kolla/venv/lib64/python3.9/site-packages/neutron/plugins/ml2/managers.py",
 line 497, in _call_on_drivers
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers     
getattr(driver.obj, method_name)(context)
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers   File 
"/var/lib/kolla/venv/lib64/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py",
 line 886, in update_port_postcommit
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers     
self._ovn_update_port(context.plugin_context, port, original_port,
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers   File 
"/var/lib/kolla/venv/lib64/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py",
 line 767, in _ovn_update_port
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers     
self._ovn_client.update_port(plugin_context, port,
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers   File 
"/var/lib/kolla/venv/lib64/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py",
 line 644, in update_port
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers     port_info, 
external_ids = self.get_external_ids_from_port(port)
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers   File 
"/var/lib/kolla/venv/lib64/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py",
 line 510, in get_external_ids_from_port
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers     port_info = 
self._get_port_options(port)
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers   File 
"/var/lib/kolla/venv/lib64/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py",
 line 344, in _get_port_options
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers     
dhcpv4_options = self._get_port_dhcp_options(port, const.IP_VERSION_4)
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers   File 
"/var/lib/kolla/venv/lib64/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py",
 line 219, in _get_port_dhcp_options
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers     
lsp_dhcp_disabled, lsp_dhcp_opts = utils.get_lsp_dhcp_opts(
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers   File 
"/var/lib/kolla/venv/lib64/python3.9/site-packages/neutron/common/ovn/utils.py",
 line 274, in get_lsp_dhcp_opts
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers     if 
edo['ip_version'] != ip_version:
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers KeyError: 
'ip_version'
  2024-08-15 12:14:56.800 37 ERROR neutron.plugins.ml2.managers
  2024-08-15 12:14:56.801 37 ERROR neutron.plugins.ml2.plugin 
[req-d65bacb9-884c-4b3d-9e08-3c2f1e192998 
req-1a500bb1-5615-491a-ba85-bfe41257a17e f5c0b82c90544eae800299324a3637b8 
3ffaeaac91904e0ca02f7aca7c00b81a - - default default] 
mechanism_manager.update_port_postcommit failed for port 
242c3591-e60d-41d4-811e-c8d0a838158e: 
neutron.plugins.ml2.common.exceptions.MechanismDriverError
  ```

  I'm not an expert, but I believe the ovn driver would not even attempt
  bind this port so shouldn't be concerned with dhcp options added by
  networking-mlnx. I've partially worked around this issue by putting
  mlnx_infiniband after ovn in the mechanism driver list, but believe I
  still see this exception on port binding failure.

  I known networking-mlnx is a little unmaintained and may be doing
  something weird, but it does seem like the ovn mechanism driver could
  handle this case more gracefully.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2081161/+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

Reply via email to