bagpipe driver: port is possibly None on some Neutron registry notifications

Bug #1520629 reported by Thomas Morin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-bgpvpn
Fix Released
Critical
Thomas Morin

Bug Description

The port AFTER_UPDATE notifications from ML2 do not have the same content depending on where they come from:
- ml2/rpc.py: RPC does not have 'origin_port', but 'port' is always present
- ml2/plugin.py: RPC always has 'origin_port', but 'port' is present only if the host the port is bound to has changed

The bagpipe driver currently does not take this into account and breaks on a port update coming from plugin.py update_port in the case where the host the port is bound to has not changed, resulting in port being 'None'.

2015-11-27 16:39:42.024 ERROR neutron.callbacks.manager [req-7b2ded63-2fec-449a-a194-ae74a4dc1af3 admin 1b897130bd894641aa9ce8d949092720] Error during notification for networking_bgpvpn.neutron.services.service_drivers.bagpipe.bagpipe.BaGPipeBGPVPNDriver.registry_port_updated port, after_update
2015-11-27 16:39:42.024 TRACE neutron.callbacks.manager Traceback (most recent call last):
2015-11-27 16:39:42.024 TRACE neutron.callbacks.manager File "/opt/stack/neutron/neutron/callbacks/manager.py", line 141, in _notify_loop
2015-11-27 16:39:42.024 TRACE neutron.callbacks.manager callback(resource, event, trigger, **kwargs)
2015-11-27 16:39:42.024 TRACE neutron.callbacks.manager File "/opt/stack/networking-bgpvpn/networking_bgpvpn/neutron/services/service_drivers/bagpipe/bagpipe.py", line 318, in registry_port_updated
2015-11-27 16:39:42.024 TRACE neutron.callbacks.manager self.notify_port_updated(context, port_dict)
2015-11-27 16:39:42.024 TRACE neutron.callbacks.manager File "/opt/stack/networking-bgpvpn/networking_bgpvpn/neutron/services/service_drivers/bagpipe/bagpipe.py", line 267, in notify_port_updated
2015-11-27 16:39:42.024 TRACE neutron.callbacks.manager port['id'],
2015-11-27 16:39:42.024 TRACE neutron.callbacks.manager TypeError: 'NoneType' object has no attribute '__getitem__'
2015-11-27 16:39:42.024 TRACE neutron.callbacks.manager

Tags: bagpipe
description: updated
Changed in bgpvpn:
status: New → Confirmed
importance: Undecided → Critical
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-bgpvpn (master)

Fix proposed to branch: master
Review: https://review.openstack.org/251885

Changed in bgpvpn:
assignee: nobody → Thomas Morin (tmmorin-orange)
status: Confirmed → In Progress
Changed in bgpvpn:
milestone: none → liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-bgpvpn (master)

Reviewed: https://review.openstack.org/251885
Committed: https://git.openstack.org/cgit/openstack/networking-bgpvpn/commit/?id=2a4ca063d2e21c5b1bb1366715965efc843465b6
Submitter: Jenkins
Branch: master

commit 2a4ca063d2e21c5b1bb1366715965efc843465b6
Author: Thomas Morin <email address hidden>
Date: Tue Dec 1 14:59:37 2015 +0100

    bagpipe: work on notification without port info

    This change updates the bagpipe driver so that
    information is always retrieved from the db, which fixes the
    cases where the port info is absent from the notification.

    Closes-Bug: 1520629
    Change-Id: I41a4e77b33d0b8790302b58ae625b41d28b2df9a

Changed in bgpvpn:
status: In Progress → Fix Committed
Changed in bgpvpn:
status: Fix Committed → Fix Released
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.