-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TEST] packaging: function to collect debug info #28608
[TEST] packaging: function to collect debug info #28608
Conversation
Sometimes when packaging tests fail in CI the test logs aren't enough to tell what went wrong. This routine helps collect more info about the state of the es installation at failure time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
@@ -415,6 +415,50 @@ stop_elasticsearch_service() { | |||
fi | |||
} | |||
|
|||
# the default netcat packages in the distributions we test are not all compatible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to expand this comment a bit with something like "so we have to use /dev/tcp" or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I left few comments
describe_port() { | ||
local host="$1" | ||
local port="$2" | ||
run test_port "$host" "$port" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd put this in a local variable, I like the utilities not depend on the run
wrapper provided by the bats framework..; wdyt?
else | ||
echo "The elasticsearch log doesn't exist at $es_logfile" | ||
|
||
if [ -e "$system_logfile" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can always print both logs? We have at least 1 test with 2 nodes and in this case it would only prints the first one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that idea, I'll make it print both
tail -n20 /var/log/messages | ||
fi | ||
false | ||
echo "Looks like elasticsearch never started" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix the --tries 120 parameter please? It should be --tries=120
* master: Backported synced-flush PR to v5.6.8 and v6.2.2 Move more XContent.createParser calls to non-deprecated version (elastic#28672) Move more XContent.createParser calls to non-deprecated version (elastic#28670) Build: Group archive and package distribution projects (elastic#28673) [DOCS] Add supported token filters [TEST] bump timeout in testFetchShardsSkipUnavailable to 5s Relax remote check for bwc project checkouts (elastic#28666) [TEST] Synchronize searcher list in IndexShardTests [TEST] packaging: function to collect debug info (elastic#28608) Compute declared versions in a static block Docs: Remove references to elasticsearch directory in plugins (elastic#28647) Remove snapshot conditional for bwc snapshots (elastic#28657) Removed redundant JSON object from Put Mapping docs (elastic#28514) Update threadpool.asciidoc target_response_time (elastic#28655)
Sometimes when packaging tests fail in CI the test logs aren't enough to
tell what went wrong. This routine helps collect more info about the
state of the es installation at failure time