ansible / ansible

Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com.
https://www.ansible.com/
GNU General Public License v3.0
62.73k stars 23.87k forks source link

cannot terminate ControlPersist connection #30775

Closed bryanlarsen closed 5 years ago

bryanlarsen commented 7 years ago
ISSUE TYPE
COMPONENT NAME

ssh

ANSIBLE VERSION
ansible --version
ansible 2.4.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/jenkins/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
CONFIGURATION
ALLOW_WORLD_READABLE_TMPFILES(/etc/ansible/ansible.cfg) = True
ANSIBLE_SSH_ARGS(/etc/ansible/ansible.cfg) = -C -o ControlMaster=auto -o ControlPersist=60s -o ForwardAgent=yes
ANSIBLE_SSH_CONTROL_PATH(/etc/ansible/ansible.cfg) = %(directory)s/%%h-%%r
ANSIBLE_SSH_PIPELINING(/etc/ansible/ansible.cfg) = True
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 50
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 30
OS / ENVIRONMENT

Ubuntu 16.04 -> Ubuntu 16.04

SUMMARY

I used to use ansible $target -m setup --ssh-common-args="-O exit" to terminate a ControlPersist connection. This stops working in ansible 2.4

I'm doing this so I can switch ssh agents in a deployment script.

STEPS TO REPRODUCE

This has very different behaviour between 2.3 & 2.4:

ssh-agent bash -c "ssh-add ~/.ssh/id_ed25519 && ansible myhost -m shell -a 'ssh-add -l'"
ansible myhost -m setup  --ssh-common-args="-O exit"
ssh-agent bash -c "ssh-add ~/.ssh/id_rsa && ansible myhost -m shell -a 'ssh-add -l'"
EXPECTED RESULTS

In 2.3, the second command fails with UNREACHABLE, which is expected because we asked it to close the connection. The first line and the third line report signatures of different keys.

ACTUAL RESULTS

In ansible 2.4, the second command succeeds, surprisingly, and then the third command fails with "error fetching identities" because the ssh-add -l is trying to connect to the ssh-agent in the first line, which has exited.

alikins commented 7 years ago

Could you provide example output with the '-vvvvv' verbose output from the case that fails?

Are ssh retries enabled? (is ssh_connection.retries changed in ansible.cfg?)

I'm curious if commit 9f0be5a5569495a705b4cca94b48a6a8c7437896 changed this behavior.

bcoca commented 7 years ago

probably related to #27520

bryanlarsen commented 7 years ago

The "failure" is a case of unexpected success (aka I expect line 2 of my repro to fail but it succeeds on 2.4), so I'm not sure -vvvvv will help, but I'll append it anyways.

ssh_connection.retries is unchanged. I used the cool new ansible-config dump --only-changed so I presume it would show up there if I inadvertantly changed it.

I was unaware of reset_connection; I'll keep an eye on #27520 and try it when a fix lands.

$ ansible -vvvvv -i hosts minion7.clara.io -m setup  --ssh-common-args="-O exit" 
ansible 2.4.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/jenkins/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
Parsed /var/lib/jenkins/jobs/pipeline/branches/master/workspace/deploy/ansible/hosts inventory source with ini plugin
 [WARNING]: Found both group and host with same name: blue

 [WARNING]: Found both group and host with same name: vagrantNode4

 [WARNING]: Found both group and host with same name: dockerNode010Test

 [WARNING]: Found both group and host with same name: minikube

 [WARNING]: Found both group and host with same name: dockerNode4Test

Loading callback plugin minimal of type stdout, v2.0 from /usr/lib/python2.7/dist-packages/ansible/plugins/callback/__init__.pyc
META: ran handlers
 [WARNING]: While constructing a mapping from /var/lib/jenkins/jobs/pipeline/branches/master/workspace/deploy/ansible/group_vars/production, line 1, column 1, found a duplicate
dict key (vrayLicenseServer). Using last defined value only.

Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/basic.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/__init__.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/namespace.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/ansible_collector.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/default_collectors.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/_text.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/parsing/convert_bool.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/parsing/__init__.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/pycompat24.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/six/__init__.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/compat.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/timeout.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/collector.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/network/freebsd.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/virtual/openbsd.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/network/base.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/hardware/dragonfly.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/network/dragonfly.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/hardware/aix.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/network/aix.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/hardware/linux.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/platform.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/hardware/hpux.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/user.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/hardware/hurd.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/other/facter.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/virtual/sunos.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/network/hpux.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/distribution.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/virtual/freebsd.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/__init__.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/network/openbsd.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/network/darwin.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/network/linux.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/hardware/sunos.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/network/sunos.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/apparmor.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/hardware/openbsd.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/local.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/other/ohai.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/other/__init__.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/service_mgr.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/network/hurd.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/virtual/hpux.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/fips.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/selinux.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/virtual/__init__.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/pkg_mgr.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/dns.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/virtual/base.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/hardware/darwin.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/virtual/dragonfly.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/ssh_pub_keys.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/network/__init__.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/hardware/__init__.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/lsb.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/date_time.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/virtual/netbsd.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/hardware/base.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/cmdline.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/hardware/freebsd.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/network/netbsd.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/hardware/netbsd.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/caps.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/env.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/virtual/linux.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/system/python.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/network/generic_bsd.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/virtual/sysctl.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/utils.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/sysctl.py
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/system/setup.py
<minion7.clara.io> ESTABLISH SSH CONNECTION FOR USER: None
<minion7.clara.io> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)(-o)(ForwardAgent=yes)
<minion7.clara.io> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<minion7.clara.io> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=30)
<minion7.clara.io> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/jenkins/.ansible/cp/%h-%r)
<minion7.clara.io> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o ForwardAgent=yes -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=30 -o ControlPath=/home/jenkins/.ansible/cp/%h-%r minion7.clara.io '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<minion7.clara.io> (0, '/home/jenkins\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016\r\ndebug1: Reading configuration data /home/jenkins/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 17066\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<minion7.clara.io> ESTABLISH SSH CONNECTION FOR USER: None
<minion7.clara.io> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)(-o)(ForwardAgent=yes)
<minion7.clara.io> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<minion7.clara.io> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=30)
<minion7.clara.io> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/jenkins/.ansible/cp/%h-%r)
<minion7.clara.io> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o ForwardAgent=yes -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=30 -o ControlPath=/home/jenkins/.ansible/cp/%h-%r minion7.clara.io '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/jenkins/.ansible/tmp/ansible-tmp-1506436714.19-100517680130490 `" && echo ansible-tmp-1506436714.19-100517680130490="` echo /home/jenkins/.ansible/tmp/ansible-tmp-1506436714.19-100517680130490 `" ) && sleep 0'"'"''
<minion7.clara.io> (0, 'ansible-tmp-1506436714.19-100517680130490=/home/jenkins/.ansible/tmp/ansible-tmp-1506436714.19-100517680130490\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016\r\ndebug1: Reading configuration data /home/jenkins/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 17066\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<minion7.clara.io> PUT /tmp/tmpaEB5pX TO /home/jenkins/.ansible/tmp/ansible-tmp-1506436714.19-100517680130490/setup.py
<minion7.clara.io> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)(-o)(ForwardAgent=yes)
<minion7.clara.io> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<minion7.clara.io> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=30)
<minion7.clara.io> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/jenkins/.ansible/cp/%h-%r)
<minion7.clara.io> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o ForwardAgent=yes -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=30 -o ControlPath=/home/jenkins/.ansible/cp/%h-%r '[minion7.clara.io]'
<minion7.clara.io> (0, 'sftp> put /tmp/tmpaEB5pX /home/jenkins/.ansible/tmp/ansible-tmp-1506436714.19-100517680130490/setup.py\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016\r\ndebug1: Reading configuration data /home/jenkins/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 17066\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "posix-rename@openssh.com" revision 1\r\ndebug2: Server supports extension "statvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "fstatvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "hardlink@openssh.com" revision 1\r\ndebug2: Server supports extension "fsync@openssh.com" revision 1\r\ndebug3: Sent message fd 5 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/jenkins size 0\r\ndebug3: Looking up /tmp/tmpaEB5pX\r\ndebug3: Sent message fd 5 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/jenkins/.ansible/tmp/ansible-tmp-1506436714.19-100517680130490/setup.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:65536 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:7 O:98304 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:8 O:131072 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:9 O:163840 S:31536\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 32768 bytes at 32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 32768 bytes at 65536\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 7 32768 bytes at 98304\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 8 32768 bytes at 131072\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 9 31536 bytes at 163840\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<minion7.clara.io> ESTABLISH SSH CONNECTION FOR USER: None
<minion7.clara.io> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)(-o)(ForwardAgent=yes)
<minion7.clara.io> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<minion7.clara.io> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=30)
<minion7.clara.io> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/jenkins/.ansible/cp/%h-%r)
<minion7.clara.io> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o ForwardAgent=yes -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=30 -o ControlPath=/home/jenkins/.ansible/cp/%h-%r minion7.clara.io '/bin/sh -c '"'"'chmod u+x /home/jenkins/.ansible/tmp/ansible-tmp-1506436714.19-100517680130490/ /home/jenkins/.ansible/tmp/ansible-tmp-1506436714.19-100517680130490/setup.py && sleep 0'"'"''
<minion7.clara.io> (0, '', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016\r\ndebug1: Reading configuration data /home/jenkins/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 17066\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<minion7.clara.io> ESTABLISH SSH CONNECTION FOR USER: None
<minion7.clara.io> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)(-o)(ForwardAgent=yes)
<minion7.clara.io> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<minion7.clara.io> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=30)
<minion7.clara.io> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/jenkins/.ansible/cp/%h-%r)
<minion7.clara.io> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o ForwardAgent=yes -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=30 -o ControlPath=/home/jenkins/.ansible/cp/%h-%r -tt minion7.clara.io '/bin/sh -c '"'"'/usr/bin/python /home/jenkins/.ansible/tmp/ansible-tmp-1506436714.19-100517680130490/setup.py; rm -rf "/home/jenkins/.ansible/tmp/ansible-tmp-1506436714.19-100517680130490/" > /dev/null 2>&1 && sleep 0'"'"''
<minion7.clara.io> (0, '\r\n{"invocation": {"module_args": {"filter": "*", "gather_subset": ["all"], "fact_path": "/etc/ansible/facts.d", "gather_timeout": 10}}, "ansible_facts": {"ansible_product_serial": "NA", "ansible_form_factor": "Main Server Chassis", "ansible_python_version": "2.7.12", "ansible_product_version": "To be filled by O.E.M.", "ansible_fips": false, "ansible_service_mgr": "systemd", "ansible_user_id": "jenkins", "ansible_selinux_python_present": false, "ansible_userspace_bits": "64", "ansible_all_ipv4_addresses": ["192.99.32.16"], "gather_subset": ["all"]}}\r\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016\r\ndebug1: Reading configuration data /home/jenkins/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 17066\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to minion7.clara.io closed.\r\n')
minion7.clara.io | SUCCESS => {
    "ansible_facts": {
        "ansible_all_ipv4_addresses": [
...
bcoca commented 5 years ago

you probably just need to use the same control path as ansible (we avoid the default due to issues with long names) -o ControlPath=/home/jenkins/.ansible/cp/%h-%r

needs_info

ansibot commented 5 years ago

@bryanlarsen This issue is waiting for your response. Please respond or the issue will be closed.

click here for bot help

ansibot commented 5 years ago

@bryanlarsen You have not responded to information requests in this issue so we will assume it no longer affects you. If you are still interested in this, please create a new issue with the requested information.

click here for bot help