diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-11-23 14:38:03 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-12-16 08:03:55 +0100 |
commit | b48228e7f9c76a9bd7a624280c1c3367fa9e9836 (patch) | |
tree | 0ac8007fe177111abaef70107374244f1ddf9cc2 /ctdb/server/ctdbd.c | |
parent | cda5884854f38b2eecbb0352c2b2316507a54b32 (diff) | |
download | samba-b48228e7f9c76a9bd7a624280c1c3367fa9e9836.tar.gz samba-b48228e7f9c76a9bd7a624280c1c3367fa9e9836.tar.xz samba-b48228e7f9c76a9bd7a624280c1c3367fa9e9836.zip |
server: add db_directory_state to ctdb_context
metze
(This used to be ctdb commit 656a6ec5ed81ccfbb86144156a3158e48f105ee4)
Diffstat (limited to 'ctdb/server/ctdbd.c')
-rw-r--r-- | ctdb/server/ctdbd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c index 8647aad1892..7cffde09eec 100644 --- a/ctdb/server/ctdbd.c +++ b/ctdb/server/ctdbd.c @@ -38,6 +38,7 @@ static struct { const char *recovery_lock_file; const char *db_dir; const char *db_dir_persistent; + const char *db_dir_state; const char *public_interface; const char *single_public_ip; const char *node_ip; @@ -57,6 +58,7 @@ static struct { .logfile = LOGDIR "/log.ctdb", .db_dir = VARDIR "/ctdb", .db_dir_persistent = VARDIR "/ctdb/persistent", + .db_dir_state = VARDIR "/ctdb/state", .script_log_level = DEBUG_ERR, }; @@ -126,6 +128,7 @@ int main(int argc, const char *argv[]) { "transport", 0, POPT_ARG_STRING, &options.transport, 0, "protocol transport", NULL }, { "dbdir", 0, POPT_ARG_STRING, &options.db_dir, 0, "directory for the tdb files", NULL }, { "dbdir-persistent", 0, POPT_ARG_STRING, &options.db_dir_persistent, 0, "directory for persistent tdb files", NULL }, + { "dbdir-state", 0, POPT_ARG_STRING, &options.db_dir_state, 0, "directory for internal state tdb files", NULL }, { "reclock", 0, POPT_ARG_STRING, &options.recovery_lock_file, 0, "location of recovery lock file", "filename" }, { "nosetsched", 0, POPT_ARG_NONE, &options.no_setsched, 0, "disable setscheduler SCHED_FIFO call", NULL }, { "syslog", 0, POPT_ARG_NONE, &options.use_syslog, 0, "log messages to syslog", NULL }, @@ -259,6 +262,13 @@ int main(int argc, const char *argv[]) exit(1); } } + if (options.db_dir_state) { + ret = ctdb_set_tdb_dir_state(ctdb, options.db_dir_state); + if (ret == -1) { + DEBUG(DEBUG_ALERT,("ctdb_set_tdb_dir_state failed - %s\n", ctdb_errstr(ctdb))); + exit(1); + } + } if (options.public_interface) { ctdb->default_public_interface = talloc_strdup(ctdb, options.public_interface); |