← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1999388] [NEW] TypeError raised in neutron-dhcp-agent

 

Public bug reported:

I noticed in the DHCP agent logs in the CI jobs stacktraces like:

Dec 07 21:47:19.127574 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]: DEBUG neutron.agent.dhcp.agent [-] neutron.agent.dhcp.agent.DhcpAgentWithStateReport method _port_delete called with arguments ({'port_id': 'a9f73dbf-ba95-4371-ad3d-5cd494efa71b', 'network_id': 'ab6f772f-4c97-4e6c-96d4-a1f89c6322aa', 'fixed_ips': [{'subnet_id': 'd7c9b0d4-1abc-4475-9030-3c1513bd2874', 'ip_address': '172.24.5.186'}, {'subnet_id': 'e398f2da-5b0d-4db1-82a4-7efb1d8905f5', 'ip_address': '2001:db8::166'}], 'priority': 6},) {} {{(pid=58100) wrapper /usr/local/lib/python3.10/dist-packages/oslo_log/helpers.py:65}}
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]: Traceback (most recent call last):
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:   File "/usr/local/lib/python3.10/dist-packages/eventlet/greenpool.py", line 88, in _spawn_n_impl
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:     func(*args, **kwargs)
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:   File "/opt/stack/neutron/neutron/agent/dhcp/agent.py", line 602, in _process_resource_update
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:     method(update.resource)
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:   File "/opt/stack/neutron/neutron/agent/dhcp/agent.py", line 75, in wrapped
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:     return f(*args, **kwargs)
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:   File "/usr/local/lib/python3.10/dist-packages/oslo_log/helpers.py", line 67, in wrapper
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:     return method(*args, **kwargs)
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:   File "/opt/stack/neutron/neutron/agent/dhcp/agent.py", line 730, in _port_delete
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:     self.call_driver('clean_devices', network)
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:   File "/usr/local/lib/python3.10/dist-packages/osprofiler/profiler.py", line 159, in wrapper
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:     result = f(*args, **kwargs)
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:   File "/opt/stack/neutron/neutron/agent/dhcp/agent.py", line 204, in call_driver
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:     if 'segments' in network and network.segments:
Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]: TypeError: argument of type 'NoneType' is not iterable

Example of such error:
https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_d8f/860270/8/check/neutron-
tempest-plugin-openvswitch/d8f61ec/controller/logs/screen-q-dhcp.txt

It don't cause job failure but should be handled in better way in the
code to avoid ugly stacktraces.

** Affects: neutron
     Importance: Low
         Status: Confirmed


** Tags: l3-ipam-dhcp low-hanging-fruit

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

Title:
  TypeError raised in neutron-dhcp-agent

Status in neutron:
  Confirmed

Bug description:
  I noticed in the DHCP agent logs in the CI jobs stacktraces like:

  Dec 07 21:47:19.127574 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]: DEBUG neutron.agent.dhcp.agent [-] neutron.agent.dhcp.agent.DhcpAgentWithStateReport method _port_delete called with arguments ({'port_id': 'a9f73dbf-ba95-4371-ad3d-5cd494efa71b', 'network_id': 'ab6f772f-4c97-4e6c-96d4-a1f89c6322aa', 'fixed_ips': [{'subnet_id': 'd7c9b0d4-1abc-4475-9030-3c1513bd2874', 'ip_address': '172.24.5.186'}, {'subnet_id': 'e398f2da-5b0d-4db1-82a4-7efb1d8905f5', 'ip_address': '2001:db8::166'}], 'priority': 6},) {} {{(pid=58100) wrapper /usr/local/lib/python3.10/dist-packages/oslo_log/helpers.py:65}}
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]: Traceback (most recent call last):
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:   File "/usr/local/lib/python3.10/dist-packages/eventlet/greenpool.py", line 88, in _spawn_n_impl
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:     func(*args, **kwargs)
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:   File "/opt/stack/neutron/neutron/agent/dhcp/agent.py", line 602, in _process_resource_update
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:     method(update.resource)
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:   File "/opt/stack/neutron/neutron/agent/dhcp/agent.py", line 75, in wrapped
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:     return f(*args, **kwargs)
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:   File "/usr/local/lib/python3.10/dist-packages/oslo_log/helpers.py", line 67, in wrapper
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:     return method(*args, **kwargs)
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:   File "/opt/stack/neutron/neutron/agent/dhcp/agent.py", line 730, in _port_delete
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:     self.call_driver('clean_devices', network)
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:   File "/usr/local/lib/python3.10/dist-packages/osprofiler/profiler.py", line 159, in wrapper
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:     result = f(*args, **kwargs)
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:   File "/opt/stack/neutron/neutron/agent/dhcp/agent.py", line 204, in call_driver
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]:     if 'segments' in network and network.segments:
  Dec 07 21:47:19.128219 nested-virt-ubuntu-jammy-ovh-bhs1-0032438036 neutron-dhcp-agent[58100]: TypeError: argument of type 'NoneType' is not iterable

  Example of such error:
  https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_d8f/860270/8/check/neutron-
  tempest-plugin-openvswitch/d8f61ec/controller/logs/screen-q-dhcp.txt

  It don't cause job failure but should be handled in better way in the
  code to avoid ugly stacktraces.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1999388/+subscriptions