port binding not bumping revision

Bug #1699034 reported by Kevin Benton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Kevin Benton

Bug Description

Port binding is not bumping the revision level of the port so a port update of the host_id will generate two update events with the same revision number. The first sets the host_id and the second sets the binding info but does not change the revision which makes ordering difficult to distinguish on the agents.

Changed in neutron:
importance: Undecided → High
assignee: nobody → Kevin Benton (kevinbenton)
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/475650
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0f536d5a25d410362e5a7b1390bc627cc3dc5071
Submitter: Jenkins
Branch: master

commit 0f536d5a25d410362e5a7b1390bc627cc3dc5071
Author: Kevin Benton <email address hidden>
Date: Tue Jun 20 00:00:12 2017 -0700

    Use objects instead of SQLA deep copies in PortContext

    The workaround of using deepcopy calls on the PortBinding
    and PortBindingLevel objects prevents the port relationship
    from being loaded to bump its revision because it then fails
    to merge.

    So in order to allow port bindings to bump the revision we
    need to stop using sqlalchemy objects in the PortContext. This
    patch adds a new snapshot object that just copies the column
    values and provides a method to reconcile them back into the
    session.

    This workaround can go away after we switch to using OVOs, but
    this needs to be backportable so we can't just wait for OVO
    adoption.

    Partial-Bug: #1699034
    Change-Id: Ib85ec8182117fa3c4844dabfffe881e38e68b556

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/475646
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=43eb75fd1d7c99b42293d723626bc48434479ee4
Submitter: Jenkins
Branch: master

commit 43eb75fd1d7c99b42293d723626bc48434479ee4
Author: Kevin Benton <email address hidden>
Date: Mon Jun 19 16:58:45 2017 -0700

    Add revises_on_change to Binding DB models

    All of the ML2 binding models were missing the revises_on_change
    attribute to bump the revision of the port whenever they are
    created/updated/deleted.

    These are important because port binding happens in a separate
    transaction so without them the revision number before and after
    port binding was exactly the same. This opened up the L2 agent
    to a race condition dependent on the order of processed push
    notifications.

    Closes-Bug: #1699034
    Change-Id: I75f3c63941130ce845574e60214ac34e99111693

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

This issue was fixed in the openstack/neutron 11.0.0.0b3 development milestone.

tags: added: neutron-proactive-backport-potential
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.