reap rootwrap daemon process when it is timeout
When the daemon process is timeout, it will kill itself. But the parent doesn't reap it. This patch add a thread to wait the process to be done once the daemon is started. Closes-Bug: #1850241 Change-Id: Ic209b8ef86c2522ce7e4bd81ac57bf13f1706a81
This commit is contained in:
parent
c6babc7222
commit
c9a57aab08
@ -85,6 +85,15 @@ class Client(object):
|
|||||||
(stderr,))
|
(stderr,))
|
||||||
LOG.info("Spawned new rootwrap daemon process with pid=%d",
|
LOG.info("Spawned new rootwrap daemon process with pid=%d",
|
||||||
process_obj.pid)
|
process_obj.pid)
|
||||||
|
|
||||||
|
def wait_process():
|
||||||
|
return_code = process_obj.wait()
|
||||||
|
LOG.info("Rootwrap daemon process exit with status: %d",
|
||||||
|
return_code)
|
||||||
|
|
||||||
|
reap_process = threading.Thread(target=wait_process)
|
||||||
|
reap_process.daemon = True
|
||||||
|
reap_process.start()
|
||||||
self._manager = ClientManager(socket_path, authkey)
|
self._manager = ClientManager(socket_path, authkey)
|
||||||
self._manager.connect()
|
self._manager.connect()
|
||||||
self._proxy = self._manager.rootwrap()
|
self._proxy = self._manager.rootwrap()
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Reap the rootwrap daemon process after it is timeout and quit. When the
|
||||||
|
daemon process is timeout, it will kill itself. But the parent doesn't reap
|
||||||
|
it. Fixed this behaviour by adding a thread to wait the process to be done
|
||||||
|
once the daemon is started.
|
||||||
|
|
||||||
|
More info please refer the LP #1850241 [1].
|
||||||
|
|
||||||
|
[1] https://bugs.launchpad.net/oslo.rootwrap/+bug/1850241
|
Loading…
Reference in New Issue
Block a user