ansible/awx

Reboot module fails by timeout

Open

#5,016 opened on Oct 16, 2019

View on GitHub
 (12 comments) (5 reactions) (0 assignees)Python (3,333 forks)batch import
component:apihelp wantedtype:bug

Repository metrics

Stars
 (13,071 stars)
PR merge metrics
 (Avg merge 24d 6h) (30 merged PRs in 30d)

Description

ISSUE TYPE
  • Bug Report
SUMMARY

Reboot module timeouts from AWX, but the same playbook run sucessfully from CLI.

ENVIRONMENT
  • AWX version: 6.1.0
  • AWX install method: docker compose
  • Ansible version: 2.8.5 (Python version is upgraded to 3.6.8)
  • Operating System: CentOS 7
  • Web Browser: Google Chrome
STEPS TO REPRODUCE

Run a simple playbook from AWX as follows:

- name: reboot
  reboot:
EXPECTED RESULTS

The playbook ran successfully without timeout.

ACTUAL RESULTS

The playbook fails by timeout.

TASK [XXX : reboot] ************************************************************
fatal: [XXX]: FAILED! => {"changed": false, "elapsed": 608, "msg": "Timed out waiting for last boot time check (timeout=600)", "rebooted": true}
ADDITIONAL INFORMATION

When the log level is debug, the following log is displayed many times:

reboot: attempting to get system boot time
<XXX> ESTABLISH SSH CONNECTION FOR USER: XXX
<XXX> SSH: EXEC ssh -o ControlMaster=auto -o ControlPersist=10m -o ControlPath=/tmp/ansible-ssh-%h-%p-%r -o ConnectionAttempts=3 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="XXX"' -o ConnectTimeout=10 -tt XXX '/bin/sh -c '"'"'sudo -H -S -n  -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-uzfkugngjniiaztnoyghqeixtehheusb ; cat /proc/sys/kernel/random/boot_id'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<XXX> (141, b'', b'Shared connection to XXX closed.\\r\\n')
<XXX> Failed to connect to the host via ssh: Shared connection to XXX closed.

Contributor guide