ports/186062: [maintainer] [patch] sysutils/ansible : speed up ssh module
Nikolai Lifanov
lifanov at mail.lifanov.com
Thu Jan 23 23:40:00 UTC 2014
>Number: 186062
>Category: ports
>Synopsis: [maintainer] [patch] sysutils/ansible : speed up ssh module
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Thu Jan 23 23:40:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Nikolai Lifanov
>Release: FreeBSD 10.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD mail.lifanov.com 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root at snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
Speed up ssh connection module by avoiding entering the same loop twice.
This reduced initial connection overhead on FreeBSD by a factor of 5.
Fix submitted by: Luc Beurton <luc dot beurton at univ-ubs dot fr>
>How-To-Repeat:
Apply this patch.
>Fix:
There are no obvious side-effects. Tested by me.
--- patch.txt begins here ---
Index: Makefile
===================================================================
--- Makefile (revision 340869)
+++ Makefile (working copy)
@@ -2,6 +2,7 @@
PORTNAME= ansible
PORTVERSION= 1.4.4
+PORTREVISION= 1
CATEGORIES= sysutils python
MASTER_SITES= http://ansibleworks.com/releases/ \
http://releases.ansible.com/ansible/
Index: files/patch-lib__ansible__runner__connection_plugins__ssh.py
===================================================================
--- files/patch-lib__ansible__runner__connection_plugins__ssh.py (revision 0)
+++ files/patch-lib__ansible__runner__connection_plugins__ssh.py (working copy)
@@ -0,0 +1,19 @@
+--- ./lib/ansible/runner/connection_plugins/ssh.py.orig 2014-01-23 17:26:19.708224593 -0500
++++ ./lib/ansible/runner/connection_plugins/ssh.py 2014-01-23 17:26:44.712222886 -0500
+@@ -237,13 +237,13 @@
+ stderr += dat
+ if dat == '':
+ rpipes.remove(p.stderr)
++ # Calling wait while there are still pipes to read can cause a lock
++ if not rpipes and p.poll() == None:
++ p.wait()
+ # only break out if we've emptied the pipes, or there is nothing to
+ # read from and the process has finished.
+ if (not rpipes or not rfd) and p.poll() is not None:
+ break
+- # Calling wait while there are still pipes to read can cause a lock
+- elif not rpipes and p.poll() == None:
+- p.wait()
+ stdin.close() # close stdin after we read from stdout (see also issue #848)
+
+ if C.HOST_KEY_CHECKING and not_in_host_file:
Property changes on: files/patch-lib__ansible__runner__connection_plugins__ssh.py
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
--- patch.txt ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list