[L3] L3 agent extension should always inherit from "L3AgentExtension"

Bug #1951569 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Rodolfo Alonso

Bug Description

All L3 agent extensions should inherit from "neutron_lib.agent.l3_extension.L3AgentExtension". The "L3AgentExtensionsManager" should check, just after the extension initialization, if the loaded extensions inherit from this API. If not, the extension will raise an exception and exit.

Once this check is done, all methods ("add_router", "update_router", "delete_router" and "ha_state_change") can directly call the extension function without checking the presence or not of the related function. That is ensured by making all extension inherit by the defined API (located in neutron-lib and available for any project).

Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
importance: Undecided → Low
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/+/818540

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

commit ebca47365c261b881d0c0e0135821ce03471a336
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Fri Nov 19 11:45:15 2021 +0000

    "L3AgentExtensionsManager" check loaded extensions

    Now "L3AgentExtensionsManager" lists loaded extension, checking if
    they inherit from "neutron_lib.agent.l3_extension.L3AgentExtension".
    If any extension does not, the L3 agent raises an exception and exits.

    Closes-Bug: #1951569
    Change-Id: I3ce4858cef9b3a3d7eab005dd1ad2bb3b5ef6ef3

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-lib (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron-lib/+/831002

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

Reviewed: https://review.opendev.org/c/openstack/neutron-lib/+/831002
Committed: https://opendev.org/openstack/neutron-lib/commit/f765e3c21c52f97c713697db4d84c526054078f3
Submitter: "Zuul (22348)"
Branch: master

commit f765e3c21c52f97c713697db4d84c526054078f3
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Fri Feb 25 15:59:31 2022 +0000

    Rehome exception ``L3ExtensionException``

    Change-Id: I460b3d1b6c219534e56a263bcb41790fce32dd5e
    Related-Bug: #1951569

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

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