Delay elasticsearch-data termination
This update adds a preStop lifecycle script to be run on elasticsearch-data pods when they are also functioning as master capable, as will be the case for AIO-DX without worker hosts. The script will check if the data node is master capable, and if so sleep for a number of seconds configured by an environment variable, defaulted to 100. The elasticsearch-data termination delay is desired when the single master capable only pod is on the standby controller and that controller host is locked. The delay in termination will leave the 2 elasticsearch-data pods up to maintain master quorum until the elasticsearch-master pod has migrated over to the active controller. This update also removes the check for green cluster health status in the elasticsearch readiness probe. Story: 2005733 Task: 37321 Change-Id: I6991ffff4e94342f9190896e92790cdaa8de9dea Signed-off-by: Kevin Smith <kevin.smith@windriver.com>
This commit is contained in:
parent
1b2fe9bb8e
commit
b846376f2c
|
@ -103,6 +103,14 @@ data:
|
|||
esMajorVersion: 7
|
||||
masterService: 'mon-elasticsearch-data-headless, mon-elasticsearch-master'
|
||||
podManagementPolicy: OrderedReady
|
||||
clusterHealthCheckParams: ''
|
||||
extraEnvs:
|
||||
- name: DATA_PRESTOP_SLEEP
|
||||
value: "100"
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command: ["/bin/sh", "-c", "MASTER=$(printenv node.master);if [[ \"$MASTER\" == true ]]; then sleep $(printenv DATA_PRESTOP_SLEEP);fi"]
|
||||
wait:
|
||||
resources:
|
||||
- labels:
|
||||
|
@ -177,6 +185,7 @@ data:
|
|||
esMajorVersion: 7
|
||||
masterService: 'mon-elasticsearch-data-headless, mon-elasticsearch-master'
|
||||
podManagementPolicy: OrderedReady
|
||||
clusterHealthCheckParams: ''
|
||||
wait:
|
||||
resources:
|
||||
- labels:
|
||||
|
@ -231,6 +240,7 @@ data:
|
|||
esMajorVersion: 7
|
||||
masterService: 'mon-elasticsearch-data-headless, mon-elasticsearch-master'
|
||||
podManagementPolicy: OrderedReady
|
||||
clusterHealthCheckParams: ''
|
||||
wait:
|
||||
resources:
|
||||
- labels:
|
||||
|
|
Loading…
Reference in New Issue