Rodolfo Alonso Hernandez b2a6b6cf36 [eventlet-deprecation] Implement a metadata proxy without eventlet
A new embedded socket server for the metadata proxy is implemented.
This new implementation mimics the implementation of the
``UnixDomainWSGIServer`` class. The server listens to a file socket
that is populated by the HAProxy instance running inside the
network metadata namespace. The HAProxy writes the requests of the
virtual machines on the Unix file socket and the metadata proxy
sends the requests to the Nova metadata server.

This new implementation does not relies on ``neutron.api.wsgi.Server``
nor ``eventlet.wsgi.server``. It inherits from the built-in library
class ``socketserver.StreamRequestHandler``.

This implementation doesn't use ``oslo.services`` to spawn the
processes or the local threads depending on the ``metadata_workers``
configuration variable. Right now only the embedded form (local thread)
is implemented (metadata_workers=0, the default value). Future
implementations will enable again this configuration variable.

This patch also removes the use of ``oslo_service.launch`` to execute
the agent main thread. This should be restored once this library
removes the use of ``eventlet``.

Closes-Bug: #2087942
Change-Id: I007fb7452d709f4b711d8efb9dea5f374de668b4
2025-01-10 06:59:37 +00:00

2.3 KiB

Eventlet Deprecation Reference

This document contains the information related to the eventlet library deprecation. Each section describes how each module has been migrated, the caveats, the pending technical debt and the missing parts.

OVN Agent

Launch process

The execution of the OVN agent has been replaced. Instead of using oslo_services.launch, that is still using eventlet, the agent creates a threading.Event instance and holds the main thread execution by waiting for this event.

Note

Once the oslo_services library removes the usage of eventlet, the previous implementation will be restored. The oslo_services.service.ProcessLauncher service launcher implements a signal handler.

Metadata proxy

The UnixDomainWSGIServer class has been replaced with a new implementation. This implementation does not rely on neutron.api.wsgi.Server nor eventlet.wsgi.server. It inherits from the built-in library class socketserver.StreamRequestHandler.

Note

This implementation doesn't use oslo_services to spawn the processes or the local threads depending on the metadata_workers configuration variable. Right now only the embedded form (local thread) is implemented (metadata_workers=0, the default value). Future implementations will enable again this configuration variable.