Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

[elasticsearch] Tweak the 'readinessProbe' command to verify that master nodes are available. #380

Merged
merged 1 commit into from
Nov 21, 2019

Conversation

fatmcgav
Copy link
Contributor

@fatmcgav fatmcgav commented Nov 20, 2019

The behaviour of the / endpoint changed[0] between 6.x and 7.x, whereby
previously it would return a HTTP 503 response when the cluster was
blocked, it now returns a HTTP 200 response even if there are no masters
available.

This change updates the behaviour of the readinessProbe command during
normal running to verify that the local node is responding and that there
are master nodes available. [1]

The desired behaviour here is that if the data nodes are unable to talk to
their master nodes for whatever reason, then the data nodes will become
Unready and therefore be removed from the Service load-balancer until
the master nodes are available again.

Refs:
[0] elastic/elasticsearch#29045
[1] elastic/elasticsearch#34897 (comment)

  • Chart version not bumped (the versions are all bumped and released at the same time)
  • [ ] README.md updated with any new values or changes
  • Updated template tests in ${CHART}/tests/*.py
  • [ ] Updated integration tests in ${CHART}/examples/*/test/goss.yaml

nodes are available.

The behaviour of the `/` endpoint changed[0] between 6.x and 7.x, whereby
previously it would return a HTTP `503` response when the cluster was
blocked, it now returns a HTTP `200` response even if there are no masters
available.

This change updates the behaviour of the `readinessProbe` command during
normal running to verify that the local node is responding and that there
are master nodes available. [1]

The desired behaviour here is that if the data nodes are unable to talk to
their master nodes for whatever reason, then the data nodes will become
`Unready` and therefore be removed from the Service load-balancer until
the master nodes are available again.

Refs:
[0] elastic/elasticsearch#29045
[1] elastic/elasticsearch#34897 (comment)
@fatmcgav fatmcgav self-assigned this Nov 20, 2019
Copy link
Member

@jmlrt jmlrt left a comment

Choose a reason for hiding this comment

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

@jmlrt jmlrt added the enhancement New feature or request label Nov 21, 2019
@fatmcgav
Copy link
Contributor Author

Related issue - #376

@fatmcgav fatmcgav merged commit f2c8815 into elastic:master Nov 21, 2019
@fatmcgav fatmcgav deleted the tweak_es_readiness_command branch November 21, 2019 10:37
jmlrt added a commit to jmlrt/helm-charts that referenced this pull request Apr 17, 2020
This PR update readiness probe endpoint to check only `/` endpoint instead of `/_cluster/health?timeout=0s` when Elasticsearch is already running.
This revert to initial config which was changed in elastic#380 with the exception that 503 HTTP code is accepted for 6.x (see elastic/elasticsearch#8902 for more details about why 503 is OK on Elasticsearch 6.x).
jmlrt added a commit to jmlrt/helm-charts that referenced this pull request Apr 17, 2020
This PR update readiness probe endpoint to check only `/` endpoint instead of `/_cluster/health?timeout=0s` when Elasticsearch is already running.
This revert to initial config which was changed in elastic#380 with the exception that 503 HTTP code is accepted for 6.x (see elastic/elasticsearch#8902 for more details about why 503 is OK on Elasticsearch 6.x).
galina-tochilkin pushed a commit to mtp-devops/3d-party-helm that referenced this pull request Dec 20, 2022
This PR update readiness probe endpoint to check only `/` endpoint instead of `/_cluster/health?timeout=0s` when Elasticsearch is already running.
This revert to initial config which was changed in elastic/helm-charts#380 with the exception that 503 HTTP code is accepted for 6.x (see elastic/elasticsearch#8902 for more details about why 503 is OK on Elasticsearch 6.x).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants