← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1930838] Re: key error in deleted_ports

 

Reviewed:  https://review.opendev.org/c/openstack/neutron/+/794755
Committed: https://opendev.org/openstack/neutron/commit/383f209b502493ca6b059394e2644def754b2de1
Submitter: "Zuul (22348)"
Branch:    master

commit 383f209b502493ca6b059394e2644def754b2de1
Author: Nurmatov Mamatisa <nurmatov.mamatisa@xxxxxxxxxx>
Date:   Fri Jun 4 12:04:27 2021 +0300

    [DHCP] Fix cleanup_deleted_ports method
    
    Assume that only one port is deleted within 24 hours, in method
    cleanup_deleted_ports the port removes from deleted_ports but not
    removes from deleted_ports_ts
    In this fix ports older than 1 day will be dropped from
    deleted_ports and deleted_ports_ts properly
    
    Closes-Bug: #1930838
    Change-Id: I1af32e72abb9f101f9729aa6d1354c33a95c98ee


** 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/1930838

Title:
  key error in deleted_ports

Status in neutron:
  Fix Released

Bug description:
  In cleanup_deleted_ports https://github.com/openstack/neutron/blob/master/neutron/agent/dhcp/agent.py#L1044
  the port is deleted from _deleted_ports, but not from _deleted_ports_ts. In the next loop, the port will be deleted again. However, the port has been deleted from _deleted_ports, and a keyerror error is reported.

  ERROR [oslo.service.loopingcall] Fixed interval looping call 'neutron.agent.dhcp.agent.NetworkCache.cleanup_deleted_ports' failed
  Traceback (most recent call last):
  File "/home/isabek/projects/GIT/neutron/.tox/py38/lib/python3.8/site-packages/oslo_service/loopingcall.py", line 150, in _run_loop
  result = func(*self.args, **self.kw)
  File "/home/isabek/projects/GIT/neutron/neutron/agent/dhcp/agent.py", line 1057, in cleanup_deleted_ports
  self._deleted_ports.remove(port_id)
  KeyError: '12345678-1234-aaaa-1234567890ab'

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


References