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
This commit is contained in:
Dimitri Savineau 2018-06-05 15:28:28 -04:00
parent 83d1f11ad6
commit c0e387c37a
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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