Rev 733: merge from ronnie in http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Mon Jan 7 05:17:22 GMT 2008
------------------------------------------------------------
revno: 733
revision-id:tridge at samba.org-20080107051722-8799qg1wnc29bmlp
parent: tridge at samba.org-20080107033113-gxx0sust2ixm5823
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge.stable
timestamp: Mon 2008-01-07 16:17:22 +1100
message:
merge from ronnie
modified:
include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
=== modified file 'include/ctdb_private.h'
--- a/include/ctdb_private.h 2008-01-06 02:24:55 +0000
+++ b/include/ctdb_private.h 2008-01-07 05:17:22 +0000
@@ -366,6 +366,7 @@
struct _trbt_tree_t *server_ids;
const char *event_script_dir;
const char *default_public_interface;
+ pid_t ctdbd_pid;
pid_t recoverd_pid;
bool done_startup;
const char *node_ip;
=== modified file 'server/ctdb_recoverd.c'
--- a/server/ctdb_recoverd.c 2008-01-07 03:08:25 +0000
+++ b/server/ctdb_recoverd.c 2008-01-07 05:17:22 +0000
@@ -1821,6 +1821,12 @@
/* we only check for recovery once every second */
ctdb_wait_timeout(ctdb, ctdb->tunable.recover_interval);
+ /* verify that the main daemon is still running */
+ if (kill(ctdb->ctdbd_pid, 0) != 0) {
+ DEBUG(0,("CTDB daemon is no longer available. Shutting down recovery daemon\n"));
+ exit(-1);
+ }
+
if (rec->election_timeout) {
/* an election is in progress */
goto again;
@@ -2275,6 +2281,8 @@
return -1;
}
+ ctdb->ctdbd_pid = getpid();
+
ctdb->recoverd_pid = fork();
if (ctdb->recoverd_pid == -1) {
return -1;
More information about the samba-cvs
mailing list