OVS transaction mutate clears column data within transaction

Bug #1629099 reported by Richard Theis
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
networking-ovn
Fix Released
High
Richard Theis

Bug Description

The gate-networking-ovn-dsvm-functional gate job is failing with http://logs.openstack.org/13/372713/6/check/gate-networking-ovn-dsvm-functional/ff9a222/console.html#_2016-09-29_11_19_08_890420 now that ovs 2.6.0 is released on pypi. There appears to be a bug in ovs transaction mutate processing that clear column data within a transaction.

Once a mutate operation (i.e. addvalue, delvalue, etc.) is done,
the OVS IDL populates is _mutations keys. This results in subsequent
get attribute calls (e.g. getattr(row, column, [])) to take an error
and return the default value. The ovs/python/ovs/db/idl.py Row:__getattr__() method attempts to apply operations on a Datum (e.g. extend) that are not valid. These operations fail and instead of
at least returning the original data (without inserts or removes),
no data is return for the column.

Richard Theis (rtheis)
Changed in networking-ovn:
assignee: nobody → Richard Theis (rtheis)
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (master)

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

Changed in networking-ovn:
status: Confirmed → In Progress
Richard Theis (rtheis)
description: updated
description: updated
Revision history for this message
Richard Theis (rtheis) wrote :

The ovs python idl bug has been reported to the ovs development community: http://openvswitch.org/pipermail/dev/2016-September/080120.html

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (master)

Reviewed: https://review.openstack.org/380185
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=41c397ef62fea36106617b5b9de7da556f33c147
Submitter: Jenkins
Branch: master

commit 41c397ef62fea36106617b5b9de7da556f33c147
Author: Richard Theis <email address hidden>
Date: Thu Sep 29 16:53:30 2016 -0500

    Workaround OVS transaction mutate bug

    Using OVS transaction mutate support causes the updated column to
    be an empty list after the mutation. This results in subsequent
    actions taken based on the column data to be incorrect. The column
    data is accurate again once the current transaction completes. It
    appears that the OVS python IDL is not properly handling getattr()
    after column mutation.

    This workaround is needed until OVS is fixed. The workaround drops
    transaction mutate support for logical router static routes since
    they require numerous column data comparisions within a single
    transaction. In addition, OVN DB sync ACL processing had to be
    modified to ensure mutations wouldn't impact any comparison. At
    this time, no other problems where identified.

    The functional tests were updated to test the logical router
    static routes problem and other paths with multiple commands
    within a mutate transaction.

    Recent neutron relocations also required a couple minor unit
    test updates.

    Change-Id: I11782a74a7b08dbfd54aeb37cfbda68b0b3a2ef9
    Related-Bug: 1622647
    Partial-Bug: 1629099

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to networking-ovn (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/384603

Revision history for this message
Richard Theis (rtheis) wrote :

ovs fix has been merged to branch-2.6 and master: http://openvswitch.org/pipermail/dev/2016-October/080683.html

Revision history for this message
Richard Theis (rtheis) wrote :

A python ovs 2.6.1 release has been requested: http://openvswitch.org/pipermail/dev/2016-October/080707.html. This is necessary in order to complete the networking-ovn changes.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on networking-ovn (master)

Change abandoned by Amitabha Biswas (<email address hidden>) on branch: master
Review: https://review.openstack.org/384603

Revision history for this message
Russell Bryant (russellb) wrote :

ovs 2.6.1 has been released. I just uploaded it to pypi and have posted a change updating ovs to 2.6.1 in openstack requirements: https://review.openstack.org/393277

Changed in networking-ovn:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (master)

Reviewed: https://review.openstack.org/387601
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=a72554637f01d2fe11adccf1a50ef1ac6b942bbc
Submitter: Jenkins
Branch: master

commit a72554637f01d2fe11adccf1a50ef1ac6b942bbc
Author: Richard Theis <email address hidden>
Date: Mon Oct 17 13:12:43 2016 -0500

    Remove workarounds for python ovs mutate bug

    Now that [1] is merged to ovs branch-2.6 and OpenStack requires
    ovs >= 2.6.1, remove the networking-ovn workarounds.

    Note: The wrapper functions which support the non-mutate code paths
    will be removed in a separate patch set.

    [1] http://openvswitch.org/pipermail/dev/2016-October/080683.html

    Depends-On: I38f9c6ec84667fecbe0353cd073b9b65d1c47d13
    Change-Id: I961189f4439f932bfb8311f72e21e527b1b808f0
    Closes-Bug: 1629099

Changed in networking-ovn:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 2.0.0.0b1

This issue was fixed in the openstack/networking-ovn 2.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to networking-ovn (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/398492

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to networking-ovn (master)

Reviewed: https://review.openstack.org/398492
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=59fcdb22b1809ce24ca5632c3f3f847876d77f72
Submitter: Jenkins
Branch: master

commit 59fcdb22b1809ce24ca5632c3f3f847876d77f72
Author: Richard Theis <email address hidden>
Date: Wed Nov 16 07:43:29 2016 -0600

    Finalize ovs transaction mutate support

    Now that the networking-ovn requirements include ovs 2.6.1, proper
    ovs transaction mutate support is guaranteed. Therefore, remove the
    unused code paths for non-mutate transactions.

    Change-Id: I474a8a971cc6c99e21e2c16923786a4d76954f61
    Related-Bug: 1629099

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.