Implement any_errors_fatal for all test playbooks

Sometimes a test will result in a failure, but it
takes more time than necessary to find the failure
due to Ansible continuing to execute on other hosts
after removing one from the play execution.

This patch ensures that any error will result in
an immediate failure so that the fatal error is
easier to find.

Change-Id: I4e89bfdb1e48d0ac65f9fb8549e55a19ab773f9f
This commit is contained in:
Jesse Pretorius 2017-07-06 11:13:22 +01:00 committed by Jesse Pretorius (odyssey4me)
parent f0754e9704
commit dad9515c35
24 changed files with 34 additions and 1 deletions

View File

@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- name: Playbook for destroying test containers - name: Playbook for destroying test containers
hosts: all_containers hosts: all_containers
serial: 1 serial: 1

View File

@ -16,5 +16,6 @@
- name: Setting nodepool variables - name: Setting nodepool variables
hosts: all hosts: all
gather_facts: true gather_facts: true
any_errors_fatal: true
tasks: tasks:
- include: "common-tasks/test-set-nodepool-vars.yml" - include: "common-tasks/test-set-nodepool-vars.yml"

View File

@ -18,6 +18,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
pre_tasks: pre_tasks:
- include: ensure-rabbitmq.yml - include: ensure-rabbitmq.yml
@ -43,6 +44,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
roles: roles:
- role: "os_cinder" - role: "os_cinder"
vars_files: vars_files:

View File

@ -18,5 +18,6 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
roles: roles:
- role: "etcd" - role: "etcd"

View File

@ -18,6 +18,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
roles: roles:
- role: "galera_server" - role: "galera_server"
vars_files: vars_files:

View File

@ -18,6 +18,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
pre_tasks: pre_tasks:
- include: ensure-rabbitmq.yml - include: ensure-rabbitmq.yml
vhost_name: "{{ glance_rabbitmq_vhost }}" vhost_name: "{{ glance_rabbitmq_vhost }}"

View File

@ -18,6 +18,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
pre_tasks: pre_tasks:
- include: create-grant-db.yml - include: create-grant-db.yml
db_name: "{{ gnocchi_database_name }}" db_name: "{{ gnocchi_database_name }}"

View File

@ -16,6 +16,7 @@
- name: Install haproxy - name: Install haproxy
hosts: localhost hosts: localhost
become: true become: true
any_errors_fatal: true
roles: roles:
- role: "haproxy_server" - role: "haproxy_server"
haproxy_service_configs: "{{ haproxy_default_services | default([]) }}" haproxy_service_configs: "{{ haproxy_default_services | default([]) }}"

View File

@ -18,6 +18,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
pre_tasks: pre_tasks:
- include: ensure-rabbitmq.yml - include: ensure-rabbitmq.yml
vhost_name: "{{ heat_rabbitmq_vhost }}" vhost_name: "{{ heat_rabbitmq_vhost }}"

View File

@ -18,6 +18,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
pre_tasks: pre_tasks:
- include: create-grant-db.yml - include: create-grant-db.yml
db_name: "{{ horizon_galera_database }}" db_name: "{{ horizon_galera_database }}"

View File

@ -18,6 +18,7 @@
remote_user: root remote_user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
pre_tasks: pre_tasks:
- include: ensure-rabbitmq.yml - include: ensure-rabbitmq.yml
vhost_name: "{{ ironic_rabbitmq_vhost }}" vhost_name: "{{ ironic_rabbitmq_vhost }}"

View File

@ -16,6 +16,7 @@
- name: Prepare MQ/DB services - name: Prepare MQ/DB services
hosts: keystone_all[0] hosts: keystone_all[0]
gather_facts: true gather_facts: true
any_errors_fatal: true
user: root user: root
become: true become: true
tasks: tasks:
@ -39,6 +40,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
pre_tasks: pre_tasks:
# In order to ensure that any container, software or # In order to ensure that any container, software or
# config file changes which causes a container/service # config file changes which causes a container/service
@ -68,6 +70,7 @@
user: root user: root
become: true become: true
gather_facts: false gather_facts: false
any_errors_fatal: true
tasks: tasks:
- name: Perform a Keystone DB sync contract - name: Perform a Keystone DB sync contract
command: "/openstack/venvs/keystone-{{ keystone_venv_tag }}/bin/keystone-manage db_sync --contract" command: "/openstack/venvs/keystone-{{ keystone_venv_tag }}/bin/keystone-manage db_sync --contract"

View File

@ -18,6 +18,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
roles: roles:
- role: "memcached_server" - role: "memcached_server"
vars_files: vars_files:

View File

@ -20,6 +20,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
vars: vars:
kernel_module_path: kernel_module_path:
apt: "lib/modules" apt: "lib/modules"
@ -54,6 +55,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
vars: vars:
required_packages: required_packages:
apt: apt:
@ -91,6 +93,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
roles: roles:
- role: "os_neutron" - role: "os_neutron"
vars_files: vars_files:
@ -103,6 +106,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
roles: roles:
- role: "os_neutron" - role: "os_neutron"
vars_files: vars_files:

View File

@ -20,6 +20,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
vars: vars:
required_packages: required_packages:
apt: apt:
@ -83,6 +84,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
roles: roles:
- role: "os_nova" - role: "os_nova"
vars_files: vars_files:
@ -93,6 +95,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
roles: roles:
- role: "os_nova" - role: "os_nova"
vars_files: vars_files:

View File

@ -17,6 +17,7 @@
hosts: localhost hosts: localhost
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
pre_tasks: pre_tasks:
- include: "common-tasks/test-force-package-cache-update.yml" - include: "common-tasks/test-force-package-cache-update.yml"
roles: roles:

View File

@ -18,6 +18,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
roles: roles:
- role: "rabbitmq_server" - role: "rabbitmq_server"
vars_files: vars_files:

View File

@ -18,6 +18,7 @@
remote_user: root remote_user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
pre_tasks: pre_tasks:
- include: ensure-rabbitmq.yml - include: ensure-rabbitmq.yml
vhost_name: "{{ sahara_rabbitmq_vhost }}" vhost_name: "{{ sahara_rabbitmq_vhost }}"

View File

@ -20,6 +20,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
roles: roles:
- role: "{{ swift_rolename | default('os_swift') }}" - role: "{{ swift_rolename | default('os_swift') }}"
vars_files: vars_files:

View File

@ -18,6 +18,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
roles: roles:
- role: "{{ tempest_rolename | default('os_tempest') }}" - role: "{{ tempest_rolename | default('os_tempest') }}"
vars_files: vars_files:

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- name: Playbook for creating containers - name: Gather facts for the LXC hosts
hosts: localhost hosts: localhost
become: true become: true
gather_facts: true gather_facts: true
@ -26,6 +26,7 @@
serial: 1 serial: 1
become: True become: True
gather_facts: False gather_facts: False
any_errors_fatal: true
roles: roles:
- role: "lxc_container_create" - role: "lxc_container_create"
post_tasks: post_tasks:

View File

@ -20,6 +20,7 @@
- name: Playbook for establishing ssh keys - name: Playbook for establishing ssh keys
hosts: localhost hosts: localhost
gather_facts: false gather_facts: false
any_errors_fatal: true
connection: local connection: local
become: true become: true
tasks: tasks:
@ -68,6 +69,7 @@
hosts: localhost hosts: localhost
connection: local connection: local
become: false become: false
any_errors_fatal: true
tasks: tasks:
# Shell used because facts may not be ready yet # Shell used because facts may not be ready yet
- name: Get user home directory - name: Get user home directory

View File

@ -17,6 +17,7 @@
hosts: localhost hosts: localhost
connection: local connection: local
gather_facts: false gather_facts: false
any_errors_fatal: true
tasks: tasks:
- name: Ensure repo directory exists - name: Ensure repo directory exists
file: file:

View File

@ -18,6 +18,7 @@
user: root user: root
become: true become: true
gather_facts: true gather_facts: true
any_errors_fatal: true
vars_files: vars_files:
- test-vars.yml - test-vars.yml
tasks: tasks: