aboutsummaryrefslogtreecommitdiff
path: root/tests/check-logs.sh
diff options
context:
space:
mode:
authorMichal Nasiadka <mnasiadka@gmail.com>2024-12-23 17:35:32 +0100
committerMichal Nasiadka <mnasiadka@gmail.com>2025-01-13 13:27:29 +0000
commit891568d6d76d2545c465e2b8cadc010ca065c0a6 (patch)
tree203096be22e1eaa2dcd0e2bd7c14e036aae64ae5 /tests/check-logs.sh
parentb4e9022a8e7404654439959366412c03e62e708a (diff)
downloadkolla-ansible-891568d6d76d2545c465e2b8cadc010ca065c0a6.tar.gz
kolla-ansible-891568d6d76d2545c465e2b8cadc010ca065c0a6.zip
CI: Add unreadable files to check-logs.sh
fluentd emits a warn message when it can't read a file "unreadable. It is excluded and would be examined next time." Depends-On: https://review.opendev.org/c/openstack/kolla/+/939055 Depends-On: https://review.opendev.org/c/openstack/kolla/+/939088 Change-Id: I4313b6918c381ec5e79e78df2f9a0cbaf25df53e
Diffstat (limited to 'tests/check-logs.sh')
-rwxr-xr-xtests/check-logs.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/check-logs.sh b/tests/check-logs.sh
index 18a9fcfee..951b37253 100755
--- a/tests/check-logs.sh
+++ b/tests/check-logs.sh
@@ -8,7 +8,7 @@ set -o pipefail
# Enable unbuffered output for Ansible in Jenkins.
export PYTHONUNBUFFERED=1
-declare -a fluentchecks=("got incomplete line before first line" "pattern not matched:")
+declare -a fluentchecks=("got incomplete line before first line" "pattern not matched:" "unreadable. It is excluded and would be examined next time." "Permission denied @ rb_sysopen")
function check_openstack_log_file_for_level {
# $1: file
@@ -26,7 +26,7 @@ function check_fluentd_log_file_for_level {
function check_fluentd_log_file_for_content {
# $1: file
# $2: content
- sudo egrep " $2 " $1
+ sudo egrep "$2" $1
}
function check_docker_log_file_for_sigkill {
@@ -96,7 +96,7 @@ for string in "${fluentchecks[@]}"; do
if check_fluentd_log_file_for_content $fluentd_log_file "$string" >/dev/null; then
any_critical=1
echo "(critical) Found some error log messages in fluentd logs. Matches in $fluentd_file"
- echo "$string" >> $fluentd_file
+ echo "Check: $string" >> $fluentd_file
check_fluentd_log_file_for_content $fluentd_log_file "$string" >> $fluentd_file
echo >> $fluentd_file
fi