Limit the worker type in neutron-periodic-workers service
The service "neutron-periodic-workers" is in charge of executing the ML2 plugin periodic workers (usually ``PeriodicWorker`` type). These workers have a worker_process_count=0. Before this patch, the method ``start_periodic_workers`` was also spawning other ML2 plugin workers, as the ML2/OVN ``MaintenanceWorker``, not expected to be running in this service. Closes-Bug: #2071920 Related-Bug: #2069581 Change-Id: Ic87ec5cc5037cab6eb0e24746a95ab4c8447870b
This commit is contained in:
@@ -320,7 +320,9 @@ def start_rpc_workers():
|
||||
|
||||
def start_periodic_workers():
|
||||
periodic_workers = _get_plugins_workers()
|
||||
launcher = _start_workers(periodic_workers)
|
||||
thread_workers = [worker for worker in periodic_workers
|
||||
if worker.worker_process_count < 1]
|
||||
launcher = _start_workers(thread_workers)
|
||||
registry.publish(resources.PROCESS, events.AFTER_SPAWN, None)
|
||||
return launcher
|
||||
|
||||
|
||||
Reference in New Issue
Block a user