Details
-
Improvement
-
Status: Resolved
-
Low
-
Resolution: Fixed
-
None
-
cassandra-2.2 branch.
Description
I have a test that repeatedly rolls nodes in a C* cluster. Occasionally I run into a case where a node is not restarted because stop-server.ps1 returns before the C* process had terminated.
This is because stop-server.ps1 currently will wait for up to 2 seconds for cassandra to exit from a CTRL+C and then returns. In practice it can take cassandra longer than that to exit and the script doesn't give you any indication that cassandra is still running.
Proposing that stop-server.ps1 behaves the same way as the 'cassandra' init script provided by dsc21 does:
start-stop-daemon -K -p "$PIDFILE" -R TERM/30/KILL/5 >/dev/null
The init script currently sends a SIGTERM (CTRL+C) to the process and if it hasn't terminated after 30 seconds sends a SIGKILL to it.