mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
delay loading the public ip address file until after we have started the transport and discovered ouw own pnn number
(This used to be ctdb commit 1b57fc866fc836b5dbd3ef7b646e5a0f4280e81e)
This commit is contained in:
parent
6fa8e1fddb
commit
83e68b62dd
@ -105,7 +105,7 @@ int ctdb_ip_to_nodeid(struct ctdb_context *ctdb, const char *nodeip);
|
||||
start the ctdb protocol
|
||||
*/
|
||||
int ctdb_start(struct ctdb_context *ctdb);
|
||||
int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog);
|
||||
int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog, const char *public_address_list);
|
||||
|
||||
/*
|
||||
attach to a ctdb database
|
||||
|
@ -704,7 +704,7 @@ static void ctdb_setup_event_callback(struct ctdb_context *ctdb, int status,
|
||||
/*
|
||||
start the protocol going as a daemon
|
||||
*/
|
||||
int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog)
|
||||
int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog, const char *public_address_list)
|
||||
{
|
||||
int res, ret = -1;
|
||||
struct fd_event *fde;
|
||||
@ -791,6 +791,14 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog)
|
||||
if (ctdb->methods->initialise(ctdb) != 0) {
|
||||
ctdb_fatal(ctdb, "transport failed to initialise");
|
||||
}
|
||||
if (public_address_list) {
|
||||
ret = ctdb_set_public_addresses(ctdb, public_address_list);
|
||||
if (ret == -1) {
|
||||
DEBUG(DEBUG_ALERT,("Unable to setup public address list\n"));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* attach to existing databases */
|
||||
if (ctdb_attach_databases(ctdb) != 0) {
|
||||
|
@ -300,14 +300,6 @@ int main(int argc, const char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (options.public_address_list) {
|
||||
ret = ctdb_set_public_addresses(ctdb, options.public_address_list);
|
||||
if (ret == -1) {
|
||||
DEBUG(DEBUG_ALERT,("Unable to setup public address list\n"));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
ret = ctdb_set_event_script_dir(ctdb, options.event_script_dir);
|
||||
if (ret == -1) {
|
||||
DEBUG(DEBUG_ALERT,("Unable to setup event script directory\n"));
|
||||
@ -337,5 +329,5 @@ int main(int argc, const char *argv[])
|
||||
}
|
||||
|
||||
/* start the protocol running (as a child) */
|
||||
return ctdb_start_daemon(ctdb, interactive?False:True, options.use_syslog);
|
||||
return ctdb_start_daemon(ctdb, interactive?False:True, options.use_syslog, options.public_address_list);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user