Skip to content

Commit 9de3a9d

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "BaseWorker.worker_process_count must be > 0"
2 parents 8bbef6a + e84125e commit 9de3a9d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

neutron_lib/worker.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from oslo_service import service
1818
import setproctitle
1919

20+
from neutron_lib._i18n import _
2021
from neutron_lib.callbacks import events
2122
from neutron_lib.callbacks import registry
2223
from neutron_lib.callbacks import resources
@@ -63,6 +64,9 @@ def __init__(self, worker_process_count=_default_process_count,
6364
desc:
6465
process descriptive string
6566
"""
67+
if worker_process_count < 0:
68+
raise RuntimeError(_(
69+
'Neutron worker classes `worker_process_count` must be >= 0'))
6670
self._worker_process_count = worker_process_count
6771
self._my_pid = os.getpid()
6872
self._set_proctitle = set_proctitle

0 commit comments

Comments
 (0)