Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve environment file formatting #477

Merged
merged 1 commit into from Jun 21, 2016

Conversation

hrak
Copy link
Contributor

@hrak hrak commented Jun 20, 2016

This PR brings the contents of /etc/default/elasticsearch / /etc/sysconfig/elasticsearch more in line with the format that the Elasticsearch package uses. It removes quotes from vars that don't need it, and strips superfluous spaces from ES_JAVA_OPTS for a cleaner look. Tested on Ubuntu 14.04 and CentOS 6.

It also fixes a tiny cosmetic bug that resulted in env_options being included in ES_JAVA_OPTS because the default was '' instead of nil.

Before:

CONF_DIR="/etc/elasticsearch"
DATA_DIR="/usr/share/elasticsearch"
ES_GROUP="elasticsearch"
ES_HEAP_SIZE="496m"
ES_HOME="/usr/share/elasticsearch"
ES_JAVA_OPTS="-server -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Xss256k      -XX:+UseParNewGC      -XX:+UseConcMarkSweepGC      -XX:CMSInitiatingOccupancyFraction=75      -XX:+UseCMSInitiatingOccupancyOnly      -XX:+HeapDumpOnOutOfMemoryError      -XX:+DisableExplicitGC  -Dfile.encoding=UTF-8 -Djna.nosys=true  "
ES_STARTUP_SLEEP_TIME="5"
ES_USER="elasticsearch"
LOG_DIR="/var/log/elasticsearch"
MAX_LOCKED_MEMORY="unlimited"
MAX_OPEN_FILES="64000"
PID_DIR="/var/run/elasticsearch"

After:

CONF_DIR=/etc/elasticsearch
DATA_DIR=/usr/share/elasticsearch
ES_GROUP=elasticsearch
ES_HEAP_SIZE=496m
ES_HOME=/usr/share/elasticsearch
ES_JAVA_OPTS="-server -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Xss256k -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC -Dfile.encoding=UTF-8 -Djna.nosys=true"
ES_STARTUP_SLEEP_TIME=5
ES_USER=elasticsearch
LOG_DIR=/var/log/elasticsearch
MAX_LOCKED_MEMORY=unlimited
MAX_OPEN_FILES=64000
PID_DIR=/var/run/elasticsearch

…'t need it, strip superfluous spaces from ES_JAVA_OPTS
@martinb3 martinb3 self-assigned this Jun 21, 2016
@martinb3 martinb3 merged commit bf0d1f3 into sous-chefs:master Jun 21, 2016
@martinb3
Copy link
Contributor

Thank you for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants