ml2: too many port_update notifications sent because of port binding

Bug #1255680 reported by Salvatore Orlando
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Salvatore Orlando

Bug Description

process_port_binding is always called when a port is updated: https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L617

However, its current implementation: https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L202
Return True, hence triggering a notification in many cases.

The code has a check for returning false when the host is not set and the vif is already bound: https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L213

However, this is perhaps not triggered in many cases.
As an example, in this job: http://logs.openstack.org/20/57420/9/experimental/check-tempest-devstack-vm-neutron-isolated-parallel/269a314

Of 538 update_port calls to the plugin, process_port_binding turns need_port_update_notify from False to Truue in

It is therefore worth ensuring no notification is sent if the host doesn't change (the other binding parameters should not change on update and even if they can they should not trigger a notification) in 72 cases out of 82 cases where the flag was false before invoking process_port_binding

Looking at the logs - the port should not have been notified because of bindings in any case.

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

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

Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-1 → icehouse-2
Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/58860
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=2b375c0f15fd43af23fbd28b85929d63a753548b
Submitter: Jenkins
Branch: master

commit 2b375c0f15fd43af23fbd28b85929d63a753548b
Author: Salvatore Orlando <email address hidden>
Date: Wed Nov 27 13:26:07 2013 -0800

    Do not trigger agent notification if bindings do not change

    The method _process_port_bindings for the ml2 plugin should not
    return True when the host binding does not change, otherwise an
    unnecessary notification will be sent to the agent

    Closes-Bug: #1255680
    Related-Bug: #1253896
    Partially Implements: neutron-tempest-parallel

    Change-Id: I8a40090af347ca430ff6c8e2211fa34bb2bd0f8c

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-2 → 2014.1
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.