← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2087944] [NEW] [eventlet-deprecation] Remove the usage of eventlet in the DHCP agent

 

Public bug reported:

References:
* https://etherpad.opendev.org/p/oct2024-ptg-neutron
* https://etherpad.opendev.org/p/neutron-eventlet-deprecation

Remove the import and usage of the eventlet library in the DHCP agent.

============================================================

It is spawned using ``oslo_service.launch``. Same comment as in the OVN
Neutron agent.

It uses RPC (``oslo.messaging``), but the client side seems to be
``threading`` friendly. It doesn’t create an RPC consumer to listen to
the Neutron API resource updates (it is done differently to other
agents).

If the DHCP agent uses the metadata service, it will have the same
problem as in the OVN metadata agent. But for OSP18, where the default
driver is ML2/OVN, the DHCP should not spawn any metadata service.

The DHCP agent uses up to 3 threads, spawned with ``eventlet``, to perform the following tasks:
* Process the ready ports.
* Reload the bulk allocations.
* Process the RPC events. Before https://review.opendev.org/c/openstack/neutron/+/923626, a mechanism was implemented to create several threads to process the events. That was removed as unnecessary because it does not increase the processing speed.

These threads should not interfere with each other. Despite of this,
https://review.opendev.org/c/openstack/neutron/+/924300 was merged to
lock the ``ready_ports_loop`` in case of syncing.

This agent, with minimal effort, should be ready to be migrated to
``threading`` instead of ``eventlet``.

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2087944

Title:
  [eventlet-deprecation] Remove the usage of eventlet in the DHCP agent

Status in neutron:
  New

Bug description:
  References:
  * https://etherpad.opendev.org/p/oct2024-ptg-neutron
  * https://etherpad.opendev.org/p/neutron-eventlet-deprecation

  Remove the import and usage of the eventlet library in the DHCP agent.

  ============================================================

  It is spawned using ``oslo_service.launch``. Same comment as in the
  OVN Neutron agent.

  It uses RPC (``oslo.messaging``), but the client side seems to be
  ``threading`` friendly. It doesn’t create an RPC consumer to listen to
  the Neutron API resource updates (it is done differently to other
  agents).

  If the DHCP agent uses the metadata service, it will have the same
  problem as in the OVN metadata agent. But for OSP18, where the default
  driver is ML2/OVN, the DHCP should not spawn any metadata service.

  The DHCP agent uses up to 3 threads, spawned with ``eventlet``, to perform the following tasks:
  * Process the ready ports.
  * Reload the bulk allocations.
  * Process the RPC events. Before https://review.opendev.org/c/openstack/neutron/+/923626, a mechanism was implemented to create several threads to process the events. That was removed as unnecessary because it does not increase the processing speed.

  These threads should not interfere with each other. Despite of this,
  https://review.opendev.org/c/openstack/neutron/+/924300 was merged to
  lock the ``ready_ports_loop`` in case of syncing.

  This agent, with minimal effort, should be ready to be migrated to
  ``threading`` instead of ``eventlet``.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2087944/+subscriptions