[OVN] Virtual port type set while port has no parents

Bug #1881759 reported by Maciej Jozefczyk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Maciej Jozefczyk

Bug Description

I noticed that one port has been set as virtual, while there is no other port having the same ip address configured withing same network (address pairs extension).

My example is as follows:

()[root@controller-0 flows-distribution]# ovn-nbctl list logical_switch_port 6c788bc2-beb1-4f12-bf93-b45433241b90
_uuid : 6c788bc2-beb1-4f12-bf93-b45433241b90
addresses : ["fa:16:3e:23:b5:50 10.2.3.19"]
dhcpv4_options : 59f7a3c1-9a6f-45e4-92ec-8a3263650ab0
dhcpv6_options : []
dynamic_addresses : []
enabled : true
external_ids : {"neutron:cidrs"="10.2.3.19/24", "neutron:device_id"="", "neutron:device_owner"="", "neutron:network_name"="neutron-b55fccdf-e79e-4967-b87c-e7380d57e678", "neutron:port_name"="s_rally_e0292957_jPyoaKst", "neutron:project_id"="6e447c71b8bf480d80e008bb72015832", "neutron:revision_number"="3", "neutron:security_group_ids"="abb6d545-2647-42ca-a832-4e0945c72249"}
ha_chassis_group : []
name : "ec863657-2757-4636-a434-b7a67b41c9cb"
options : {requested-chassis="compute-1.redhat.local", virtual-ip="10.2.3.19", virtual-parents="21cf8792-2944-46cc-bc73-97c761a50f25"}
parent_name : []
port_security : ["fa:16:3e:23:b5:50 10.2.3.19"]
tag : []
tag_request : []
type : virtual
up : true
()[root@controller-0 flows-distribution]#

And the port that has been identified as a parent for ^:

()[root@controller-0 flows-distribution]# ovn-nbctl list logical_switch_port 21cf8792-2944-46cc-bc73-97c761a50f25
_uuid : b8195549-ccb4-4c4c-b228-2e2e095cf017
addresses : ["fa:16:3e:be:07:5c 10.2.3.191"]
dhcpv4_options : 59f7a3c1-9a6f-45e4-92ec-8a3263650ab0
dhcpv6_options : []
dynamic_addresses : []
enabled : true
external_ids : {"neutron:cidrs"="10.2.3.191/24", "neutron:device_id"="", "neutron:device_owner"="", "neutron:network_name"="neutron-b55fccdf-e79e-4967-b87c-e7380d57e678", "neutron:port_name"="s_rally_e0292957_K7uVoGwV", "neutron:project_id"="6e447c71b8bf480d80e008bb72015832", "neutron:revision_number"="3", "neutron:security_group_ids"="abb6d545-2647-42ca-a832-4e0945c72249"}
ha_chassis_group : []
name : "21cf8792-2944-46cc-bc73-97c761a50f25"
options : {requested-chassis="compute-1.redhat.local"}
parent_name : []
port_security : ["fa:16:3e:be:07:5c 10.2.3.191"]
tag : []
tag_request : []
type : ""
up : true

In line:
https://github.com/openstack/neutron/blob/cb55643a0695ebc5b41f50f6edb1546bcc676b71/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L209

there is a broken check "and virtual_ip in ps". It validates string instead actual IP address.

Changed in neutron:
status: New → Confirmed
importance: Undecided → High
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/732690

Changed in neutron:
assignee: nobody → Maciej Jozefczyk (maciej.jozefczyk)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit e6023ecb482ee0dc7e29739b94e009c275cc24a1
Author: Maciej Józefczyk <email address hidden>
Date: Tue Jun 2 14:12:31 2020 +0000

    [OVN] Don't set virtual port type on ports with similar addresses

    Because of broken check why one port has similar address to the other
    one, the first one by mistake could be set as virtual.
    Example:
     port_1: 10.11.1.100
     port_2: 10.11.1.10

    On create of port_2 it is set as 'virtual', but shouldn't.

    This patch fixes that bug by using common function
    utils.get_ovn_port_addresses().

    Change-Id: Ia4b986146c77edf0616015380359e37233df80fc
    Closes-Bug: #1881759

Changed in neutron:
status: In Progress → Fix Released
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/733602

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

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

commit a0dfb50a9a849020f0f4818982dd83081823b3f9
Author: Maciej Józefczyk <email address hidden>
Date: Tue Jun 2 14:12:31 2020 +0000

    [OVN] Don't set virtual port type on ports with similar addresses

    Because of broken check why one port has similar address to the other
    one, the first one by mistake could be set as virtual.
    Example:
     port_1: 10.11.1.100
     port_2: 10.11.1.10

    On create of port_2 it is set as 'virtual', but shouldn't.

    This patch fixes that bug by using common function
    utils.get_ovn_port_addresses().

    Change-Id: Ia4b986146c77edf0616015380359e37233df80fc
    Closes-Bug: #1881759
    (cherry picked from commit e6023ecb482ee0dc7e29739b94e009c275cc24a1)

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/networking-ovn queens-eol

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

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

This issue was fixed in the openstack/networking-ovn rocky-eol 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.