Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Very Demiurge Very Mindful
Kolla Ansible
Commits
1907607a
Commit
1907607a
authored
5 years ago
by
Zuul
Committed by
Gerrit Code Review
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge "CI: Don't fail on expected critical log messages"
parents
73b63441
2f7640d3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/check-logs.sh
+22
-1
22 additions, 1 deletion
tests/check-logs.sh
with
22 additions
and
1 deletion
tests/check-logs.sh
+
22
−
1
View file @
1907607a
...
@@ -16,6 +16,25 @@ function check_file_for_level {
...
@@ -16,6 +16,25 @@ function check_file_for_level {
sudo
egrep
"
$2
"
$1
| egrep
-v
"(logging_exception_prefix|rate_limit_except_level)"
sudo
egrep
"
$2
"
$1
| egrep
-v
"(logging_exception_prefix|rate_limit_except_level)"
}
}
function
filter_out_expected_critical
{
# $1: file
# Filter out expected critical log messages that we do not want to fail the
# job.
case
$1
in
*
/placement-api.log
)
# Sometimes we see this during upgrade when keystone is down.
grep
-v
"Failed to fetch token data from identity server"
;;
*
)
# We have to provide some pass-through consumer to avoid:
# grep: write error: Broken pipe
# from check_file_for_level
cat
;;
esac
}
any_critical
=
0
any_critical
=
0
for
level
in
CRITICAL ERROR WARNING
;
do
for
level
in
CRITICAL ERROR WARNING
;
do
all_file
=
/tmp/logs/kolla/all-
${
level
}
.log
all_file
=
/tmp/logs/kolla/all-
${
level
}
.log
...
@@ -27,7 +46,9 @@ for level in CRITICAL ERROR WARNING; do
...
@@ -27,7 +46,9 @@ for level in CRITICAL ERROR WARNING; do
if
check_file_for_level
$f
$level
>
/dev/null
;
then
if
check_file_for_level
$f
$level
>
/dev/null
;
then
any_matched
=
1
any_matched
=
1
if
[[
$level
=
CRITICAL
]]
;
then
if
[[
$level
=
CRITICAL
]]
;
then
any_critical
=
1
if
check_file_for_level
$f
$level
| filter_out_expected_critical
$f
>
/dev/null
;
then
any_critical
=
1
fi
fi
fi
echo
$f
>>
$all_file
echo
$f
>>
$all_file
check_file_for_level
$f
$level
>>
$all_file
check_file_for_level
$f
$level
>>
$all_file
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment