[OVN] Update of floatingip creates new row in NBDB NAT table

Bug #1859977 reported by Maciej Jozefczyk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
New
Undecided
Maciej Jozefczyk

Bug Description

While updating a FIP (for example its description via neutron API) the corresponding NAT row gets duplicated in NBDB table.

https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L797

In `_create_or_update_floatingip` function each time this creates new row instead updating existing one.

Changed in neutron:
assignee: nobody → Maciej Jozefczyk (maciej.jozefczyk)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/703352

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

Reviewed: https://review.opendev.org/703352
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=45ae9dfb7d5acacc72fcf9f071a9db1beb0ca972
Submitter: Zuul
Branch: master

commit 45ae9dfb7d5acacc72fcf9f071a9db1beb0ca972
Author: Maciej Józefczyk <email address hidden>
Date: Mon Jan 20 09:39:21 2020 +0000

    [OVN] Delete NAT entry first on any FIP update

    For now while updating FIP check if port or logical_ip
    has changed and only then we deleted the NAT entry.

    Unfortunately each time when FIP update occurs the
    method _create_or_update_floatingip() is used. It first deletes
    LSP pointed by FIP and adds it again along with new NAT entries.
    Based on author comment this actions are required.

    So if we don't update FIP with logical_ip or new port_id,
    like update a description, the NAT entries gets duplicated.

    Since all is wrapped withing a transaction and to not wait for
    proper fix (this code need sa refactor based on commments with NAT
    external_id column) I think thats safe just to delete the NAT entry
    in such situation like described above.

    Change-Id: Iea532e2a02b7992305d1b90aa040e064901c340c
    Related-Bug: #1859977

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.