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

[GITHUB-19] Adds ulimit option to sys v config #20

Merged
merged 1 commit into from
May 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ sansible_kafka_log_level: WARN
sansible_kafka_log_retention_bytes: 104857600 # 100 M
sansible_kafka_log_retention_hours: 24
sansible_kafka_log_segment_bytes: 104857600
sansible_kafka_max_open_files: 4098
sansible_kafka_num_io_threads: 2
sansible_kafka_num_network_threads: 2
sansible_kafka_num_partitions: 2
Expand Down
1 change: 1 addition & 0 deletions templates/environment.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ GROUP=$NAME

KAFKA_HEAP_OPTS="{{ sansible_kafka_heap_opts }}"
JMX_PORT="{{ sansible_kafka_jmx_port }}"
MAX_OPEN_FILES="{{ sansible_kafka_max_open_files }}"
13 changes: 8 additions & 5 deletions templates/kafka_sysv.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ fi

do_start()
{
KAFKA_HEAP_OPTS="${KAFKA_HEAP_OPTS}" JMX_PORT="${JMX_PORT}" \
exec start-stop-daemon --chuid ${USER}:${GROUP} --start --quiet \
--background --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
if [ -n "$MAX_OPEN_FILES" ]; then
ulimit -n $MAX_OPEN_FILES
fi
KAFKA_HEAP_OPTS="${KAFKA_HEAP_OPTS}" JMX_PORT="${JMX_PORT}" \
exec start-stop-daemon --chuid ${USER}:${GROUP} --start --quiet \
--background --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
}


Expand Down