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

[ITs] change healthcheck for elasticsearch #20514

Merged
merged 3 commits into from
Aug 11, 2020

Conversation

v1v
Copy link
Member

@v1v v1v commented Aug 10, 2020

What does this PR do?

Elasticsearch docker image is based on centos:8 but it doesn't have python installed.

Why is it important?

Healthcheck with the python approach are not supported anymore since python is not installed. curl is the less intrusive approach instead.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

## How to test this

gvm install go1.14.4
gvm use go1.14.4
make mage
cd x-pack/libbeat
mage build test

...
-------------------------------------------------- generated xml file: /go/src/github.com/elastic/beats/x-pack/libbeat/build/TEST-python-integration.xml ---------------------------------------------------
=========================================================================================== slowest 20 durations ===========================================================================================
14.83s call     x-pack/libbeat/tests/system/test_management.py::TestManagement::test_fetch_configs
12.87s call     x-pack/libbeat/tests/system/test_management.py::TestManagement::test_configs_cache
1.94s call     x-pack/libbeat/tests/system/test_management.py::TestManagement::test_enroll
0.42s call     x-pack/libbeat/tests/system/test_management.py::TestManagement::test_enroll_bad_pw

(8 durations < 0.005s hidden.  Use -vv to show these durations.)
============================================================================================ 4 passed in 33.36s ============================================================================================
>> python test: Integration Testing Complete

Logs

docker inspect $(docker ps | grep docker.elastic.co/elasticsearch/elasticsearch:8.0.0-SNAPSHOT | cut -f1 -d' ') --format "{{json .State.Health }}" | jq

{
  "Status": "starting",
  "FailingStreak": 752,
  "Log": [
    {
      "Start": "2020-08-10T08:00:34.210390517Z",
      "End": "2020-08-10T08:00:34.315594515Z",
      "ExitCode": 127,
      "Output": "/bin/sh: python: command not found\n"
    },

Issues

Duplicates #20511

@v1v v1v self-assigned this Aug 10, 2020
@v1v v1v added the automation label Aug 10, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 10, 2020
@v1v v1v requested a review from jsoriano August 10, 2020 13:18
@v1v v1v marked this pull request as ready for review August 10, 2020 13:19
@@ -65,14 +65,14 @@ services:
file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml
service: elasticsearch
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cluster/health | grep -vq '\"status\":\"red\"'"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@v1v
Copy link
Member Author

v1v commented Aug 11, 2020

Unrelated test failures

@v1v v1v merged commit 6892234 into elastic:master Aug 11, 2020
@v1v v1v deleted the fix/elasticsearch-its-healthcheck branch August 11, 2020 08:45
@v1v v1v added the Team:Automation Label for the Observability productivity team label Aug 11, 2020
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 11, 2020
v1v added a commit to v1v/beats that referenced this pull request Aug 11, 2020
v1v added a commit that referenced this pull request Aug 11, 2020
v1v added a commit that referenced this pull request Aug 12, 2020
#20558) (#20538)

* [ITs] change healthcheck for elasticsearch (#20514)
* [ITs] Revert healthcheck for elasticsearchssl service to the previous behaviour (#20558)
v1v added a commit to v1v/beats that referenced this pull request Aug 12, 2020
…ne-2.0

* upstream/master: (39 commits)
  [ITs] Revert healthcheck for elasticsearchssl service to the previous behaviour (elastic#20558)
  [Heartbeat] Fix packaging (elastic#20566)
  [Heartbeat] Add Magefile to X-Pack (elastic#20549)
  [Packetbeat] Add "network" to event.category (elastic#20392)
  fix typo in docs (elastic#20541)
  Add service resource in k8s cluster role (elastic#20546)
  Update Golang version to 1.14.7 (elastic#20508)
  Add missing inputs to filebeat spec (elastic#20388)
  add warning log in aws and googlecloud module for API cost (elastic#20523)
  Fix fortinet.firewall.mem value to be interpreted as integer (elastic#19335)
  [CI] add more resilience (elastic#20505)
  [JJBB] fix credentials with a service account for golang-crossbuild (elastic#20537)
  [ITs] change healthcheck for elasticsearch (elastic#20514)
  [JJBB] fix credentials with a service account (elastic#20535)
  chore(ci): use build step for checking if is PR (elastic#20536)
  [CI] runbld project name (elastic#20466)
  Add panw.panos.endreason field (elastic#18705)
  [Filebeat] Fix PANW field spelling "veredict" to "verdict" (elastic#18808)
  Fix typo in netflow module docs (elastic#18992)
  Modified auditd ingest pipeline to handle node=hostname (elastic#19659)
  ...
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants