Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #392 from edge-records/master
Browse files Browse the repository at this point in the history
Parameterize timeout value for ES startup in Debian SysV init scripts
  • Loading branch information
Crazybus authored Feb 1, 2018
2 parents 4548f00 + 39678c0 commit 03a685b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ es_xpack_features: ["alerting","monitoring","graph","ml","security"]
#They do not affect 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.
Expand Down
2 changes: 1 addition & 1 deletion templates/init/debian/elasticsearch.j2
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,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
Expand Down

0 comments on commit 03a685b

Please sign in to comment.