Files
neutron/neutron/agent/l3/agent.py
Rodolfo Alonso Hernandez 99bd0c9331 Move the RPC initialization to the `Service.start` phase
The RPC L3 agent clients and servers should be instantiated and
initalizated during the ``Service`` start phase, not during the
class initalization. The L3 agent main class is handled by the
``oslo_service.Service`` class as the manager class. When the
process (L3 agent) is started, the service class forks the process
during the ``service.launch`` call [1]. That could lead to issues
with the created RPC client/servers before the fork [2].

This patch moves all the RPC instantiation and initialization to
the ``Service.start`` method, that first calls the manager
``init_host`` method.

This patch must work both with the current ``oslo.service`` backend
(eventlet) and the future implementation (threading) [3].

[1]a2af9b8baa/neutron/agent/l3_agent.py (L61)
[2]510688d8dd/oslo_messaging/_drivers/impl_rabbit.py (L1081-L1086)
[3]https://review.opendev.org/c/openstack/oslo.service/+/945720

Partial-Bug: #2087943
Change-Id: Ic8561f5b971a04b95c381daa05a071582ab4b3b5
2025-05-21 09:20:22 +00:00

43 KiB