[ 
https://issues.apache.org/jira/browse/CASSANDRA-14351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17771523#comment-17771523
 ] 

Thomas Cataldo commented on CASSANDRA-14351:
--------------------------------------------

I'm not using it right now for cassandra, but this is it, you just switch to 
type=notify when the systemd class is in use.

Here is an exemple service file we use with our systemd support :

 

{noformat}

[Unit] 
Description=BlueMind Node Server 
ConditionPathExists=!/etc/bm/bm-node.disabled 
StartLimitIntervalSec=30 
StartLimitBurst=2 
After=bm-pimp.service 
PartOf=bluemind.target 

[Service] 
Type=notify 
Restart=on-failure 
OOMPolicy=kill 
LimitNOFILE=65536 
WorkingDirectory=/var/log 
TimeoutStartSec=90s 
GuessMainPID=no 
RemainAfterExit=no 
SuccessExitStatus=129 143 
Environment="PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" 
Environment=JAVA_HOME=/usr/lib/jvm/bm-jdk 
ExecStart=/usr/share/bm-node/bm-node /var/run/bm-node.pid 

# enabling on one component enables accounting on the whole slice, which is 
what we want 
CPUAccounting=yes 
MemoryAccounting=yes 

[Install] 
WantedBy=bluemind.target

{noformat}

> Support systemd SD_NOTIFY interface during startup
> --------------------------------------------------
>
>                 Key: CASSANDRA-14351
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14351
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Packaging
>            Reporter: Thomas Bechtold
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>             Fix For: 4.0.x, 4.1.x, 5.0.x, 5.x
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> When cassandra is started via systemd, it would be nice to support the 
> [SD_NOTIFY|https://www.freedesktop.org/software/systemd/man/sd_notify.html] 
> protocol so systemd know, when cassandra is ready (that can be use for 
> dependencies or when you need to wait until cassandra startup is done).
> A very simple implementation could be done using the 
> {code:java}
> systemd-notify --ready
> {code}
> command line tool (and ignore it if the tool is not there)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to