watcher: automatically restart noded/rapi
authorIustin Pop <iustin@google.com>
Mon, 25 May 2009 13:41:56 +0000 (15:41 +0200)
committerIustin Pop <iustin@google.com>
Mon, 25 May 2009 14:07:38 +0000 (16:07 +0200)
commitc4f0219c486fff45b5f883efe036154aa1243c04
treeda577036334e7c40e60e7d7a7f1a64b245433f72
parent24edc6d4de0c388ca3c4faa790479a66100e89e6
watcher: automatically restart noded/rapi

This patch makes the watcher automatically restart the node and rapi
daemons, if they are not running (as per the PID file).

This is not an exhaustive test; a better one would be TCP connect to the
port, and an even better one a simple protocol ping (e.g. get / for rapi
and a rpc_call_alive for noded), but since we don't know how they've
been started we can't implement it today. rapi would need to write the
SSL/port to a file, and noded something similar, so that we know how to
connect.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
daemons/ganeti-watcher