Logstash 1.4.x init script "deficiencies"

Description

We are having two problems with the RHEL init scripts that are provided in the LS RPM packages.

1. The init script does not work with RHEL5 (and derivates like CentOS 5). Reason is that the "chroot" command does not accept the "--userspec" parameter.
2. The way the init script switches a user is by calling "chroot --userspec $LS_USER:$LS_GROUP". This renders any supplementary groups that the logstash user is a member of useless (usecase for us: add "logstash" user to "named" group to be able to parse query logs).

We unsuccessfully tried to use another mechanism to start LS from within the init script:

1. "sudo", even called with "-E", will leave behind ugly artifacts in the process table - for once, the "sudo" command itself, the "ulimit -c ...; /opt/logstash/bin/logstash" command line and finally the java process itself. The same happens with "runuser" or "daemon".
2. "chroot" is part of "coreutils", so we can't simply upgrade this on RHEL5.

Any pointer/help/worarounds would be greatly appreciated.

Cheers
Stefan

Environment

None

Status

Assignee

Logstash Developers

Reporter

Stefan Förster

Affects versions

Priority

Configure