OVN octavia provider driver should spawn long-living process in driver agent

Bug #1871355 reported by Maciej Jozefczyk
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Brian Haley

Bug Description

The OVN Octavia provider driver in OvnProviderHelper caches attributes [1]:

ovn_nbdb_api_for_events = None
ovn_nb_idl_for_events = None
ovn_nbdb_api = None

to not re-create each time OVN IDL that is used for handling events.

Now we are able to use Octavia Driver Agent [2] instead to not have those long-living IDLs in API process.

TODO:
- create driver agent and register its entry point
- While setting up the driver agent instance start IDL that will handle events:
https://opendev.org/openstack/ovn-octavia-provider/src/branch/master/ovn_octavia_provider/driver.py#L279
- stop caching ovn_nbdb_api, ovn_nb_idl_for_events and ovn_nbdb_api_for_events in the OvnProviderHelper.

[1] https://opendev.org/openstack/ovn-octavia-provider/src/branch/master/ovn_octavia_provider/driver.py#L273
[2] https://docs.openstack.org/octavia/latest/contributor/guides/providers.html#provider-agent-method-invocation

Changed in neutron:
importance: Undecided → High
Revision history for this message
Lajos Katona (lajos-katona) wrote :

Isn't this more an RFE?

Revision history for this message
Maciej Jozefczyk (maciejjozefczyk) wrote :

This will not change anything from user perspective. I could say that it is a bug, cause we shouldn't have long living process running in Octavia WSGI application.

Changed in neutron:
assignee: nobody → Brian Haley (brian-haley)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ovn-octavia-provider (master)

Fix proposed to branch: master
Review: https://review.opendev.org/718203

Changed in neutron:
status: New → In Progress
Changed in neutron:
assignee: Brian Haley (brian-haley) → Maciej Jozefczyk (maciej.jozefczyk)
Changed in neutron:
assignee: Maciej Jozefczyk (maciej.jozefczyk) → Brian Haley (brian-haley)
Changed in neutron:
assignee: Brian Haley (brian-haley) → Maciej Jozefczyk (maciej.jozefczyk)
Changed in neutron:
assignee: Maciej Jozefczyk (maciej.jozefczyk) → Brian Haley (brian-haley)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ovn-octavia-provider (master)

Reviewed: https://review.opendev.org/718203
Committed: https://git.openstack.org/cgit/openstack/ovn-octavia-provider/commit/?id=c6cee9207349a12e499cbc81fe0e5d4d5bfa015c
Submitter: Zuul
Branch: master

commit c6cee9207349a12e499cbc81fe0e5d4d5bfa015c
Author: Brian Haley <email address hidden>
Date: Tue Apr 7 15:54:57 2020 -0400

    Spawn long-running processes in the driver agent

    The OVN Octavia provider driver in the OvnProviderHelper
    class caches these attributes:

        ovn_nbdb_api_for_events
        ovn_nb_idl_for_events
        ovn_nbdb_api

    to not re-create things each time OVN IDL that is used for
    handling events is called.

    We should be using the Octavia Driver Provider Agent framework
    instead to not have those long-running IDLs in the API process.

    This change:
    - Creates driver provider agent and registers its entry point
    - While setting up the driver agent instance, start IDL that
      will handle events
    - Stop caching ovn_nbdb_api, ovn_nb_idl_for_events and
      ovn_nbdb_api_for_events in the OvnProviderHelper class

    Change-Id: I0034a48997bd6b95e1b51bfcbd56e8372b35e62f
    Closes-bug: #1871355

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ovn-octavia-provider (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/722796

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

Reviewed: https://review.opendev.org/722796
Committed: https://git.openstack.org/cgit/openstack/ovn-octavia-provider/commit/?id=8abe519c65234db5cf6df1dbaaf9457a0f5e905a
Submitter: Zuul
Branch: stable/ussuri

commit 8abe519c65234db5cf6df1dbaaf9457a0f5e905a
Author: Brian Haley <email address hidden>
Date: Tue Apr 7 15:54:57 2020 -0400

    Spawn long-running processes in the driver agent

    The OVN Octavia provider driver in the OvnProviderHelper
    class caches these attributes:

        ovn_nbdb_api_for_events
        ovn_nb_idl_for_events
        ovn_nbdb_api

    to not re-create things each time OVN IDL that is used for
    handling events is called.

    We should be using the Octavia Driver Provider Agent framework
    instead to not have those long-running IDLs in the API process.

    This change:
    - Creates driver provider agent and registers its entry point
    - While setting up the driver agent instance, start IDL that
      will handle events
    - Stop caching ovn_nbdb_api, ovn_nb_idl_for_events and
      ovn_nbdb_api_for_events in the OvnProviderHelper class

    Conflicts:
       ovn_octavia_provider/tests/functional/test_driver.py

    Change-Id: I0034a48997bd6b95e1b51bfcbd56e8372b35e62f
    Closes-bug: #1871355
    (cherry picked from commit c6cee9207349a12e499cbc81fe0e5d4d5bfa015c)

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