Merge "Fix native threads on child process"

This commit is contained in:
Zuul 2023-12-19 19:14:19 +00:00 committed by Gerrit Code Review
commit 3900aa7db5
2 changed files with 12 additions and 0 deletions

View File

@ -34,6 +34,7 @@ import time
import eventlet
from eventlet import event
from eventlet import tpool
from oslo_concurrency import lockutils
from oslo_service._i18n import _
@ -560,6 +561,9 @@ class ProcessLauncher(object):
pid = os.fork()
if pid == 0:
# When parent used native threads the library on child needs to be
# "reset", otherwise native threads won't work on the child.
tpool.killall()
self.launcher = self._child_process(wrap.service)
while True:
self._child_process_handle_signal()

View File

@ -0,0 +1,8 @@
---
fixes:
- |
`Bug #1983949
<https://bugs.launchpad.net/oslo.service/+bug/1983949>`_: Fixed eventlet
native threads tpool on child process when parent process has used them
before launching the service.