Force failure after ops in rescue and fix wait opt
Today we manage tests between "blocks:" with "always:" and "rescue:" to get the output of the commands, both stderr and stdout. Problem is that instead of stopping we move on, and this is not useful when you want to investigate on problems like the --wait 600 versus --wait=600 (that this patch solves, too). Change-Id: Icd5f6f8bdff8c563131856286e82f9a7169b5fc7
This commit is contained in:
@@ -51,6 +51,7 @@
|
|||||||
rescue:
|
rescue:
|
||||||
- name: copy stderr test result to undercloud and check command
|
- name: copy stderr test result to undercloud and check command
|
||||||
copy: content="{{ test_ha_failed_actions_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_failed_actions_stderr.log"
|
copy: content="{{ test_ha_failed_actions_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_failed_actions_stderr.log"
|
||||||
|
- fail: msg="{{ test_ha_failed_actions_cmd.stderr }}"
|
||||||
when: test_ha_failed_actions|bool
|
when: test_ha_failed_actions|bool
|
||||||
|
|
||||||
# Test: Master/Slave
|
# Test: Master/Slave
|
||||||
@@ -66,6 +67,7 @@
|
|||||||
rescue:
|
rescue:
|
||||||
- name: copy stderr test result to undercloud and check command
|
- name: copy stderr test result to undercloud and check command
|
||||||
copy: content="{{ test_ha_master_slave_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_master_slave_stderr.log"
|
copy: content="{{ test_ha_master_slave_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_master_slave_stderr.log"
|
||||||
|
- fail: msg="{{ test_ha_master_slave_cmd.stderr }}"
|
||||||
when: test_ha_master_slave|bool
|
when: test_ha_master_slave|bool
|
||||||
|
|
||||||
# Test: Keystone stop
|
# Test: Keystone stop
|
||||||
@@ -81,6 +83,7 @@
|
|||||||
rescue:
|
rescue:
|
||||||
- name: copy stderr test result to undercloud and check command
|
- name: copy stderr test result to undercloud and check command
|
||||||
copy: content="{{ test_ha_keystone_stop_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_keystone_stop_stderr.log"
|
copy: content="{{ test_ha_keystone_stop_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_keystone_stop_stderr.log"
|
||||||
|
- fail: msg="{{ test_ha_keystone_stop_cmd.stderr }}"
|
||||||
when: test_ha_keystone_stop|bool
|
when: test_ha_keystone_stop|bool
|
||||||
|
|
||||||
# Test: Keystone removal
|
# Test: Keystone removal
|
||||||
@@ -96,6 +99,7 @@
|
|||||||
rescue:
|
rescue:
|
||||||
- name: copy stderr test result to undercloud and check command
|
- name: copy stderr test result to undercloud and check command
|
||||||
copy: content="{{ test_ha_keystone_constraint_removal_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_keystone_constraint_removal_stderr.log"
|
copy: content="{{ test_ha_keystone_constraint_removal_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_keystone_constraint_removal_stderr.log"
|
||||||
|
- fail: msg="{{ test_ha_keystone_constraint_removal_cmd.stderr }}"
|
||||||
when: test_ha_keystone_constraint_removal|bool
|
when: test_ha_keystone_constraint_removal|bool
|
||||||
|
|
||||||
# Test: NG A
|
# Test: NG A
|
||||||
@@ -111,6 +115,7 @@
|
|||||||
rescue:
|
rescue:
|
||||||
- name: copy stderr test result to undercloud and check command
|
- name: copy stderr test result to undercloud and check command
|
||||||
copy: content="{{ test_ha_ng_a_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_ng_a_stderr.log"
|
copy: content="{{ test_ha_ng_a_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_ng_a_stderr.log"
|
||||||
|
- fail: msg="{{ test_ha_ng_a_cmd.stderr }}"
|
||||||
when: test_ha_ng_a|bool
|
when: test_ha_ng_a|bool
|
||||||
|
|
||||||
# Test: NG B
|
# Test: NG B
|
||||||
@@ -126,6 +131,7 @@
|
|||||||
rescue:
|
rescue:
|
||||||
- name: copy stderr test result to undercloud and check command
|
- name: copy stderr test result to undercloud and check command
|
||||||
copy: content="{{ test_ha_ng_b_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_ng_b_stderr.log"
|
copy: content="{{ test_ha_ng_b_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_ng_b_stderr.log"
|
||||||
|
- fail: msg="{{ test_ha_ng_b_cmd.stderr }}"
|
||||||
when: test_ha_ng_b|bool
|
when: test_ha_ng_b|bool
|
||||||
|
|
||||||
# Test: NG C
|
# Test: NG C
|
||||||
@@ -141,6 +147,7 @@
|
|||||||
rescue:
|
rescue:
|
||||||
- name: copy stderr test result to undercloud and check command
|
- name: copy stderr test result to undercloud and check command
|
||||||
copy: content="{{ test_ha_ng_c_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_ng_c_stderr.log"
|
copy: content="{{ test_ha_ng_c_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_ng_c_stderr.log"
|
||||||
|
- fail: msg="{{ test_ha_ng_c_cmd.stderr }}"
|
||||||
when: test_ha_ng_c|bool
|
when: test_ha_ng_c|bool
|
||||||
|
|
||||||
# Test: Instance deployment
|
# Test: Instance deployment
|
||||||
@@ -155,4 +162,5 @@
|
|||||||
rescue:
|
rescue:
|
||||||
- name: copy stderr test result to undercloud and check command
|
- name: copy stderr test result to undercloud and check command
|
||||||
copy: content="{{ test_ha_instance_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_instance_stderr.log"
|
copy: content="{{ test_ha_instance_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_instance_stderr.log"
|
||||||
|
- fail: msg="{{ test_ha_instance_cmd.stderr }}"
|
||||||
when: test_ha_instance|bool
|
when: test_ha_instance|bool
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ function play_on_resources {
|
|||||||
do
|
do
|
||||||
echo -n "$(date) - Performing action $action on resource $resource "
|
echo -n "$(date) - Performing action $action on resource $resource "
|
||||||
# Do the action on the resource
|
# Do the action on the resource
|
||||||
sudo pcs resource $action $resource --wait $RESOURCE_CHANGE_STATUS_TIMEOUT
|
sudo pcs resource $action $resource --wait=$RESOURCE_CHANGE_STATUS_TIMEOUT
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
echo "FAILURE!"
|
echo "FAILURE!"
|
||||||
|
|||||||
Reference in New Issue
Block a user