[OVN] Trunk can be deleted when the parent port is bound to a VM

Bug #2022059 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
In Progress
High
Rodolfo Alonso

Bug Description

Inlike in other backends (ML2/OVS for example), the "Trunk" object can be deleted while the parent port (and the subports) are bound. This operation should raise an exception instead (same as in ML2/OVS).

Example using ML2/OVS:
$ openstack network trunk delete trunk1
Failed to delete trunk with name or ID 'trunk1': ConflictException: 409: Client Error for url: http://192.168.10.70:9696/networking/v2.0/trunks/c406114f-8453-4b55-8642-c9265defdec4, Trunk c406114f-8453-4b55-8642-c9265defdec4 is currently in use.
1 of 1 trunks failed to delete.

Changed in neutron:
importance: Undecided → High
Miro Tomaska (mtomaska)
Changed in neutron:
assignee: nobody → Miro Tomaska (mtomaska)
Miro Tomaska (mtomaska)
Changed in neutron:
status: New → Confirmed
Changed in neutron:
assignee: Miro Tomaska (mtomaska) → Rodolfo Alonso (rodolfo-alonso-hernandez)
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/+/885154

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

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

commit 539961b4b9563588d3fe51c84b062b153d97ce68
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue May 30 11:45:37 2023 +0200

    [OVN] Prevent Trunk creation/deletion with parent port bound

    This patch imitates the ML2/OVS Trunk driver behaviour. When the
    trunk parent port is bound:
    * A new trunk cannot be created using this parent port.
    * If the port is assigned as parent port of a trunk, this
      trunk cannot be deleted.

    Conflicts:
        neutron/db/l3_dvr_db.py
        neutron/common/utils.py

    Closes-Bug: #2022059
    Change-Id: I8cfa7e67524a42224cbb4b3c3cec3cfa49b795fd
    (cherry picked from commit 833a6d82cd705548130cdac73a88d388f52c7824)
    (cherry picked from commit 2f48c24d412ee07d7cc609cf8379de83380324e3)
    (cherry picked from commit 0d499808f1f3ec6cf40bb87eb32789c463401338)

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

This issue was fixed in the openstack/neutron 23.0.0.0b3 development milestone.

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

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

commit e7bbad059199e8ef1d1dcc32070e273fd06d08b7
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue May 30 11:45:37 2023 +0200

    [OVN] Prevent Trunk creation/deletion with parent port bound

    This patch imitates the ML2/OVS Trunk driver behaviour. When the
    trunk parent port is bound:
    * A new trunk cannot be created using this parent port.
    * If the port is assigned as parent port of a trunk, this
      trunk cannot be deleted.

    Conflicts:
        neutron/db/l3_dvr_db.py
        neutron/common/utils.py
        neutron/services/trunk/drivers/ovn/trunk_driver.py
        neutron/services/trunk/plugin.py
        neutron/tests/unit/db/test_l3_dvr_db.py
        neutron/tests/unit/services/trunk/test_plugin.py

    Closes-Bug: #2022059
    Change-Id: I8cfa7e67524a42224cbb4b3c3cec3cfa49b795fd
    (cherry picked from commit 833a6d82cd705548130cdac73a88d388f52c7824)
    (cherry picked from commit 2f48c24d412ee07d7cc609cf8379de83380324e3)
    (cherry picked from commit 0d499808f1f3ec6cf40bb87eb32789c463401338)
    (cherry picked from commit 539961b4b9563588d3fe51c84b062b153d97ce68)
    (cherry picked from commit 0026b75babc4e8b873763c7aa9340ad10cc51192)

tags: added: in-stable-wallaby
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.