Makes tempest sendmail failure easier to track

This task can fail with various errors and this change enables us
to spot its failure with a single LogStash query.

In order to avoid false positive string match when bash is using verbose
more we encoded the W char in the source, so a string match would happen
only when printed and not on the source code.

Change-Id: Icbb7f71aba2e9d2a4cf4e4c07f953fe3613e6707
Partial-Bug: 1806495
This commit is contained in:
Sorin Sbarnea 2018-12-18 13:45:13 +00:00
parent 49f22ec31a
commit dd97585614
1 changed files with 2 additions and 1 deletions

View File

@ -68,7 +68,8 @@
"{{ lookup('env', 'JOB_NAME')|default('Periodic job', true) }}"
--file "{{ working_dir }}/{{ tempest_log_file }}"
--log-url "{{ tempestmail_log_server }}"
--skip-file "{{ working_dir }}/tempestmail/tempest_skip_{{ release }}.yml"
--skip-file "{{ working_dir }}/tempestmail/tempest_skip_{{ release }}.yml" ||
{ ERR=$?; echo -e "\0127ARNING: Send tempest results by mail failed with code $ERR"; exit $ERR; }
args:
chdir: "{{ working_dir }}/tempestmail"
ignore_errors: true