From c018a3a7d16e67b0838e5573d289bcee72e123b7 Mon Sep 17 00:00:00 2001 From: Stephan Eckweiler Date: Mon, 9 Oct 2017 17:11:06 +0100 Subject: [PATCH 1/2] parameterize debian init startup timeout --- defaults/main.yml | 1 + templates/init/debian/elasticsearch.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index f7071dab..57f207aa 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -32,6 +32,7 @@ es_xpack_features: ["alerting","monitoring","graph","ml","security"] #They do not effect the current configuration es_api_host: "localhost" es_api_port: 9200 +es_debian_startup_timeout: 10 # Since ansible 2.2 the following variables need to be defined # to allow the role to be conditionally played with a when condition. diff --git a/templates/init/debian/elasticsearch.j2 b/templates/init/debian/elasticsearch.j2 index 64c2f0af..9fa25f04 100755 --- a/templates/init/debian/elasticsearch.j2 +++ b/templates/init/debian/elasticsearch.j2 @@ -165,7 +165,7 @@ case "$1" in return=$? if [ $return -eq 0 ]; then i=0 - timeout=10 + timeout={{es_debian_startup_timeout}} # Wait for the process to be properly started before exiting until { kill -0 `cat "$PID_FILE"`; } >/dev/null 2>&1 do From 39678c02929c04f8aa5f4142d6ee9aba0b9761aa Mon Sep 17 00:00:00 2001 From: Stephan Eckweiler Date: Mon, 9 Oct 2017 17:24:45 +0100 Subject: [PATCH 2/2] Documentation update --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6692ff15..f1aeab3f 100644 --- a/README.md +++ b/README.md @@ -348,6 +348,7 @@ In addition to es_config, the following parameters allow the customization of th * ```es_max_map_count``` maximum number of VMA (Virtual Memory Areas) a process can own. Defaults to 262144. * ```es_max_open_files``` the maximum file descriptor number that can be opened by this process. Defaults to 65536. * ```es_max_threads``` the maximum number of threads the process can start. Defaults to 2048 (the minimum required by elasticsearch). +* ```es_debian_startup_timeout``` how long Debian-family SysV init scripts wait for the service to start, in seconds. Defaults to 10 seconds. Earlier examples illustrate the installation of plugins using `es_plugins`. For officially supported plugins no version or source delimiter is required. The plugin script will determine the appropriate plugin version based on the target Elasticsearch version. For community based plugins include the full url. This approach should NOT be used for the X-Pack plugin. See X-Pack below for details here.