aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/check-logs.sh2
-rw-r--r--tests/post.yml8
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/check-logs.sh b/tests/check-logs.sh
index 179a7f6f3..c298dd386 100755
--- a/tests/check-logs.sh
+++ b/tests/check-logs.sh
@@ -19,6 +19,8 @@ function check_file_for_level {
any_critical=0
for level in CRITICAL ERROR WARNING; do
all_file=/tmp/logs/kolla/all-${level}.log
+ # remove the file to avoid collecting duplicates (upgrade, post)
+ rm -f $all_file
any_matched=0
echo "Checking for $level log messages"
for f in $(sudo find /var/log/kolla/ -type f); do
diff --git a/tests/post.yml b/tests/post.yml
index 48ad13f58..b742c06b3 100644
--- a/tests/post.yml
+++ b/tests/post.yml
@@ -8,6 +8,14 @@
content: "{{ hostvars[inventory_hostname] | to_nice_json }}"
dest: "{{ logs_dir }}/facts.json"
+ # NOTE(yoctozepto): this might not have been run during the
+ # regular run due to some earlier failure, yet logs content may
+ # still provide insight into that other, breaking issue
+ - name: Run check-logs.sh script
+ script: check-logs.sh
+ failed_when: false
+ when: not zuul_success | bool
+
- name: Run diagnostics script
environment:
KOLLA_INTERNAL_VIP_ADDRESS: "{{ kolla_internal_vip_address }}"