port update api should not lose foreign external_ids

Bug #1896827 reported by Flavio Fernandes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Flavio Fernandes

Bug Description

Currently, the update_port api in networking_ovn does not seem to
retain values in the external_ids that it may not know about.

That is not proper behavior as external ids in the lsp may be
storing data used by another entity in neutron, such as
ovn-octavia-provider.

Pseudo example:

1- create neutron port (which creates lsp in ovn)
2- add a new value to lsp's external_ids
3- invoke neutron: port_update
4- check an verify that after port update the key/value pair added in step 2 is still present

Ref code to networking-ovn port_update:

https://github.com/openstack/networking-ovn/blob/51e4351309c1f38c2ed353e6547c60ae9d5d50f5/networking_ovn/common/ovn_client.py#L456

Changed in networking-ovn:
assignee: nobody → Flavio Fernandes (ffernand)
description: updated
description: updated
Changed in networking-ovn:
status: New → Confirmed
affects: networking-ovn → neutron
tags: added: ovn
Changed in neutron:
importance: Undecided → High
Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/755081

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/755082

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

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

commit be3669258cb6f8a6c43b2f016a344185075fa544
Author: Flavio Fernandes <email address hidden>
Date: Wed Sep 23 15:28:55 2020 -0400

    [OVN] update_port should not remove values from external_ids

    Prior to this patch, the OVNClient implementation for neutron's
    update_port was setting the external_ids of the affected logical
    switch port to a hard-coded dictionary. This meant that any key
    value pairs that were not listed there would simply get removed.
    This would make it impossible for any other users of the
    external_id to have a reliable way of storing its data. One of
    such users could be the ovn-octavia-provider.

    Closes-Bug: #1896827
    Change-Id: Ie580534e4d91f1ca2e1dc8331632d49d4720e7ba

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

Reviewed: https://review.opendev.org/755081
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=f25f05959a43b09a02adef45f8bfe654941a0a27
Submitter: Zuul
Branch: stable/victoria

commit f25f05959a43b09a02adef45f8bfe654941a0a27
Author: Flavio Fernandes <email address hidden>
Date: Wed Sep 23 15:28:55 2020 -0400

    [OVN] update_port should not remove values from external_ids

    Prior to this patch, the OVNClient implementation for neutron's
    update_port was setting the external_ids of the affected logical
    switch port to a hard-coded dictionary. This meant that any key
    value pairs that were not listed there would simply get removed.
    This would make it impossible for any other users of the
    external_id to have a reliable way of storing its data. One of
    such users could be the ovn-octavia-provider.

    Closes-Bug: #1896827
    Change-Id: Ie580534e4d91f1ca2e1dc8331632d49d4720e7ba
    (cherry picked from commit be3669258cb6f8a6c43b2f016a344185075fa544)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/ussuri)

Reviewed: https://review.opendev.org/755082
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=58e2def05f5e444e900a5dc03b6ef6b3cb3f5325
Submitter: Zuul
Branch: stable/ussuri

commit 58e2def05f5e444e900a5dc03b6ef6b3cb3f5325
Author: Flavio Fernandes <email address hidden>
Date: Wed Sep 23 15:28:55 2020 -0400

    [OVN] update_port should not remove values from external_ids

    Prior to this patch, the OVNClient implementation for neutron's
    update_port was setting the external_ids of the affected logical
    switch port to a hard-coded dictionary. This meant that any key
    value pairs that were not listed there would simply get removed.
    This would make it impossible for any other users of the
    external_id to have a reliable way of storing its data. One of
    such users could be the ovn-octavia-provider.

    Note: mock module does not exist in stable/victoria and master,
    thus the conflict below.

    Conflicts:
            neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovn_db_resources.py

    Closes-Bug: #1896827
    Change-Id: Ie580534e4d91f1ca2e1dc8331632d49d4720e7ba
    (cherry picked from commit be3669258cb6f8a6c43b2f016a344185075fa544)

tags: added: in-stable-ussuri
tags: added: neutron-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 16.3.0

This issue was fixed in the openstack/neutron 16.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 7.4.0

This issue was fixed in the openstack/networking-ovn 7.4.0 release.

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

This issue was fixed in the openstack/neutron 18.0.0.0rc1 release candidate.

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.