dhcp agent crashes when deleting network if bulk reload enabled

Bug #1890027 reported by Boyvinall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Boyvinall

Bug Description

If DHCP bulk reload is enabled, I get the following crash in the bulk reload loop when deleting a network:

Running command: 'neutron-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini'
+ exec neutron-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/eventlet/hubs/hub.py", line 461, in fire_timers
    timer()
  File "/usr/lib/python3.6/site-packages/eventlet/hubs/timer.py", line 59, in __call__
    cb(*args, **kw)
  File "/usr/lib/python3.6/site-packages/neutron/agent/dhcp/agent.py", line 161, in _reload_bulk_allocations
    self.call_driver('bulk_reload_allocations', network)
  File "/usr/lib/python3.6/site-packages/osprofiler/profiler.py", line 160, in wrapper
    result = f(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/neutron/agent/dhcp/agent.py", line 167, in call_driver
    {'net': network.id, 'action': action})
AttributeError: 'NoneType' object has no attribute 'id'
+ sudo -E kolla_set_configs

Line numbers might differ slightly due to my patch for https://bugs.launchpad.net/neutron/+bug/1886969 but the issue is present without my change.

Revision history for this message
Boyvinall (boyvinall) wrote :

I'm not yet sure if this happens every time, I'll be doing some more testing on this over the next few days.

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

For any other reviewer, please read https://bugs.launchpad.net/neutron/+bug/1886969. Both bugs are related.

Changed in neutron:
assignee: nobody → Boyvinall (boyvinall)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/742363
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=20b138ff3118029e86f0525695160c4c7ca8b551
Submitter: Zuul
Branch: master

commit 20b138ff3118029e86f0525695160c4c7ca8b551
Author: Matt Vinall <email address hidden>
Date: Thu Jul 9 21:08:21 2020 +0100

    fix dhcp bulk reload exceptions

    1886969 - The bulk reload code was written for python2 and caused
    an exception running under python3. This change works under python3.

    1890027 - There was an additional exception triggered when
    deleting networks - reading the network from the cache returned 'None'
    and this was not properly checked before use.

    Change-Id: I4e546c0e37146b1f34d8b5e6637c407b0c04ad4d
    Closes-Bug: 1886969
    Closes-Bug: 1890027
    Signed-off-by: Matt Vinall <email address hidden>

Changed in neutron:
status: In Progress → Fix Released
tags: added: neutron-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 16.3.0

This issue was fixed in the openstack/neutron 16.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 17.1.0

This issue was fixed in the openstack/neutron 17.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 18.0.0.0rc1

This issue was fixed in the openstack/neutron 18.0.0.0rc1 release candidate.

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.