From babb63275dccf9a6f120bbaf03bf0a6de6ed4cfb Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 5 Feb 2024 18:01:28 +0900 Subject: [PATCH] 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 --- neutron/service.py | 4 +++- ...c-reports-worker-proc-title-09671cd397685403.yaml | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/update-rpc-reports-worker-proc-title-09671cd397685403.yaml diff --git a/neutron/service.py b/neutron/service.py index 423d5cd7d68..11981e138b6 100644 --- a/neutron/service.py +++ b/neutron/service.py @@ -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(): diff --git a/releasenotes/notes/update-rpc-reports-worker-proc-title-09671cd397685403.yaml b/releasenotes/notes/update-rpc-reports-worker-proc-title-09671cd397685403.yaml new file mode 100644 index 00000000000..80cb6c724be --- /dev/null +++ b/releasenotes/notes/update-rpc-reports-worker-proc-title-09671cd397685403.yaml @@ -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.