# Request for testing: upgraded ssh handling now on development HEAD

**URL:** <https://forum.ansible.com/t/request-for-testing-upgraded-ssh-handling-now-on-development-head/14121>\
**Category:** Ansible Project\
**Created:** [December 10, 2013, 11:52pm UTC](https://forum.ansible.com/t/request-for-testing-upgraded-ssh-handling-now-on-development-head/14121 "2013-12-10T23:52:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [December 10, 2013, 11:52pm UTC](https://forum.ansible.com/t/request-for-testing-upgraded-ssh-handling-now-on-development-head/14121/1 "2013-12-10T23:52:39Z")

</div>

Hi all,

A recent discussion on the development list introduced some great patches from Jerome Wagner, which have streamlined the number of SSH operations Ansible has to perform for a certain class of tasks. This makes the ssh implementation even faster (and especially so with Control Persist on, which we encourage!).

This works by not transferring files and creating tempdirs in many situations where a module doesn’t require file transfer, rather, by just pushing the module over the SSH channel and running it directly without saving it to disk.

It seems to be good for a 40-50% network performance upgrade in a basic case where some steps require file transfer and others don’t. It may be much more for many playbooks.

It won’t be very noticeable if your network is already great, but if it’s not, or you’re managing across the open internet, it’s pretty nice.

Naturally, this will do nothing for package update time, which is where you’ll be spending most of your management cycles in most playbooks anyway.

Rather than directly import this code for testing on the development branch, we’ve checked it in temporarily as “ssh\_alt.py”. I’d be curious if you had regular playbooks you used if you could test this version to:

(A) see if there are any errors

(B) what sort of performance differences you see between -c ssh and -c ssh\_alt. (Note: if your playbook has hard coded the connection in it, please remove the connection: line before testing, and be sure you are not using accelerate mode, as this will invalidate the tests).

(C) if possible, what data you get for accelerate mode.

Please don’t share local test (127.0.0.1) numbers, and after we get a few replies, we’ll mostly just be interested in hearing about any errors you might have encountered.

Remember you need to use -c ssh\_alt to activate this for now.

Thanks very much and thanks for a very cool patch set Jerome!

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [December 11, 2013, 12:25am UTC](https://forum.ansible.com/t/request-for-testing-upgraded-ssh-handling-now-on-development-head/14121/2 "2013-12-11T00:25:44Z")

</div>

Ok this was breaking async, we will get it working shortly!

---

<div class="post-metadata">

**Author:** ![tannerjc](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tannerjc/32/985_2.png) [@tannerjc](https://forum.ansible.com/u/tannerjc)\
**Post date:** [December 16, 2013, 3:12pm UTC](https://forum.ansible.com/t/request-for-testing-upgraded-ssh-handling-now-on-development-head/14121/3 "2013-12-16T15:12:17Z")

</div>

ssh\_alt has been merged in again with numerous fixes: [https://github.com/ansible/ansible/pull/5247](https://github.com/ansible/ansible/pull/5247)

We have seen impressive performance increases from using this connection method and I would like to thank Jerome Wagner for all the work he has put into it.

Per Michael’s previous email, please share your results.

---

<div class="post-metadata">

**Author:** ![PhilEv](https://avatars.discourse-cdn.com/v4/letter/p/ee59a6/32.png) [@PhilEv](https://forum.ansible.com/u/PhilEv)\
**Post date:** [December 17, 2013, 1:49pm UTC](https://forum.ansible.com/t/request-for-testing-upgraded-ssh-handling-now-on-development-head/14121/4 "2013-12-17T13:49:20Z")

</div>

Just built and installed ansible-1.5-0.git201312162123.fc20.noarch.rpm  
ssh-alt Running well except Hitting the following issue:

ignore-errors in loop are failing with ssh\_alt

The test I did with ssh\_alt during its development was not showing the issue.

How to reproduce:

have a Play with one task like:

- name: Make sure the following services are turned off  
service: name={{ item }} enabled=no state=stopped  
with\_items: disabled\_services\_list\_var  
ignore\_errors: True  
tags:
- service\_disable

and a variable like

disabled\_services\_list\_var:

- ‘blk-availability’
- ‘certmonger’
- ‘cpuspeed’

Note: that certmonger rpm is not installed in the target system

run the play with -c ssh\_alt gives:

TASK: [Make sure the following services are turned off] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
changed: [targetsystem] =\> (item=blk-availability)  
fatal: [targetsystem] =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh  
FATAL: all hosts have already failed – aborting

running without ssh\_alt gives:

TASK: [Make sure the following services are turned off] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
changed: [targetsystem] =\> (item=blk-availability)  
failed: [targetsystem] =\> (item=certmonger) =\> {“failed”: true, “item”: “certmonger”}  
msg: cannot find ‘service’ binary or init script for service, possible typo in service name?, aborting  
…ignoring  
ok: [targetsystem] =\> (item=cpuspeed)  
PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
targetsystem : ok=2 changed=1 unreachable=0 failed=0

---

<div class="post-metadata">

**Author:** ![tannerjc](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tannerjc/32/985_2.png) [@tannerjc](https://forum.ansible.com/u/tannerjc)\
**Post date:** [December 17, 2013, 2:15pm UTC](https://forum.ansible.com/t/request-for-testing-upgraded-ssh-handling-now-on-development-head/14121/5 "2013-12-17T14:15:37Z")

</div>

Thanks Philippe, can you file a bug for this?

---

<div class="post-metadata">

**Author:** ![PhilEv](https://avatars.discourse-cdn.com/v4/letter/p/ee59a6/32.png) [@PhilEv](https://forum.ansible.com/u/PhilEv)\
**Post date:** [December 17, 2013, 2:47pm UTC](https://forum.ansible.com/t/request-for-testing-upgraded-ssh-handling-now-on-development-head/14121/6 "2013-12-17T14:47:49Z")

</div>

Done.  
See [https://github.com/ansible/ansible/issues/5320](https://github.com/ansible/ansible/issues/5320)

Thanks

Phil.
