TypeError raised in neutron-dhcp-agent

Bug #1999388 reported by Slawek Kaplonski
This bug report is a duplicate of:  Bug #1997964: [DHCP] Error in "call_driver" method. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
In Progress
Low
Unassigned

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.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/867315

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

This bug is a duplicate of https://bugs.launchpad.net/neutron/+bug/1997964 (but please check it before marking it as duplicate).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by "Brian Haley <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/867315

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.