-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[WIP] Revert "Skip x-pack libbeat tests again as flaky (#10068)" #10179
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: '2.1' | ||
version: '2.3' | ||
services: | ||
beat: | ||
build: ${PWD}/. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: '2.1' | ||
version: '2.3' | ||
services: | ||
beat: | ||
build: ${PWD}/. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: '2.1' | ||
version: '2.3' | ||
services: | ||
beat: | ||
build: ${PWD}/. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: '2.1' | ||
version: '2.3' | ||
services: | ||
beat: | ||
build: ${PWD}/. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: '2.1' | ||
version: '2.3' | ||
services: | ||
beat: | ||
build: ../../auditbeat | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: '2.1' | ||
version: '2.3' | ||
services: | ||
beat: | ||
build: ../../filebeat | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: '2.1' | ||
version: '2.3' | ||
services: | ||
beat: | ||
build: ${PWD}/. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: '2.1' | ||
version: '2.3' | ||
services: | ||
beat: | ||
build: ${PWD}/. | ||
|
@@ -20,27 +20,24 @@ services: | |
depends_on: | ||
elasticsearch: { condition: service_healthy } | ||
kibana: { condition: service_healthy } | ||
healthcheck: | ||
interval: 1s | ||
retries: 2400 | ||
|
||
elasticsearch: | ||
extends: | ||
file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml | ||
service: elasticsearch | ||
healthcheck: | ||
test: ["CMD", "curl", "-u", "elastic:changeme", "-f", "http://localhost:9200"] | ||
test: ["CMD-SHELL", 'python -c ''import urllib, json; response = urllib.urlopen("http://elastic:changeme@localhost:9200/_cluster/health"); data = json.loads(response.read()); exit(1) if data["status"] != "green" else exit(0);'''] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ++ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently this should only matter for x-pack or anything that uses security, I didn't want to change anything on other docker-compose file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ruflin Just to clarify, I will not change the healthcheck for the testing/environment files, become as of today nothing assume that a cluster need to be green other than security, but as we add more test or when/if metricbeat has integration tests that requires security we could move all the docker-compose files to that strategy. |
||
retries: 1200 | ||
interval: 1s | ||
interval: 5s | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use the old one again to speed up bulids? |
||
start_period: 60s | ||
environment: | ||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | ||
- "network.host=" | ||
- "transport.host=127.0.0.1" | ||
- "http.host=0.0.0.0" | ||
- "xpack.security.enabled=true" | ||
- "xpack.license.self_generated.type=trial" | ||
command: bash -c "bin/elasticsearch-keystore create && echo changeme | bin/elasticsearch-keystore add --stdin bootstrap.password && /usr/local/bin/docker-entrypoint.sh eswrapper" | ||
restart: on-failure:5 | ||
- ELASTIC_PASSWORD=changeme | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
kibana: | ||
depends_on: | ||
|
@@ -51,6 +48,6 @@ services: | |
healthcheck: | ||
test: ["CMD-SHELL", 'python -c ''import urllib, json; response = urllib.urlopen("http://elastic:changeme@localhost:5601/api/status"); data = json.loads(response.read()); exit(1) if data["status"]["overall"]["state"] != "green" else exit(0);'''] | ||
retries: 1200 | ||
interval: 1s | ||
interval: 5s | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason for this quite long delay and lower interval? This will slow down builds I would assume? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well slow down is actually relative in the healthcheck, if you wait for 5s instead of 1s, it's 4 fewer requests ES has to deal before the next check. Since Travis is not the fastest thing in the world, giving it more time to start is a good compromise. You see that I've only modified theses limit for the @ruflin if the test suite becomes flaky or unreliable we will have to switch to file-based authentification for ES. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would hope that ES can cope with 1 request per sec ;-) For the start_period, tried to find some good docs but I assume it waits initially 60s? Seems a bit too much. Overall my goal is to keep the CI time down, as soon as a service is available, tests should start. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think too, but well its Travis its docker, I prefer to give it as much chance as possible, maybe call that I am fed up with that and I would prefer to not whack a mole more :D The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SGTM, good argument ;-) |
||
start_period: 60s | ||
command: /usr/local/bin/kibana-docker --xpack.security.enabled=true --elasticsearch.username=elastic --elasticsearch.password=changeme | ||
restart: on-failure:5 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: '2.1' | ||
version: '2.3' | ||
services: | ||
beat: | ||
build: ../../metricbeat | ||
|
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 assume this was for debugging purpose. Should we keep it in?
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.
@ruflin YES we should, because when
docker-compose
fails it can be hard to either reproduce it or get the logs, it took me a few tries to get an idea how to have useful debug information and when I finally found a good way it took 50 runs (7m each) to finally make it fails..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.
The above will do two things:
The 2, was why I was able to actually make sense of this error, Logging at the log it was clearly demonstrating that ES was actually not in a green state and the authentification failed.