Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with delegate_to and loops #59650

Closed
anshulbehl opened this issue Jul 26, 2019 · 4 comments · Fixed by #59659
Closed

Issue with delegate_to and loops #59650

anshulbehl opened this issue Jul 26, 2019 · 4 comments · Fixed by #59659
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. has_pr This issue has an associated PR. needs_info This issue requires further information. Please answer any outstanding questions. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@anshulbehl
Copy link
Contributor

SUMMARY

Filing on behalf of Netapp
I started running some collection tests on the latest branch and found what I believe to be a bug in the devel branch. I also wrote a program to isolate the commit where the issue started and the failure with the commit b786852. I have also attached inventory outputs and execution logs. Let me know if there is anything else you need.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

delegate_to
Delegation, Rolling Updates, and Local Actions

ANSIBLE VERSION

devel branch

CONFIGURATION

OS / ENVIRONMENT

Netapp e series

STEPS TO REPRODUCE
Recreate playbook:

- hosts: localhost

  gather_facts: no

  tasks:

    - name: Gather facts about remote hosts

      command: “hostname”

      delegate_to: “{{ item }}”

      delegate_facts: false             # Makes no difference true/false

      loop:

        - beegfs_metadata1              # couple of Ubuntu 18.04 lts hosts as defined in the inventory

        - beegfs_storage1
EXPECTED RESULTS
ACTUAL RESULTS

beegfs_metadata1 will succeed but will fail on beegfs_storage1; however if the order is reversed then beegfs_storage1 will succeed and beegfs_metadata1 will fail.

ansible-playbook 2.9.0.dev0
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/swartzn/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/swartzn/projects/ansible/ansible/lib/ansible
  executable location = /home/swartzn/projects/ansible/ansible/bin/ansible-playbook
  python version = 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /home/swartzn/projects/ansible/inventory.yml as it did not pass its verify_file() method
script declined parsing /home/swartzn/projects/ansible/inventory.yml as it did not pass its verify_file() method
Parsed /home/swartzn/projects/ansible/inventory.yml inventory source with yaml plugin
Loading callback plugin default of type stdout, v2.0 from /home/swartzn/projects/ansible/ansible/lib/ansible/plugins/callback/default.py

PLAYBOOK: playbook.yml **************************************************************************************************************************************************************************************************************************************************
Positional arguments: playbook.yml
verbosity: 5
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/home/swartzn/projects/ansible/inventory.yml',)
forks: 5
1 plays in playbook.yml

PLAY [localhost] ********************************************************************************************************************************************************************************************************************************************************
META: ran handlers

TASK [Gathers facts about remote hosts] *********************************************************************************************************************************************************************************************************************************
task path: /home/swartzn/projects/ansible/playbook.yml:4
<10.113.1.206> ESTABLISH SSH CONNECTION FOR USER: beegfs
<10.113.1.206> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<10.113.1.206> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<10.113.1.206> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User="beegfs")
<10.113.1.206> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<10.113.1.206> SSH: PlayContext set ssh_common_args: ()
<10.113.1.206> SSH: PlayContext set ssh_extra_args: ()
<10.113.1.206> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/swartzn/.ansible/cp/3cc9ebacc8)
<10.113.1.206> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="beegfs"' -o ConnectTimeout=10 -o ControlPath=/home/swartzn/.ansible/cp/3cc9ebacc8 10.113.1.206 '/bin/sh -c '"'"'echo ~beegfs && sleep 0'"'"''
<10.113.1.206> (0, b'/home/beegfs\n', b'OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017\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 = 28331\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')
<10.113.1.206> ESTABLISH SSH CONNECTION FOR USER: beegfs
<10.113.1.206> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<10.113.1.206> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<10.113.1.206> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User="beegfs")
<10.113.1.206> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<10.113.1.206> SSH: PlayContext set ssh_common_args: ()
<10.113.1.206> SSH: PlayContext set ssh_extra_args: ()
<10.113.1.206> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/swartzn/.ansible/cp/3cc9ebacc8)
<10.113.1.206> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="beegfs"' -o ConnectTimeout=10 -o ControlPath=/home/swartzn/.ansible/cp/3cc9ebacc8 10.113.1.206 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/beegfs/.ansible/tmp/ansible-tmp-1564077394.3568225-151955846213474 `" && echo ansible-tmp-1564077394.3568225-151955846213474="` echo /home/beegfs/.ansible/tmp/ansible-tmp-1564077394.3568225-151955846213474 `" ) && sleep 0'"'"''
<10.113.1.206> (0, b'ansible-tmp-1564077394.3568225-151955846213474=/home/beegfs/.ansible/tmp/ansible-tmp-1564077394.3568225-151955846213474\n', b'OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017\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 = 28331\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')
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/common/__init__.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/common/collections.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/basic.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/_text.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/six/__init__.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/common/_collections_compat.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/common/file.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/parsing/__init__.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/common/process.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/common/parameters.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/common/validation.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/common/_utils.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/common/text/__init__.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/common/text/converters.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/pycompat24.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/parsing/convert_bool.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/common/sys_info.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/common/text/formatters.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/common/_json_compat.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/distro/__init__.py
Using module_utils file /home/swartzn/projects/ansible/ansible/lib/ansible/module_utils/distro/_distro.py
Using module file /home/swartzn/projects/ansible/ansible/lib/ansible/modules/commands/command.py
<10.113.1.206> PUT /home/swartzn/.ansible/tmp/ansible-local-283415wu2yknz/tmpmzxnh3w3 TO /home/beegfs/.ansible/tmp/ansible-tmp-1564077394.3568225-151955846213474/AnsiballZ_command.py
<10.113.1.206> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<10.113.1.206> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<10.113.1.206> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User="beegfs")
<10.113.1.206> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<10.113.1.206> SSH: PlayContext set ssh_common_args: ()
<10.113.1.206> SSH: PlayContext set sftp_extra_args: ()
<10.113.1.206> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/swartzn/.ansible/cp/3cc9ebacc8)
<10.113.1.206> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="beegfs"' -o ConnectTimeout=10 -o ControlPath=/home/swartzn/.ansible/cp/3cc9ebacc8 '[10.113.1.206]'
<10.113.1.206> (0, b'sftp> put /home/swartzn/.ansible/tmp/ansible-local-283415wu2yknz/tmpmzxnh3w3 /home/beegfs/.ansible/tmp/ansible-tmp-1564077394.3568225-151955846213474/AnsiballZ_command.py\n', b'OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017\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 = 28331\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 3 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/beegfs size 0\r\ndebug3: Looking up /home/swartzn/.ansible/tmp/ansible-local-283415wu2yknz/tmpmzxnh3w3\r\ndebug3: Sent message fd 3 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/beegfs/.ansible/tmp/ansible-tmp-1564077394.3568225-151955846213474/AnsiballZ_command.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:8691\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 8691 bytes at 98304\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')
<10.113.1.206> ESTABLISH SSH CONNECTION FOR USER: beegfs
<10.113.1.206> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<10.113.1.206> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<10.113.1.206> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User="beegfs")
<10.113.1.206> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<10.113.1.206> SSH: PlayContext set ssh_common_args: ()
<10.113.1.206> SSH: PlayContext set ssh_extra_args: ()
<10.113.1.206> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/swartzn/.ansible/cp/3cc9ebacc8)
<10.113.1.206> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="beegfs"' -o ConnectTimeout=10 -o ControlPath=/home/swartzn/.ansible/cp/3cc9ebacc8 10.113.1.206 '/bin/sh -c '"'"'chmod u+x /home/beegfs/.ansible/tmp/ansible-tmp-1564077394.3568225-151955846213474/ /home/beegfs/.ansible/tmp/ansible-tmp-1564077394.3568225-151955846213474/AnsiballZ_command.py && sleep 0'"'"''
<10.113.1.206> (0, b'', b'OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017\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 = 28331\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')
<10.113.1.206> ESTABLISH SSH CONNECTION FOR USER: beegfs
<10.113.1.206> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<10.113.1.206> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<10.113.1.206> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User="beegfs")
<10.113.1.206> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<10.113.1.206> SSH: PlayContext set ssh_common_args: ()
<10.113.1.206> SSH: PlayContext set ssh_extra_args: ()
<10.113.1.206> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/swartzn/.ansible/cp/3cc9ebacc8)
<10.113.1.206> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="beegfs"' -o ConnectTimeout=10 -o ControlPath=/home/swartzn/.ansible/cp/3cc9ebacc8 -tt 10.113.1.206 '/bin/sh -c '"'"'/usr/bin/python3 /home/beegfs/.ansible/tmp/ansible-tmp-1564077394.3568225-151955846213474/AnsiballZ_command.py && sleep 0'"'"''
<10.113.1.206> (0, b'\r\n{"cmd": ["hostname"], "stdout": "beegfs-metadata", "stderr": "", "rc": 0, "start": "2019-07-25 17:55:50.009195", "end": "2019-07-25 17:55:50.012072", "delta": "0:00:00.002877", "changed": true, "invocation": {"module_args": {"_raw_params": "hostname", "warn": true, "_uses_shell": false, "stdin_add_newline": true, "strip_empty_ends": true, "argv": null, "chdir": null, "executable": null, "creates": null, "removes": null, "stdin": null}}}\r\n', b'OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017\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 = 28331\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 10.113.1.206 closed.\r\n')
<10.113.1.206> ESTABLISH SSH CONNECTION FOR USER: beegfs
<10.113.1.206> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<10.113.1.206> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<10.113.1.206> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User="beegfs")
<10.113.1.206> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<10.113.1.206> SSH: PlayContext set ssh_common_args: ()
<10.113.1.206> SSH: PlayContext set ssh_extra_args: ()
<10.113.1.206> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/swartzn/.ansible/cp/3cc9ebacc8)
<10.113.1.206> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="beegfs"' -o ConnectTimeout=10 -o ControlPath=/home/swartzn/.ansible/cp/3cc9ebacc8 10.113.1.206 '/bin/sh -c '"'"'rm -f -r /home/beegfs/.ansible/tmp/ansible-tmp-1564077394.3568225-151955846213474/ > /dev/null 2>&1 && sleep 0'"'"''
<10.113.1.206> (0, b'', b'OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017\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 = 28331\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')
changed: [localhost -> 10.113.1.206] => (item=beegfs_metadata1) => {
    "ansible_loop_var": "item",
    "changed": true,
    "cmd": [
        "hostname"
    ],
    "delta": "0:00:00.002877",
    "end": "2019-07-25 17:55:50.012072",
    "invocation": {
        "module_args": {
            "_raw_params": "hostname",
            "_uses_shell": false,
            "argv": null,
            "chdir": null,
            "creates": null,
            "executable": null,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true,
            "warn": true
        }
    },
    "item": "beegfs_metadata1",
    "rc": 0,
    "start": "2019-07-25 17:55:50.009195",
    "stderr": "",
    "stderr_lines": [],
    "stdout": "beegfs-metadata",
    "stdout_lines": [
        "beegfs-metadata"
    ]
}
<beegfs_storage1> ESTABLISH SSH CONNECTION FOR USER: None
<beegfs_storage1> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<beegfs_storage1> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<beegfs_storage1> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<beegfs_storage1> SSH: PlayContext set ssh_common_args: ()
<beegfs_storage1> SSH: PlayContext set ssh_extra_args: ()
<beegfs_storage1> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/swartzn/.ansible/cp/a9c837a4c1)
<beegfs_storage1> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/swartzn/.ansible/cp/a9c837a4c1 beegfs_storage1 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<beegfs_storage1> (255, b'', b'OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017\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\ndebug1: Control socket "/home/swartzn/.ansible/cp/a9c837a4c1" does not exist\r\ndebug2: resolving "beegfs_storage1" port 22\r\nssh: Could not resolve hostname beegfs_storage1: Name or service not known\r\n')
failed: [localhost] (item=beegfs_storage1) => {
    "ansible_loop_var": "item",
    "item": "beegfs_storage1",
    "msg": "Failed to connect to the host via ssh: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017\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\ndebug1: Control socket \"/home/swartzn/.ansible/cp/a9c837a4c1\" does not exist\r\ndebug2: resolving \"beegfs_storage1\" port 22\r\nssh: Could not resolve hostname beegfs_storage1: Name or service not known",
    "unreachable": true
}
fatal: [localhost]: UNREACHABLE! => {
    "changed": true,
    "msg": "All items completed",
    "results": [
        {
            "ansible_loop_var": "item",
            "changed": true,
            "cmd": [
                "hostname"
            ],
            "delta": "0:00:00.002877",
            "end": "2019-07-25 17:55:50.012072",
            "failed": false,
            "invocation": {
                "module_args": {
                    "_raw_params": "hostname",
                    "_uses_shell": false,
                    "argv": null,
                    "chdir": null,
                    "creates": null,
                    "executable": null,
                    "removes": null,
                    "stdin": null,
                    "stdin_add_newline": true,
                    "strip_empty_ends": true,
                    "warn": true
                }
            },
            "item": "beegfs_metadata1",
            "rc": 0,
            "start": "2019-07-25 17:55:50.009195",
            "stderr": "",
            "stderr_lines": [],
            "stdout": "beegfs-metadata",
            "stdout_lines": [
                "beegfs-metadata"
            ]
        },
        {
            "ansible_loop_var": "item",
            "item": "beegfs_storage1",
            "msg": "Failed to connect to the host via ssh: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017\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\ndebug1: Control socket \"/home/swartzn/.ansible/cp/a9c837a4c1\" does not exist\r\ndebug2: resolving \"beegfs_storage1\" port 22\r\nssh: Could not resolve hostname beegfs_storage1: Name or service not known",
            "unreachable": true
        }
    ]
}

PLAY RECAP **************************************************************************************************************************************************************************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0   






[beegfs_metadata1.txt](https://github.com/ansible/ansible/files/3436503/beegfs_metadata1.txt)
[beegfs_storage1.txt](https://github.com/ansible/ansible/files/3436505/beegfs_storage1.txt)

@ansibot
Copy link
Contributor

ansibot commented Jul 26, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Jul 26, 2019
@anshulbehl
Copy link
Contributor Author

@ndswartz Filed a bug based on your email

mkrizek added a commit to mkrizek/ansible that referenced this issue Jul 26, 2019
By not utilizing cache when templating the value.

Fixes ansible#59650
@Akasurde
Copy link
Member

resolved_by_pr #59659

@Akasurde
Copy link
Member

@anshulbehl Could you please test if PR #59659 works for you and let us know ? Thanks.

needs_info

@ansibot ansibot added has_pr This issue has an associated PR. needs_info This issue requires further information. Please answer any outstanding questions. labels Jul 28, 2019
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Jul 30, 2019
StephenSorriaux pushed a commit to StephenSorriaux/ansible that referenced this issue Jul 30, 2019
@ansible ansible locked and limited conversation to collaborators Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. has_pr This issue has an associated PR. needs_info This issue requires further information. Please answer any outstanding questions. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants