Handle intentional task failures properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack-Ansible |
Fix Released
|
Undecided
|
Kevin Carter |
Bug Description
We have many tasks spread across many roles which intentionally fail, using 'failed_when: false'. Most of these generate output in the Ansible output which looks like an error and is very confusing to anyone seeing it for the first time. Even worse it requires walking the code or very carefully reading the output to see that it's an intentional fail which is OK.
We should take the time to handle these more gracefully and prevent output that looks like a failure. This improves our usability and causes less confusion to newcomers.
Some examples from https:/
2016-10-13 18:22:58.256281 | TASK [bootstrap-host : Determine whether partitions labeled openstack-data{1,2} are present] ***
2016-10-13 18:22:58.440644 | fatal: [localhost]: FAILED! => {"changed": false, "cmd": "parted --script -l -m | egrep -q ':ext4:
2016-10-13 18:22:58.440771 | ...ignoring
2016-10-13 18:50:59.802765 | TASK [galera_server : Check major galera install version] *******
2016-10-13 18:51:00.340879 | fatal: [aio1_galera_
2016-10-13 18:51:00.341304 | ...ignoring
2016-10-13 18:51:00.350742 |
2016-10-13 18:51:00.350793 | TASK [galera_server : Check for any galera install version] *******
2016-10-13 18:51:00.894828 | fatal: [aio1_galera_
2016-10-13 18:51:00.895223 | ...ignoring
2016-10-13 18:51:05.227996 | TASK [galera_server : Gather mysql facts] *******
2016-10-13 18:51:05.710802 | fatal: [aio1_galera_
2016-10-13 18:51:05.711187 | ...ignoring
2016-10-13 18:58:53.882361 | TASK [os_keystone : Enable/disable mod_shib2 for apache2] *******
2016-10-13 18:58:54.362767 | fatal: [aio1_keystone_
2016-10-13 18:58:54.363169 | ...ignoring
Changed in openstack-ansible: | |
assignee: | Kevin Carter (kevin-carter) → Jesse Pretorius (jesse-pretorius) |
Changed in openstack-ansible: | |
assignee: | Jesse Pretorius (jesse-pretorius) → Kevin Carter (kevin-carter) |
tags: | added: in-stable-newton |
Fix proposed to branch: master /review. openstack. org/386792
Review: https:/