watcher: try to restart the master if down
authorIustin Pop <iustin@google.com>
Tue, 19 May 2009 11:23:31 +0000 (13:23 +0200)
committerIustin Pop <iustin@google.com>
Tue, 19 May 2009 11:28:41 +0000 (13:28 +0200)
commit7dfb83c28ac302753e9125afe0d8eb01222032d8
treeb1fb0f2203caa22100b989582dc8c062c190fe6f
parent88ae4f857ec1c5e7791c2da0094ba3038e6218a9
watcher: try to restart the master if down

Bugs in either our code or in associated libraries can bring the master daemon
down, and this (due to the 2.0 architecture) stops all work on the cluster.

Since the watcher already does periodic checks on the cluster, we modify
it to try to start the master automatically in case of failures to
connect. This will be tried only once per cycle.

Also, in this case, we modify the code so that the watcher status file
is not updated - its timestamp will reflect thus the time of last
successful connection to the master.

Side note: the except errors.ConfigurationError part could be cleaned
up, since in 2.0 we don't usually get that directly, and if we do it's
an error and we shouldn't touch the file anyway; but that is not a rc5
change.

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