From b0706544f711bdaa010e088e98962a3dfd0b614d Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Thu, 30 May 2019 15:12:37 -0500 Subject: [PATCH] Elasticsearch: kill process after data node drain This updates the Elasticsearch entrypoint override for the data nodes to include a signal to kill the process after the trap to drain each data node completes Change-Id: Iccd4342fe16d06787cb24342d9a57e4de12e6980 --- elasticsearch/templates/bin/_elasticsearch.sh.tpl | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch/templates/bin/_elasticsearch.sh.tpl b/elasticsearch/templates/bin/_elasticsearch.sh.tpl index 0cc1353a8..ecd619cd8 100644 --- a/elasticsearch/templates/bin/_elasticsearch.sh.tpl +++ b/elasticsearch/templates/bin/_elasticsearch.sh.tpl @@ -66,6 +66,7 @@ function start_data_node () { sleep 5 done echo "Node ${NODE_NAME} is ready to shutdown" + kill -TERM 1 } trap drain_data_node TERM EXIT HUP INT wait