Refactor *aaS and L3 agent interaction

Bug #1433552 reported by Paul Michali
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Paul Michali

Bug Description

This bug is to do some cleanup refactoring of the *aaS and L3 agent interactions. It has several goals:

1) Switch from the L3EventObservers to the CallbacksManager mechanism for all *aaS agents.
2) Remove/reduce the dependency of *aaS agents on the L3 agent
3) Eliminate the AdvancedService base class
4) Eliminate the *(now) unused advanced_service.py and event_observer.py modules.

This will reduce from having two separate mechanisms to manage callbacks from the L3 agent to the *aaS agents and their device drivers. (#1, #4)

It also simplifies the code. Instead of the classes, like VPNService, from handling callbacks, forwarding calls to L3 agent to get router info (removed in previous refactoring), maintaining another copy of L3 agent and config settings( #2), and loading device drivers, the classes can focus just on driver loading. Will no longer need a class hierarchy for this as well (#3)

Tags: vpnaas
Paul Michali (pcm)
Changed in neutron:
assignee: nobody → Paul Michali (pcm)
status: New → In Progress
summary: - Refactor *aaS and L2 agent interaction
+ Refactor *aaS and L3 agent interaction
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-fwaas (master)

Fix proposed to branch: master
Review: https://review.openstack.org/167275

Kyle Mestery (mestery)
Changed in neutron:
milestone: none → kilo-rc1
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-fwaas (master)

Reviewed: https://review.openstack.org/167275
Committed: https://git.openstack.org/cgit/openstack/neutron-fwaas/commit/?id=b3ecce8b5daac0ef8d9f7a695c577379ba868e6c
Submitter: Jenkins
Branch: master

commit b3ecce8b5daac0ef8d9f7a695c577379ba868e6c
Author: Paul Michali <email address hidden>
Date: Tue Mar 24 11:10:50 2015 -0400

    FWaaS: Refactor callback mechanism

    As part of the cleanup work for L3 agent, where we are switching to
    a different callback mechanism, and cleaning up the *aaS agents, there
    are some minor cleanups that can be done for FWaaS.

    First, there are no callbacks defined yet for FWaaS, so we can just
    remove the old mechanism. That involves eliminating the AdvancedService
    base class, and removing the add_observer() method for callback
    registration.

    Second, the driver doesn't need access to the l3_agent, we can remove
    the argument, when constructing the FirewallService.

    Change-Id: Id509f10f126931d01c272b14ada4ad34cbf1d858
    Partial-Bug: #1433552

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

Fix proposed to branch: master
Review: https://review.openstack.org/169876

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

Reviewed: https://review.openstack.org/164466
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=593b64dee4c0923fc85d6656e29a2beb27f27b17
Submitter: Jenkins
Branch: master

commit 593b64dee4c0923fc85d6656e29a2beb27f27b17
Author: Paul Michali <email address hidden>
Date: Thu Mar 26 08:01:58 2015 -0400

    Refactoring of L3 agent notifications for router

    The goal of this refactoring is to reduce duplication by
    replacing the L3EventObservers mechanism (a specific
    mechanism for L3 agent notifications), with the
    CallbacksManager mechanism (a more general mechanism
    currently in use), so that there is one method
    used.

    This is the first part of refactoring the L3 agent so that
    it uses the new neutron.callbacks mechanism. To do this,
    duplicate calls will be made for notifications related to
    the router, only using the new callback mechanism.

    This commit does two things. First, it puts in place the
    notifiers for the new callback mechanism. Second, it updates
    the metatdata proxy agent (which is in the same repo) to
    use the new callback mechanism.

    Later commits will update other repos from the old to new
    callback mechanism, and to then remove the old callback
    mechanism, once no longer used.

    Change-Id: If134947957fd671aa99a0b2d2b37f7ec65e37766
    Partial-Bug: #1433552

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-vpnaas (master)

Reviewed: https://review.openstack.org/165226
Committed: https://git.openstack.org/cgit/openstack/neutron-vpnaas/commit/?id=f1a50db9d9c0fec2be0021e142184dd06dd60391
Submitter: Jenkins
Branch: master

commit f1a50db9d9c0fec2be0021e142184dd06dd60391
Author: Paul Michali <email address hidden>
Date: Tue Mar 17 17:09:26 2015 -0400

    VPNaaS: Refactoring to use callback mechanism

    This is part 2 of the refactoering that goes along with the changes
    in Neutron from review 164466. For this to run, it depends on that
    patch.

    The change does several things. First, it uses the new callback
    mechanism. Note: This mechanism doesn't currently support defining
    cass methods as callbacks, so standalone methods are used.

    Second, it attempts to remove the need (as much as possible) for
    the device drivers to be accepting the VpnService object in __init__().
    The idea is to totally remove the argument. However, the Vyatta driver,
    as currently implemented, needs it. Hopefully a follow-up can remove
    this arg, and instead, will just pass down a config object, so that
    tests can override config settings. This also fixes naming of places
    that had agent, which are really using vpn_service.

    Third, the AdvancedService ABC is removed as a base class for the
    VPNService class. Without the L3 agent being saved, and not using
    the L3 agent config, the class is not needed.

    After this commit, the final step will be to remove the event observer
    callback mechanism and AdvancedService class from neutron (once FWaaS
    is updated too).

    Change-Id: If5040a827a6903cc7cb5e59cdb7fb95f61b13d47
    Partial-Bug: #1433552
    Depends-On: If134947957fd671aa99a0b2d2b37f7ec65e37766

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

Reviewed: https://review.openstack.org/169876
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=9bca9ca84b76cc5bba03e9c0ff42bceaf5d2b028
Submitter: Jenkins
Branch: master

commit 9bca9ca84b76cc5bba03e9c0ff42bceaf5d2b028
Author: Paul Michali <email address hidden>
Date: Wed Apr 1 13:47:43 2015 -0400

    Refactoring cleanup for L3 agent callbacks

    This commit completes the refactoring of the L3 agent callback mechanism.
    The goal here is to also use the neutron/callbacks/ mechanism for L3 agent
    notifications, instead of have two mechanisms.

    [1] modified the L3 agent to send notifiactions for router create, udpate,
    and delete events, using the neutron/callbacks/ mechanism.

    [2] modified VPN to use this new mechanism, instead of the L3EventObservers
    mechanism. Note:

    [3] modified FW repo to no longer depended on the L3EventObserver and
    related objects (it doesn't currently use the event notifications).

    This commit removes the notifications for the L3EventObservers mechanism,
    removed the related modules and tests, and adds in tests to verify that the
    new notifications are called for the different events.

    Once [1] and [2] are upstreamed, this commit can proceed.

    Refs:
    [1] https://review.openstack.org/#/c/164466/
    [2] https://review.openstack.org/#/c/165226/
    [3] https://review.openstack.org/#/c/167275/

    Change-Id: I7c4b4ea5f9fb19abb812665cdae5fb70c84fe3ec
    Depends-On: If5040a827a6903cc7cb5e59cdb7fb95f61b13d47
    Closes-Bug: #1433552

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-rc1 → 2015.1.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (neutron-pecan)

Fix proposed to branch: neutron-pecan
Review: https://review.openstack.org/185072

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.