Neutron allows creation of trunks for VIF_TYPE_HW_VEB ports

Bug #1974183 reported by Michal Dulko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Rodolfo Alonso
description: updated
description: updated
Changed in neutron:
status: New → Confirmed
tags: added: api trunk
Changed in neutron:
importance: Undecided → Medium
tags: added: low-hanging-fruit
Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hello:

This problem is happening in the OVN driver, in the Trunk service OVN driver (both networking-ovn [1] for Train deployments or Neutron [2] for newer).

When a trunk is created, regardless of the port binding (that means, even if the parent port is not bound to ML2/OVN), the Trunk OVS driver updates the status to ACTIVE. This is obviously something wrong that must be fixed but doesn't affect to any other service (**if** this service is not reading the trunk status).

Another topic, that is related to this bug is what is happening when a parent port is linked to a trunk and this parent port is then bound to a driver (SR-IOV in this specific case NOTE1) that doesn't have Trunk driver. In this case, the Trunk won't be created and the status of the Trunk must not be updated.

Regards.

NOTE1: the parent port is vnic-type direct and it is bound to a SR-IOV network. This is not defined in the bug description but I have access to the reporter environment.

[1]https://github.com/openstack/networking-ovn/blob/2704f99a2c97f008aedc9c3b8ed4ebc17c8245cc/networking_ovn/ml2/trunk_driver.py#L140
[2]https://github.com/openstack/neutron/blob/9ca5c1cc0426f629148e1e40657660671e948ce3/neutron/services/trunk/drivers/ovn/trunk_driver.py#L141

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/+/843247

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

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

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

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

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

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

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/c/openstack/neutron/+/844019

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/c/openstack/neutron/+/844020

tags: added: ovn tru
tags: removed: tru
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/843247
Committed: https://opendev.org/openstack/neutron/commit/68bbd3586bdc313a6b67f2983ba2331a7956856c
Submitter: "Zuul (22348)"
Branch: master

commit 68bbd3586bdc313a6b67f2983ba2331a7956856c
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Sat May 14 09:41:25 2022 +0000

    [Trunk] Check if parent port belongs to OVN to activate

    In Trunk service, the OVN was setting always the trunk to "ACTIVE"
    anytime the trunk was created or updated. This patch changes this
    behaviour: only when the trunk parent port belongs to OVN (that
    means, there is a related logical switch port to this Neutron port),
    the methods will set the trunk to "ACTIVE".

    Closes-Bug: #1974183
    Change-Id: Ied5ef53882d4249e0ceaa731239befdc3ba67d03

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/844017
Committed: https://opendev.org/openstack/neutron/commit/cc7c9255ac0534fe0184f7ae64e09e29a57efefb
Submitter: "Zuul (22348)"
Branch: stable/xena

commit cc7c9255ac0534fe0184f7ae64e09e29a57efefb
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Sat May 14 09:41:25 2022 +0000

    [Trunk] Check if parent port belongs to OVN to activate

    In Trunk service, the OVN was setting always the trunk to "ACTIVE"
    anytime the trunk was created or updated. This patch changes this
    behaviour: only when the trunk parent port belongs to OVN (that
    means, there is a related logical switch port to this Neutron port),
    the methods will set the trunk to "ACTIVE".

    Closes-Bug: #1974183
    Change-Id: Ied5ef53882d4249e0ceaa731239befdc3ba67d03
    (cherry picked from commit 68bbd3586bdc313a6b67f2983ba2331a7956856c)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/844020
Committed: https://opendev.org/openstack/neutron/commit/2f48872a31272c96d8695232e50a7c9718cfcc11
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 2f48872a31272c96d8695232e50a7c9718cfcc11
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Sat May 14 09:41:25 2022 +0000

    [Trunk] Check if parent port belongs to OVN to activate

    In Trunk service, the OVN was setting always the trunk to "ACTIVE"
    anytime the trunk was created or updated. This patch changes this
    behaviour: only when the trunk parent port belongs to OVN (that
    means, there is a related logical switch port to this Neutron port),
    the methods will set the trunk to "ACTIVE".

    Closes-Bug: #1974183
    Change-Id: Ied5ef53882d4249e0ceaa731239befdc3ba67d03
    (cherry picked from commit 68bbd3586bdc313a6b67f2983ba2331a7956856c)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/844016
Committed: https://opendev.org/openstack/neutron/commit/d9326c7732592987299fb34f62f936d4326bb4a3
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit d9326c7732592987299fb34f62f936d4326bb4a3
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Sat May 14 09:41:25 2022 +0000

    [Trunk] Check if parent port belongs to OVN to activate

    In Trunk service, the OVN was setting always the trunk to "ACTIVE"
    anytime the trunk was created or updated. This patch changes this
    behaviour: only when the trunk parent port belongs to OVN (that
    means, there is a related logical switch port to this Neutron port),
    the methods will set the trunk to "ACTIVE".

    Closes-Bug: #1974183
    Change-Id: Ied5ef53882d4249e0ceaa731239befdc3ba67d03
    (cherry picked from commit 68bbd3586bdc313a6b67f2983ba2331a7956856c)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/844018
Committed: https://opendev.org/openstack/neutron/commit/cc637d8d1026aa25925f63be573422f13db2052a
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit cc637d8d1026aa25925f63be573422f13db2052a
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Sat May 14 09:41:25 2022 +0000

    [Trunk] Check if parent port belongs to OVN to activate

    In Trunk service, the OVN was setting always the trunk to "ACTIVE"
    anytime the trunk was created or updated. This patch changes this
    behaviour: only when the trunk parent port belongs to OVN (that
    means, there is a related logical switch port to this Neutron port),
    the methods will set the trunk to "ACTIVE".

    Closes-Bug: #1974183
    Change-Id: Ied5ef53882d4249e0ceaa731239befdc3ba67d03
    (cherry picked from commit 68bbd3586bdc313a6b67f2983ba2331a7956856c)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/844019
Committed: https://opendev.org/openstack/neutron/commit/69e101901a1b1a2764380300e8757ec75237e442
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 69e101901a1b1a2764380300e8757ec75237e442
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Sat May 14 09:41:25 2022 +0000

    [Trunk] Check if parent port belongs to OVN to activate

    In Trunk service, the OVN was setting always the trunk to "ACTIVE"
    anytime the trunk was created or updated. This patch changes this
    behaviour: only when the trunk parent port belongs to OVN (that
    means, there is a related logical switch port to this Neutron port),
    the methods will set the trunk to "ACTIVE".

    Closes-Bug: #1974183
    Change-Id: Ied5ef53882d4249e0ceaa731239befdc3ba67d03
    (cherry picked from commit 68bbd3586bdc313a6b67f2983ba2331a7956856c)

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

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

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

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

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

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

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

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

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

This issue was fixed in the openstack/neutron ussuri-eol release.

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

This issue was fixed in the openstack/neutron victoria-eom 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.