Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

detect crashed redis instance

  • Loading branch information...
commit 9912a846d9f6604c57c122f36d12604cfb1ef183 1 parent 4b4a6ec
mbr authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 heartbeat/redis
View
4 heartbeat/redis
@@ -277,6 +277,10 @@ read_pid() {
pid=$(pidof -s $OCF_RESKEY_binary)
fi
+ if [ $? -eq 0 -a "x$pid" != "x" ]; then
+ kill -0 $pid
+ fi
+
if [ $? -ne 0 -o "x$pid" = "x" ]; then
ocf_log info "Could not read PID, $REDIS_SERVER_NAME is not running";
return $OCF_NOT_RUNNING
Please sign in to comment.
Something went wrong with that request. Please try again.