From c0e387c37aa7ca50112c0e534c5b1eb04546cdac Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Tue, 5 Jun 2018 15:28:28 -0400 Subject: [PATCH] validations: Allow to customize the max retries The max tries per validation task is currently hardcoded to 40. On slow nodes it's possible to reach this limit easily. This patch allows to customize the max retries and set the default value to 40 as a backward compatibility. Change-Id: Id23b6a301bea6592bc033ee8aa475933e171e3d8 --- roles/tripleo-validations/defaults/main.yml | 1 + .../tripleo-validations/templates/run-tripleo-validations.sh.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/tripleo-validations/defaults/main.yml b/roles/tripleo-validations/defaults/main.yml index 886d6dbbb..87070b7fd 100644 --- a/roles/tripleo-validations/defaults/main.yml +++ b/roles/tripleo-validations/defaults/main.yml @@ -20,3 +20,4 @@ run_preintro_val_log: "{{ val_working_dir }}/run_preintro_validations_negative_t validations_dir: "/usr/share/openstack-tripleo-validations/validations" validations_static_inventory: "{{ val_working_dir }}/validations_static_inventory" +validations_max_retries: 40 diff --git a/roles/tripleo-validations/templates/run-tripleo-validations.sh.j2 b/roles/tripleo-validations/templates/run-tripleo-validations.sh.j2 index bec02e5a1..bbe80531f 100755 --- a/roles/tripleo-validations/templates/run-tripleo-validations.sh.j2 +++ b/roles/tripleo-validations/templates/run-tripleo-validations.sh.j2 @@ -49,7 +49,7 @@ for validation_name in $LIST_VALIDATIONS; do sleep 1 STATE=$(mistral execution-get -f value -c State "$ID") TRIES=$((TRIES+1)) - if [ "$TRIES" -gt 40 ]; then + if [ "$TRIES" -gt {{ validations_max_retries }} ]; then break fi done