01ba660fe7
This commit e80a5e3cb319fc80c669d6d75f5abeb0d781758b introduced an issue, it wrongly passes an empty string to scylla-jmx cmdline, which causes scylla-jmx script stuck. The cmdline real executes is: # scylla-jmx -l /usr/lib/scylla/jmx "" Wrapped quotation marks of env variable can't be parsed away if we use ${SCYLLA_PARAMS} in ExecStart cmdline, but $SCYLLA_PARAMS works. Another problem is the variable can't be re-used insider env file, reference: [1]. Let's split the parameters to multiple env variables, and combine them in ExecStart cmdline. [1] https://unix.stackexchange.com/questions/358998/systemd-environmentfile-re-using-variables-how Fixes scylladb/scylla#2935 Signed-off-by: Amos Kong <amos@scylladb.com> Message-Id: <c983103c08a3f901037fd282a14df5bb7f85dddd.1510494507.git.amos@scylladb.com>
17 lines
435 B
SYSTEMD
17 lines
435 B
SYSTEMD
[Unit]
|
|
Description=Scylla JMX
|
|
Requires=scylla-server.service
|
|
After=scylla-server.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
EnvironmentFile=@@SYSCONFDIR@@/scylla-jmx
|
|
User=scylla
|
|
Group=scylla
|
|
ExecStart=/usr/lib/scylla/jmx/scylla-jmx $SCYLLA_JMX_PORT $SCYLLA_API_PORT $SCYLLA_API_ADDR $SCYLLA_JMX_ADDR $SCYLLA_JMX_FILE $SCYLLA_JMX_LOCAL $SCYLLA_JMX_REMOTE $SCYLLA_JMX_DEBUG
|
|
KillMode=process
|
|
Restart=on-abnormal
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|