Exercise pidfile before daemonizing
This is one of the few errors that can cause us to silently fail to start. Change-Id: Id5dbf737f55770d77e76fe94f72c2e39b9891dae
This commit is contained in:
parent
4991bd5745
commit
08409fb2fa
|
@ -166,6 +166,11 @@ class NodepoolDaemonApp(NodepoolApp):
|
|||
if is_pidfile_stale(pid):
|
||||
pid.break_lock()
|
||||
|
||||
# Exercise the pidfile before we do anything else (including
|
||||
# logging or daemonizing)
|
||||
with pid:
|
||||
pass
|
||||
|
||||
with daemon.DaemonContext(pidfile=pid):
|
||||
return super(NodepoolDaemonApp, self)._do_run()
|
||||
|
||||
|
|
Loading…
Reference in New Issue