{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/43880","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/43880/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/43880/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/43880/events","html_url":"https://github.com/ansible/ansible/issues/43880","id":349077122,"node_id":"MDU6SXNzdWUzNDkwNzcxMjI=","number":43880,"title":"Fetch module loses connection when pipelining is true","user":{"login":"tomtastic","id":302127,"node_id":"MDQ6VXNlcjMwMjEyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/302127?v=4","gravatar_id":"","url":"https://api.github.com/users/tomtastic","html_url":"https://github.com/tomtastic","followers_url":"https://api.github.com/users/tomtastic/followers","following_url":"https://api.github.com/users/tomtastic/following{/other_user}","gists_url":"https://api.github.com/users/tomtastic/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtastic/subscriptions","organizations_url":"https://api.github.com/users/tomtastic/orgs","repos_url":"https://api.github.com/users/tomtastic/repos","events_url":"https://api.github.com/users/tomtastic/events{/privacy}","received_events_url":"https://api.github.com/users/tomtastic/received_events","type":"User","site_admin":false},"labels":[{"id":562292166,"node_id":"MDU6TGFiZWw1NjIyOTIxNjY=","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.4","name":"affects_2.4","color":"ededed","default":false},{"id":785271699,"node_id":"MDU6TGFiZWw3ODUyNzE2OTk=","url":"https://api.github.com/repos/ansible/ansible/labels/bug","name":"bug","color":"fbca04","default":true},{"id":496359346,"node_id":"MDU6TGFiZWw0OTYzNTkzNDY=","url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":636352796,"node_id":"MDU6TGFiZWw2MzYzNTI3OTY=","url":"https://api.github.com/repos/ansible/ansible/labels/support:core","name":"support:core","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-09T10:53:33Z","updated_at":"2018-08-13T16:05:41Z","closed_at":null,"author_association":"NONE","body":"##### SUMMARY\r\nFetch module reports failure despite success when pipelining is true.\r\n\"msg\": \"Failed to connect to the host via ssh: \", \"unreachable\": true.\r\n\r\n##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\nfetch\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.4.2.0\r\n  config file = /development/ansible/ansible.cfg\r\n  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/site-packages/ansible\r\n  executable location = /usr/bin/ansible\r\n  python version = 2.7.5 (default, May 31 2018, 09:41:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]\r\n```\r\n\r\n##### CONFIGURATION\r\nDEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = [u'/etc/ansible/roles', u'/usr/share/ansible/roles']\r\n\r\n##### OS / ENVIRONMENT\r\nRHEL7.5 running Ansible, managing AIX6.1.\r\n\r\n##### STEPS TO REPRODUCE\r\nEnable `pipelining=true` in ansible.cfg\r\n\r\n```yaml\r\n- name: Fetch to storage\r\n  fetch:\r\n    src: '{{ item.path }}'\r\n    dest: '/development/ansible/output/{{ inventory_hostname }}/'\r\n    flat: yes\r\n  with_items: '{{ agent_log.files }}\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nFiles fetched over {SFTP/SCP/piped} successfully.\r\n\r\n##### ACTUAL RESULTS\r\nAnsible warns that SFTP and SCP both failed (despite me having manually tested both can work), then FAILs the play due to host unreachable. Despite this, the files _are_ in fact fetched.\r\n\r\n[ansible_fetch_problem.txt](https://github.com/ansible/ansible/files/2273866/ansible_fetch_problem.txt)\r\n\r\nRunning without pipelining=true works as expected and files are transferred via sftp."},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/412571532","html_url":"https://github.com/ansible/ansible/issues/43880#issuecomment-412571532","issue_url":"https://api.github.com/repos/ansible/ansible/issues/43880","id":412571532,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjU3MTUzMg==","user":{"login":"abadger","id":209242,"node_id":"MDQ6VXNlcjIwOTI0Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/209242?v=4","gravatar_id":"","url":"https://api.github.com/users/abadger","html_url":"https://github.com/abadger","followers_url":"https://api.github.com/users/abadger/followers","following_url":"https://api.github.com/users/abadger/following{/other_user}","gists_url":"https://api.github.com/users/abadger/gists{/gist_id}","starred_url":"https://api.github.com/users/abadger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abadger/subscriptions","organizations_url":"https://api.github.com/users/abadger/orgs","repos_url":"https://api.github.com/users/abadger/repos","events_url":"https://api.github.com/users/abadger/events{/privacy}","received_events_url":"https://api.github.com/users/abadger/received_events","type":"User","site_admin":false},"created_at":"2018-08-13T16:05:41Z","updated_at":"2018-08-13T16:05:41Z","author_association":"MEMBER","body":"If it is the aix sshd... one thing that you could try is whether turning off controlpersist for the AIX host makes things work.  pipelining is a setting that affects how we transfer the modules to the remote machine... it shouldn't affect the sftp file transfer being done by fetch.  But it's possible that the AIX sshd is letting some state from our transfer of the stat module that happens before the fetch leak into the sftp connection and that's what's causing the problem.  Turning off controlpersist would either verify or rule that out."}}
{"actor":{"display_login":"abadger"}}