Skip to content
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

Merged
merged 4 commits into from
Feb 13, 2018

Conversation

andyb-elastic
Copy link
Contributor

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

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
@andyb-elastic andyb-elastic added >test Issues or PRs that are addressing/adding tests v7.0.0 v6.3.0 labels Feb 9, 2018
@andyb-elastic andyb-elastic requested review from nik9000 and tlrx February 9, 2018 18:45
Copy link
Member

@nik9000 nik9000 left a 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
Copy link
Member

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.

Copy link
Member

@tlrx tlrx left a 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"
Copy link
Member

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
Copy link
Member

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.

Copy link
Contributor Author

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"
Copy link
Member

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

@andyb-elastic andyb-elastic merged commit 53d1cde into elastic:master Feb 13, 2018
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Feb 15, 2018
* 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)
@andyb-elastic andyb-elastic mentioned this pull request Jul 17, 2018
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>test Issues or PRs that are addressing/adding tests v6.3.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants