← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1795816] Re: neutron_dynamic_routing Bgp floatingip_update KeyError: 'last_known_router_id'

 

Reviewed:  https://review.opendev.org/665328
Committed: https://git.openstack.org/cgit/openstack/neutron-dynamic-routing/commit/?id=4780fe548b86eba7f64a57ccf2d000958c238253
Submitter: Zuul
Branch:    master

commit 4780fe548b86eba7f64a57ccf2d000958c238253
Author: Benoît Knecht <benoit.knecht@xxxxxxxx>
Date:   Fri Jun 14 10:12:18 2019 +0200

    bgp: Gracefully handle missing last_known_router_id
    
    When a server is deleted before its floating IP has been disassociated,
    the notification doens't contain a `last_known_router_id` key, which
    results in a `KeyError` exception being thrown.
    
    This commit gracefully handles this situation by setting
    `last_router_id` to `None` when `last_known_router_id` is missing.
    
    Change-Id: If127a33cec7ce6c4d264a191df37c30decab4daa
    Closes-Bug: #1795816


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

Title:
  neutron_dynamic_routing Bgp floatingip_update KeyError:
  'last_known_router_id'

Status in neutron:
  Fix Released

Bug description:
  Hi, every time when i run the tempest test:
  tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops

  a python exception appears in the neutron server.log:

  2018-10-02 16:13:01.380 11754 ERROR neutron_lib.callbacks.manager [req-3fe9d833-84d2-41ed-bae3-90f02b1425f4 c3f8dd04c65b44adbda2389ef5aa8f87 38908f51f8c740b18e71fc62352076fb - default default] Error during notification for neutron_dynamic_routing.services.bgp.bgp_plugin.BgpPlugin.floatingip_update_callback-13778 floatingip, after_update: KeyError: 'last_known_router_id'
  2018-10-02 16:13:01.380 11754 ERROR neutron_lib.callbacks.manager Traceback (most recent call last):
  2018-10-02 16:13:01.380 11754 ERROR neutron_lib.callbacks.manager   File "/usr/lib/python2.7/site-packages/neutron_lib/callbacks/manager.py", line 177, in _notify_loop
  2018-10-02 16:13:01.380 11754 ERROR neutron_lib.callbacks.manager     callback(resource, event, trigger, **kwargs)
  2018-10-02 16:13:01.380 11754 ERROR neutron_lib.callbacks.manager   File "/usr/lib/python2.7/site-packages/neutron_dynamic_routing/services/bgp/bgp_plugin.py", line 236, in floatingip_update_callback
  2018-10-02 16:13:01.380 11754 ERROR neutron_lib.callbacks.manager     last_router_id = kwargs['last_known_router_id']
  2018-10-02 16:13:01.380 11754 ERROR neutron_lib.callbacks.manager KeyError: 'last_known_router_id'
  2018-10-02 16:13:01.380 11754 ERROR neutron_lib.callbacks.manager

  it seems to replace the line:
  233         last_router_id = kwargs['last_known_router_id']

  in /usr/lib/python2.7/site-
  packages/neutron_dynamic_routing/services/bgp/bgp_plugin.py with line
  last_router_id = kwargs.get('last_known_router_id') solves the
  problem.

  This problem is found in Pike and Queens releases of OpenStack.

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


References