Use different process title for RpcReportsWorker and RpcWorker

Currently both RpcReportsWorker and RpcWorker are launched with
the same process title("rpc worker"), and we can't distinguish one from
the other.

This changes the process title of RpcReportsWorker, so that we can
find the worker used by RpcReportsWorker, not by RpcWorker.

Change-Id: I610a00667762bbdd45bc72c5a865694b92cfd45a
This commit is contained in:
Takashi Kajinami 2024-02-05 18:01:28 +09:00 committed by Brian Haley
parent b85b19e384
commit babb63275d
2 changed files with 15 additions and 1 deletions

View File

@ -96,6 +96,7 @@ def serve_wsgi(cls):
class RpcWorker(neutron_worker.NeutronBaseWorker):
"""Wraps a worker to be handled by ProcessLauncher"""
start_listeners_method = 'start_rpc_listeners'
desc = 'rpc worker'
def __init__(self, plugins, worker_process_count=1):
super(RpcWorker, self).__init__(
@ -106,7 +107,7 @@ class RpcWorker(neutron_worker.NeutronBaseWorker):
self._servers = []
def start(self):
super(RpcWorker, self).start(desc="rpc worker")
super(RpcWorker, self).start(desc=self.desc)
for plugin in self._plugins:
if hasattr(plugin, self.start_listeners_method):
try:
@ -146,6 +147,7 @@ class RpcWorker(neutron_worker.NeutronBaseWorker):
class RpcReportsWorker(RpcWorker):
start_listeners_method = 'start_rpc_state_reports_listener'
desc = 'rpc reports worker'
def _get_worker_count():

View File

@ -0,0 +1,12 @@
---
features:
- |
Neutron now sets different process titles for RPC workers ('rpc worker') and
RPC reports worker ('rpc reports worker') so that these two types of workers
can be distinguished.
upgrade:
- |
The process title for RPC reports worker has been changed from
'rpc worker' to 'rpc reports worker'. Please update any external scripts or
services which look up the process title accordingly.