[OVN] bump revision number on update hostname for a virtual port

Bug #2069046 reported by Fernando Royo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Fernando Royo

Bug Description

When a Virtual Port is sending or receiving traffic, the host information is updated to reflect where the associated port is hosted. At that moment the standard_attribute revision number is bump but the related ovn_revision_number is not bumped. At this way, next time maintenance task is runned it will detect the mismatching and will run an update_port request to simply update the revision_number.

At same moment the traffic is detected:

stack@ubuntu2204:~/devstack$ openstack port show bac43940-930f-4a5f-89d2-bd7f4b615896 -c id -c revision_number
+-----------------+--------------------------------------+
| Field | Value |
+-----------------+--------------------------------------+
| id | bac43940-930f-4a5f-89d2-bd7f4b615896 |
| revision_number | 3 |
+-----------------+--------------------------------------+

stack@ubuntu2204:~/devstack$ sudo ovn-nbctl list Logical_Switch_Port bac43940-930f-4a5f-89d2-bd7f4b615896
_uuid : d93acc13-967b-43ba-a3b3-631f7c066760
external_ids : {"neutron:cidrs"="192.168.100.39/24", "neutron:device_id"="", "neutron:device_owner"="neutron:LOADBALANCER", "neutron:host_id"=ubuntu2204.localdomain, "neutron:mtu"="", "neutron:network_name"=neutron-5677b203-7766-48ea-97a2-004bd354b80a, "neutron:port_capabilities"="", "neutron:port_fip"="172.24.4.117", "neutron:port_name"=vip_port_bz_2282209, "neutron:project_id"=cc8d1491a94347e282f0ba5e63bfb103, "neutron:revision_number"="3", "neutron:security_group_ids"="38e08eca-0b16-4749-b81e-b47ac51b7b2f", "neutron:subnet_pool_addr_scope4"="", "neutron:subnet_pool_addr_scope6"="", "neutron:vnic_type"=normal}
name : "bac43940-930f-4a5f-89d2-bd7f4b615896"
options : {virtual-ip="192.168.100.39", virtual-parents="6ad33ede-f7fd-488f-be43-7306283bb116"}
port_security : ["fa:16:3e:7b:8b:b5 192.168.100.39"]
type : virtual
up : true

After some minutes, Maintenance tasks fix the port, just increasing the revision_number in external_ids:

Jun 11 12:16:40 ubuntu2204.localdomain neutron-server[223343]: DEBUG neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance [None req-aa2f92a4-0742-45f4-8bb2-6e654885626c None None] Maintenance task: Synchronizing Neutron and OVN databases started {{(pid=223343) check_for_inconsistencies /opt/stack/neutron/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py:340}}
Jun 11 12:16:40 ubuntu2204.localdomain neutron-server[223343]: DEBUG neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance [None req-aa2f92a4-0742-45f4-8bb2-6e654885626c None None] Maintenance task: Number of inconsistencies found at create/update: ports=1 {{(pid=223343) _log /opt/stack/neutron/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py:321}}
Jun 11 12:16:40 ubuntu2204.localdomain neutron-server[223343]: DEBUG neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance [None req-aa2f92a4-0742-45f4-8bb2-6e654885626c None None] Maintenance task: Fixing resource bac43940-930f-4a5f-89d2-bd7f4b615896 (type: ports) at create/update {{(pid=223343) check_for_inconsistencies /opt/stack/neutron/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py:350}}
Jun 11 12:16:40 ubuntu2204.localdomain neutron-server[223343]: INFO neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance [None req-aa2f92a4-0742-45f4-8bb2-6e654885626c None None] Maintenance task: Synchronization completed (took 0.12 seconds)

Changed in neutron:
assignee: nobody → Fernando Royo (froyoredhat)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/921759

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.opendev.org/c/openstack/neutron/+/921759
Committed: https://opendev.org/openstack/neutron/commit/f210a904793b585dafea8085ed62e06f3fed2e6e
Submitter: "Zuul (22348)"
Branch: master

commit f210a904793b585dafea8085ed62e06f3fed2e6e
Author: Fernando Royo <email address hidden>
Date: Tue Jun 11 14:22:18 2024 +0200

    [OVN] Bump revision number after update_virtual_port_host

    This patch adds bump revision after updating the hostname
    of a virtual port (more specifically its associated port).
    This way there is no misalignment between the revision number
    of Neutron DB and OVN DB.

    It also avoids the unnecessary execution of the maintenance
    task to simply match the revision_number.

    Closes-Bug: #2069046
    Change-Id: I2734984f10341ab97ebbdee11389d214bb1150f3

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

Fix proposed to branch: stable/2024.1
Review: https://review.opendev.org/c/openstack/neutron/+/921825

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

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/neutron/+/921830

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

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/neutron/+/921840

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/921825
Committed: https://opendev.org/openstack/neutron/commit/f0901c75e2a47043101fa77aca6672ecc1213520
Submitter: "Zuul (22348)"
Branch: stable/2024.1

commit f0901c75e2a47043101fa77aca6672ecc1213520
Author: Fernando Royo <email address hidden>
Date: Tue Jun 11 14:22:18 2024 +0200

    [OVN] Bump revision number after update_virtual_port_host

    This patch adds bump revision after updating the hostname
    of a virtual port (more specifically its associated port).
    This way there is no misalignment between the revision number
    of Neutron DB and OVN DB.

    It also avoids the unnecessary execution of the maintenance
    task to simply match the revision_number.

    Closes-Bug: #2069046
    Change-Id: I2734984f10341ab97ebbdee11389d214bb1150f3
    (cherry picked from commit f210a904793b585dafea8085ed62e06f3fed2e6e)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/921830
Committed: https://opendev.org/openstack/neutron/commit/8d4eeee135a4c6597aa7e6c976a5e13ca3ac237c
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit 8d4eeee135a4c6597aa7e6c976a5e13ca3ac237c
Author: Fernando Royo <email address hidden>
Date: Tue Jun 11 14:22:18 2024 +0200

    [OVN] Bump revision number after update_virtual_port_host

    This patch adds bump revision after updating the hostname
    of a virtual port (more specifically its associated port).
    This way there is no misalignment between the revision number
    of Neutron DB and OVN DB.

    It also avoids the unnecessary execution of the maintenance
    task to simply match the revision_number.

    Closes-Bug: #2069046
    Change-Id: I2734984f10341ab97ebbdee11389d214bb1150f3
    (cherry picked from commit f210a904793b585dafea8085ed62e06f3fed2e6e)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/921840
Committed: https://opendev.org/openstack/neutron/commit/27869542aa54e40fdb87c473dfab6d79116cc5d9
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 27869542aa54e40fdb87c473dfab6d79116cc5d9
Author: Fernando Royo <email address hidden>
Date: Tue Jun 11 14:22:18 2024 +0200

    [OVN] Bump revision number after update_virtual_port_host

    This patch adds bump revision after updating the hostname
    of a virtual port (more specifically its associated port).
    This way there is no misalignment between the revision number
    of Neutron DB and OVN DB.

    It also avoids the unnecessary execution of the maintenance
    task to simply match the revision_number.

    Closes-Bug: #2069046
    Change-Id: I2734984f10341ab97ebbdee11389d214bb1150f3
    (cherry picked from commit f210a904793b585dafea8085ed62e06f3fed2e6e)

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

This issue was fixed in the openstack/neutron 25.0.0.0b1 development milestone.

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

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

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

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

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

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

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.