Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
706ba9fd
Commit
706ba9fd
authored
Mar 28, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add paramiko/pycrypto atfork workaround (can back out later if not useful), tweak error
message text per skvidal's suggestion
parent
b30ddc45
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletions
+15
-1
lib/ansible/connection.py
+1
-1
lib/ansible/runner.py
+14
-0
No files found.
lib/ansible/connection.py
View file @
706ba9fd
...
...
@@ -70,7 +70,7 @@ class ParamikoConnection(object):
)
except
Exception
,
e
:
if
str
(
e
)
.
find
(
"PID check failed"
)
!=
-
1
:
raise
errors
.
AnsibleError
(
"paramiko version issue, please upgrade paramiko on the
overlord
"
)
raise
errors
.
AnsibleError
(
"paramiko version issue, please upgrade paramiko on the
machine running ansible
"
)
else
:
raise
errors
.
AnsibleConnectionFailed
(
str
(
e
))
return
self
...
...
lib/ansible/runner.py
View file @
706ba9fd
...
...
@@ -33,12 +33,26 @@ import ansible.connection
from
ansible
import
utils
from
ansible
import
errors
from
ansible
import
callbacks
as
ans_callbacks
HAS_ATFORK
=
True
try
:
print
"DEBUG: I have atfork"
from
Crypto.Random
import
atfork
except
ImportError
:
print
"DEBUG: I have no atfork, this won't help my problem"
HAS_ATFORK
=
False
################################################
def
_executor_hook
(
job_queue
,
result_queue
):
''' callback used by multiprocessing pool '''
# attempt workaround of https://github.com/newsapps/beeswithmachineguns/issues/17
# does not occur for everyone, some claim still occurs on newer paramiko
# this function not present in CentOS 6
if
HAS_ATFORK
:
atfork
()
signal
.
signal
(
signal
.
SIGINT
,
signal
.
SIG_IGN
)
while
not
job_queue
.
empty
():
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment