Remove workaround for early paramiko import
As discussed in the original bug [1] one of the reasons to not
daemonize after import of paramiko is that it creates a global
Crypto.Random() object which is used around the place, however the
close of fd's in the daemonize breaks that object's connection to
/dev/urandom.
However, it seems that this issue is no longer as paramiko now
directly uses urandom and has no global object [2]. Requirements is
updated to the first release after this change.
We have also removed the use of the global statsd object in
I6d339a8c631f8508a60e9ef890173780157adefd.
Thus we should be able to return this to it's simpler form
[1] https://github.com/paramiko/paramiko/issues/59
[2] 6f211115f4
Change-Id: I6cf3ba0df857f4213b0ec658ebd0511a24618175
This commit is contained in:
parent
81cc4cfbb8
commit
b8e432ebd6
|
@ -30,12 +30,9 @@ import signal
|
|||
import traceback
|
||||
import threading
|
||||
|
||||
import nodepool.cmd
|
||||
import nodepool.builder
|
||||
|
||||
# No nodepool imports here because they pull in paramiko which must not be
|
||||
# imported until after the daemonization.
|
||||
# https://github.com/paramiko/paramiko/issues/59
|
||||
import nodepool.cmd
|
||||
import nodepool.nodepool
|
||||
|
||||
|
||||
def stack_dump_handler(signum, frame):
|
||||
|
@ -112,7 +109,6 @@ class NodePoolDaemon(nodepool.cmd.NodepoolApp):
|
|||
os._exit(0)
|
||||
|
||||
def main(self):
|
||||
import nodepool.nodepool
|
||||
self.setup_logging()
|
||||
self.pool = nodepool.nodepool.NodePool(self.args.secure,
|
||||
self.args.config)
|
||||
|
|
|
@ -3,7 +3,7 @@ pbr>=1.3
|
|||
gear
|
||||
PyYAML
|
||||
python-jenkins
|
||||
paramiko>1.9.0
|
||||
paramiko>1.11.6
|
||||
python-daemon>=2.0.4,<2.1.0
|
||||
extras
|
||||
statsd>=3.0
|
||||
|
|
Loading…
Reference in New Issue