Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2226177a
Commit
2226177a
authored
Apr 13, 2021
by
Sami Hiltunen
Committed by
Mark Lapierre
Apr 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support `per_repository` elector's health check failure message
parent
28a7bb24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
qa/qa/service/praefect_manager.rb
qa/qa/service/praefect_manager.rb
+6
-2
No files found.
qa/qa/service/praefect_manager.rb
View file @
2226177a
...
...
@@ -225,6 +225,10 @@ module QA
)
end
def
health_check_failure_message?
(
msg
)
[
'error when pinging healthcheck'
,
'failed checking node health'
].
include?
(
msg
)
end
def
wait_for_no_praefect_storage_error
# If a healthcheck error was the last message to be logged, we'll keep seeing that message even if it's no longer a problem
# That is, there's no message shown in the Praefect logs when the healthcheck succeeds
...
...
@@ -241,7 +245,7 @@ module QA
QA
::
Runtime
::
Logger
.
debug
(
line
.
chomp
)
log
=
JSON
.
parse
(
line
)
break
true
if
log
[
'msg'
]
!=
'error when pinging healthcheck'
break
true
unless
health_check_failure_message?
(
log
[
'msg'
])
rescue
JSON
::
ParserError
# Ignore lines that can't be parsed as JSON
end
...
...
@@ -302,7 +306,7 @@ module QA
QA
::
Runtime
::
Logger
.
debug
(
line
.
chomp
)
log
=
JSON
.
parse
(
line
)
log
[
'msg'
]
==
'error when pinging healthcheck'
&&
log
[
'storage'
]
==
node
health_check_failure_message?
(
log
[
'msg'
])
&&
log
[
'storage'
]
==
node
rescue
JSON
::
ParserError
# Ignore lines that can't be parsed as JSON
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment