ignore error will not avoid connection errors, only task errors, so 'UNREACHABLE' will not be captured by it.
On Sun, Feb 19, 2017 at 2:30 AM, Pshem Kowalczyk <[email protected]> wrote: > Hi, > > Perhaps not directly answering your question - but a workaround I used in a > number of playbooks (added to the tasks that times out, in your case the one > that unsets the noout): > > - name: Unset the noout flag > command: ceph osd unset noout > register: result > until: result.failed is undefined > retries: 10 > delay: 10 > > to overcome the issues with premature failure due to timeouts. > > you might also find > - pause: seconds=60 > > useful if you know it takes some time for the machine to come back. > > kind regards > Pshem > > > > > On Sun, 19 Feb 2017 at 16:56 pixel fairy <[email protected]> wrote: >> >> trying to reboot with ignore_errors: true still errors out. control >> machine and all ceph nodes run ubuntu 16.04. ansible 2.2.1.0 installed with >> pip >> >> --- >> >> - hosts: osds >> serial: 1 >> >> tasks: >> >> - name: Set the noout flag >> command: ceph osd set noout >> >> >> - name: Reboot the server >> command: shutdown -r now "Ansible updates triggered" >> async: 0 >> poll: 0 >> ignore_errors: true >> >> >> - name: Wait for the server to come up >> local_action: wait_for host={{ ansible_host }} state=started delay=10 >> timeout=3600 >> become: false >> >> >> - name: Unset the noout flag >> command: ceph osd unset noout >> >> >> when running, >> >> < PLAY [osds] > >> ------------- >> \ ^__^ >> \ (oo)\_______ >> (__)\ )\/\ >> ||----w | >> || || >> >> >> ______________ >> < TASK [setup] > >> -------------- >> \ ^__^ >> \ (oo)\_______ >> (__)\ )\/\ >> ||----w | >> || || >> >> >> ok: [ceph1] >> ___________________________ >> < TASK [Set the noout flag] > >> --------------------------- >> \ ^__^ >> \ (oo)\_______ >> (__)\ )\/\ >> ||----w | >> || || >> >> >> changed: [ceph1] >> __________________________ >> < TASK [Reboot the server] > >> -------------------------- >> \ ^__^ >> \ (oo)\_______ >> (__)\ )\/\ >> ||----w | >> || || >> >> >> fatal: [ceph1]: UNREACHABLE! => {"changed": false, "msg": "Failed to >> connect to the host via ssh: Shared connection to 10.1.10.31 closed.\r\n", >> "unreachable": true} >> to retry, use: --limit >> @/home/user/victims/wdc/ansible/cluster/ceph-rollingboot.retry >> ____________ >> < PLAY RECAP > >> ------------ >> \ ^__^ >> \ (oo)\_______ >> (__)\ )\/\ >> ||----w | >> || || >> >> >> ceph1 : ok=2 changed=1 unreachable=1 >> failed=0 >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ansible Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/bf7dde53-f0e1-4ad9-a273-16e91dd4fc75%40googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/CAEaZiRU-5_RfETg5BinS5hSkikgVaAvvjK_yBE%2BNy5Wi1tLouQ%40mail.gmail.com. > > For more options, visit https://groups.google.com/d/optout. -- ---------- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACVha7fR8GSWeAkTx%2BV2Q-h9L1wo%2BYXJXECjtae0w4L0P%2BcvMw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
