chris-short / rak8s

Stand up a Raspberry Pi based Kubernetes cluster with Ansible
MIT License
365 stars 112 forks source link

Reboot 'wait_for' always times out during cleanup #56

Open tmorgansl opened 5 years ago

tmorgansl commented 5 years ago

OS running on Ansible host:

ubuntu 18.04

Ansible Version (ansible --version):

ansible 2.7.7
  config file = /home/tom/k8s/rak8s/ansible.cfg
  configured module search path = [u'/home/tom/.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.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0]

Uploaded logs showing errors(rak8s/.log/ansible.log)

*****************************************
2019-02-10 11:14:13,959 p=23225 u=tom |  changed: [master-1]
2019-02-10 11:14:13,997 p=23225 u=tom |  changed: [node-1]
2019-02-10 11:14:14,027 p=23225 u=tom |  TASK [cleanup : Wait for Reboot] ****************************************************************************************************
2019-02-10 11:16:15,793 p=23225 u=tom |  fatal: [master-1 -> localhost]: FAILED! => {"changed": false, "elapsed": 121, "msg": "Timeout when waiting for master-1:22"}
2019-02-10 11:16:15,796 p=23225 u=tom |  fatal: [node-1 -> localhost]: FAILED! => {"changed": false, "elapsed": 121, "msg": "Timeout when waiting for node-1:22"}
2019-02-10 11:16:15,799 p=23225 u=tom |  PLAY RECAP **************************************************************************************************************************
2019-02-10 11:16:15,800 p=23225 u=tom |  master-1                   : ok=6    changed=5    unreachable=0    failed=1   
2019-02-10 11:16:15,800 p=23225 u=tom |  node-1                     : ok=6    changed=5    unreachable=0    failed=1 

Raspberry Pi Hardware Version:

3B

Raspberry Pi OS & Version (cat /etc/os-release):

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Detailed description of the issue:

As part of the cleanup task the wait_for task always times out. I resolved this issue by using the wait_for_connection instead. Regardless of the underlying issue, I think this is a more succinct way to do this.

If you're happy for this change I'll submit a PR

matthewhaworth commented 4 years ago

I had the same issue but your solution didn't solve it :(