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

Ansible getting stuck after executing a "raw" command #39217

Closed
alissonpdc opened this issue Apr 24, 2018 · 7 comments
Closed

Ansible getting stuck after executing a "raw" command #39217

alissonpdc opened this issue Apr 24, 2018 · 7 comments
Labels
affects_2.6 This issue/PR affects Ansible v2.6 bug This issue/PR relates to a bug. commands Commands category module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@alissonpdc
Copy link

alissonpdc commented Apr 24, 2018

ISSUE TYPE
  • Bug Report
COMPONENT NAME

raw

ANSIBLE VERSION
ansible 2.4.2.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible
  python version = 2.7.5 (default, May  3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
CONFIGURATION
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible.log
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 30
DEFAULT_TRANSPORT(/etc/ansible/ansible.cfg) = paramiko
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
PARAMIKO_HOST_KEY_AUTO_ADD(/etc/ansible/ansible.cfg) = True
PERSISTENT_CONNECT_TIMEOUT(/etc/ansible/ansible.cfg) = 30
OS / ENVIRONMENT
  • RHEL 7
  • Cisco EX60 (video conference device)
SUMMARY

Ansible gets stuck just after execute a command using the "raw" module on a Cisco video conference device (tested on EX60 and EX90).

STEPS TO REPRODUCE
YAML:

  - name: Ansible job
    hosts: 10.54.39.68
    gather_facts: no

    tasks:

    - name: Executing command
      raw: xStatus Diagnostics Call
EXPECTED RESULTS

Expected to get the call statistics from de device (it's possible to get such statistics normally acessing the device from SSH)

[...]
*s Diagnostics Call 4 Channels IncomingAudioChannel 148 Netstat 1 Bytes: 18185089512
*s Diagnostics Call 4 Channels IncomingAudioChannel 148 Netstat 1 ChannelRate: 65000
*s Diagnostics Call 4 Channels IncomingAudioChannel 148 Netstat 1 Drop: 0
*s Diagnostics Call 4 Channels IncomingAudioChannel 148 Netstat 1 Jitter: 3
*s Diagnostics Call 4 Channels IncomingAudioChannel 148 Netstat 1 LastIntervalLost: 0
*s Diagnostics Call 4 Channels IncomingAudioChannel 148 Netstat 1 LastIntervalReceived: 350
*s Diagnostics Call 4 Channels IncomingAudioChannel 148 Netstat 1 Loss: 425
*s Diagnostics Call 4 Channels IncomingAudioChannel 148 Netstat 1 MaxJitter: 4
[...]
ACTUAL RESULTS
/var/log/ansible

[root@scgxp0327cld PROJ-Monitoracao_VC_TP]# cat /var/log/ansible.log 

2018-04-24 08:45:04,890 p=32674 u=root |  ansible-playbook 2.4.2.0
  config file = /var/lib/awx/projects/PROJ-Monitoracao_VC_TP/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible-playbook
  python version = 2.7.5 (default, May  3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
2018-04-24 08:45:04,891 p=32674 u=root |  Using /var/lib/awx/projects/PROJ-Monitoracao_VC_TP/ansible.cfg as config file
2018-04-24 08:45:04,892 p=32674 u=root |  [DEPRECATION WARNING]: DEFAULT_SUDO_USER option, In favor of become which is a generic framework . This feature will be removed in version 2.8. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
2018-04-24 08:45:04,893 p=32674 u=root |  setting up inventory plugins
2018-04-24 08:45:04,901 p=32674 u=root |  Parsed /etc/ansible/hosts inventory source with ini plugin
2018-04-24 08:45:05,114 p=32674 u=root |  Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
2018-04-24 08:45:05,234 p=32674 u=root |  PLAYBOOK: teste.yaml *******************************************************************************************************************************************
2018-04-24 08:45:05,235 p=32674 u=root |  1 plays in teste.yaml
2018-04-24 08:45:05,282 p=32674 u=root |  PLAY [Verificacao de Qualidade de Chamada - VideoConferencia CISCO] ********************************************************************************************
2018-04-24 08:45:05,314 p=32674 u=root |  META: ran handlers
2018-04-24 08:45:05,319 p=32674 u=root |  TASK [Executando comando] **************************************************************************************************************************************
2018-04-24 08:45:05,319 p=32674 u=root |  task path: /var/lib/awx/projects/PROJ-Monitoracao_VC_TP/teste.yaml:7
2018-04-24 08:45:05,369 paramiko.transport starting thread (client mode): 0x381b150L
2018-04-24 08:45:05,370 paramiko.transport Local version/idstring: SSH-2.0-paramiko_2.1.1
2018-04-24 08:45:10,499 paramiko.transport Remote version/idstring: SSH-2.0-OpenSSH_6.5
2018-04-24 08:45:10,500 paramiko.transport Connected (version 2.0, client OpenSSH_6.5)
2018-04-24 08:45:10,504 paramiko.transport kex algos:[u'curve25519-sha256@libssh.org', u'diffie-hellman-group-exchange-sha256', u'diffie-hellman-group-exchange-sha1', u'diffie-hellman-group14-sha1', u'diffie-hellman-group1-sha1'] server key:[u'ssh-rsa'] client encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'3des-cbc'] server encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'3des-cbc'] client mac:[u'hmac-sha1', u'hmac-sha2-512', u'hmac-sha2-256'] server mac:[u'hmac-sha1', u'hmac-sha2-512', u'hmac-sha2-256'] client compress:[u'none', u'zlib@openssh.com', u'zlib'] server compress:[u'none', u'zlib@openssh.com', u'zlib'] client lang:[u''] server lang:[u''] kex follows?False
2018-04-24 08:45:10,504 paramiko.transport Kex agreed: diffie-hellman-group1-sha1
2018-04-24 08:45:10,504 paramiko.transport Cipher agreed: aes128-ctr
2018-04-24 08:45:10,504 paramiko.transport MAC agreed: hmac-sha2-256
2018-04-24 08:45:10,504 paramiko.transport Compression agreed: none
2018-04-24 08:45:11,039 paramiko.transport kex engine KexGroup1 specified hash_algo <built-in function openssl_sha1>
2018-04-24 08:45:11,040 paramiko.transport Switch to new keys ...
2018-04-24 08:45:11,054 paramiko.transport userauth is OK
2018-04-24 08:45:11,110 paramiko.transport Authentication type (password) not permitted.
2018-04-24 08:45:11,110 paramiko.transport Allowed methods: [u'publickey', u'keyboard-interactive']
2018-04-24 08:45:11,154 paramiko.transport userauth is OK
2018-04-24 08:45:12,010 paramiko.transport Authentication (keyboard-interactive) successful!
2018-04-24 08:45:12,012 paramiko.transport [chan 0] Max packet in: 32768 bytes
2018-04-24 08:45:12,087 paramiko.transport [chan 0] Max packet out: 32768 bytes
2018-04-24 08:45:12,087 paramiko.transport Secsh channel 0 opened.
2018-04-24 08:45:12,126 paramiko.transport [chan 0] Sesch channel 0 request ok
2018-04-24 08:45:12,136 paramiko.transport [chan 0] Sesch channel 0 request ok
2018-04-24 08:45:17,137 paramiko.transport Sending global request "keepalive@lag.net"
2018-04-24 08:45:22,148 paramiko.transport Sending global request "keepalive@lag.net"
2018-04-24 08:45:27,160 paramiko.transport Sending global request "keepalive@lag.net"
2018-04-24 08:45:32,172 paramiko.transport Sending global request "keepalive@lag.net"
2018-04-24 08:45:37,183 paramiko.transport Sending global request "keepalive@lag.net"
2018-04-24 08:45:42,195 paramiko.transport Sending global request "keepalive@lag.net"
2018-04-24 08:45:47,207 paramiko.transport Sending global request "keepalive@lag.net"

[root@scgxp0327cld PROJ-Monitoracao_VC_TP]# ansible-playbook teste.yaml -vvvv
ansible-playbook 2.4.2.0
  config file = /var/lib/awx/projects/PROJ-Monitoracao_VC_TP/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible-playbook
  python version = 2.7.5 (default, May  3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
Using /var/lib/awx/projects/PROJ-Monitoracao_VC_TP/ansible.cfg as config file
[DEPRECATION WARNING]: DEFAULT_SUDO_USER option, In favor of become which is a generic framework . This feature will be removed in version 2.8. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
setting up inventory plugins
Parsed /etc/ansible/hosts inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc

PLAYBOOK: teste.yaml *******************************************************************************************************************************************
1 plays in teste.yaml

PLAY [Verificacao de Qualidade de Chamada - VideoConferencia CISCO] ********************************************************************************************
META: ran handlers

TASK [Executando comando] **************************************************************************************************************************************
task path: /var/lib/awx/projects/PROJ-Monitoracao_VC_TP/teste.yaml:7
<10.54.39.68> ESTABLISH CONNECTION FOR USER: admin on PORT 22 TO 10.54.39.68
<10.54.39.68> EXEC xStatus Diagnostics Call

ansible
ex60

@ansibot
Copy link
Contributor

ansibot commented Apr 24, 2018

Files identified in the description:
None

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
Copy link
Contributor

ansibot commented Apr 24, 2018

@Guinitz Greetings! Thanks for taking the time to open this issue. In order for the community to handle your issue effectively, we need a bit more information.

Here are the items we could not find in your description:

  • ansible version

Please set the description of this issue with this template:
https://raw.githubusercontent.com/ansible/ansible/devel/.github/ISSUE_TEMPLATE.md

click here for bot help

@ansibot ansibot added affects_2.6 This issue/PR affects Ansible v2.6 bug This issue/PR relates to a bug. needs_info This issue requires further information. Please answer any outstanding questions. needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. module This issue/PR relates to a module. and removed needs_info This issue requires further information. Please answer any outstanding questions. needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly. labels Apr 24, 2018
@ryansb ryansb added networking Network category and removed needs_triage Needs a first human triage before being processed. labels Apr 24, 2018
@ansibot
Copy link
Contributor

ansibot commented Apr 24, 2018

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
Copy link
Contributor

ansibot commented Apr 24, 2018

@calfonso calfonso removed the networking Network category label Apr 25, 2018
@ansibot
Copy link
Contributor

ansibot commented Apr 25, 2018

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

@ryansb ryansb changed the title Ansible getting stucked after executing a "raw" command Ansible getting stuck after executing a "raw" command Apr 25, 2018
@ansibot ansibot added the commands Commands category label Mar 5, 2019
@ansibot
Copy link
Contributor

ansibot commented May 16, 2020

Files identified in the description:

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

click here for bot help

@relrod
Copy link
Member

relrod commented Apr 9, 2021

The connection plugin is likely expecting an EOF that the system is never giving, which causes it to wait indefinitely.

A possible solution in this case is to use the timeout keyword newly available in 2.11.

We are unable to verify this further due to the specialized nature of the hardware.

@relrod relrod closed this as completed Apr 9, 2021
@ansible ansible locked and limited conversation to collaborators May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.6 This issue/PR affects Ansible v2.6 bug This issue/PR relates to a bug. commands Commands category module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

No branches or pull requests

5 participants