------------------------------------------------------------ revno: 575 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell <[EMAIL PROTECTED]> branch nick: tridge timestamp: Fri 2007-07-13 08:47:02 +1000 message: added --nosetsched option to ctdbd modified: config/functions functions-20070601105405-gajwirydr5a9zd6x-1 include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13 server/ctdb_daemon.c ctdb_daemon.c-20070409200331-3el1kqgdb9m4ib0g-1 server/ctdbd.c ctdbd.c-20070411085044-dqmhr6mfeexnyt4m-1 server/eventscript.c eventscript.c-20070704074533-95f10rsay8um8wrr-1 === modified file 'config/functions' --- a/config/functions 2007-06-17 02:05:29 +0000 +++ b/config/functions 2007-07-12 22:47:02 +0000 @@ -43,6 +43,7 @@ echo "ctdb daemon has died. Exiting wait for $service_name" exit 1 } + [ $all_ok -eq 1 ] || sleep 1 done echo "`/bin/date` Local service $service_name is up" }
=== modified file 'include/ctdb_private.h' --- a/include/ctdb_private.h 2007-07-10 05:29:31 +0000 +++ b/include/ctdb_private.h 2007-07-12 22:47:02 +0000 @@ -307,6 +307,7 @@ struct ctdb_takeover takeover; struct ctdb_tcp_list *tcp_list; struct ctdb_client_ip *client_ip_list; + bool do_setsched; }; struct ctdb_db_context { === modified file 'server/ctdb_daemon.c' --- a/server/ctdb_daemon.c 2007-07-10 05:29:31 +0000 +++ b/server/ctdb_daemon.c 2007-07-12 22:47:02 +0000 @@ -644,8 +644,10 @@ } block_signal(SIGPIPE); - /* try to set us up as realtime */ - ctdb_set_realtime(true); + if (ctdb->do_setsched) { + /* try to set us up as realtime */ + ctdb_set_realtime(true); + } /* ensure the socket is deleted on exit of the daemon */ domain_socket_name = talloc_strdup(talloc_autofree_context(), ctdb->daemon.name); === modified file 'server/ctdbd.c' --- a/server/ctdbd.c 2007-07-10 05:29:31 +0000 +++ b/server/ctdbd.c 2007-07-12 22:47:02 +0000 @@ -47,6 +47,7 @@ const char *logfile; const char *recovery_lock_file; const char *db_dir; + int no_setsched; } options = { .nlist = ETCDIR "/ctdb/nodes", .transport = "tcp", @@ -108,6 +109,7 @@ { "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 }, { "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 }, POPT_TABLEEND }; int opt, ret; @@ -224,6 +226,8 @@ talloc_free(name); } + ctdb->do_setsched = !!options.no_setsched; + /* start the protocol running (as a child) */ return ctdb_start_daemon(ctdb, interactive?False:True); } === modified file 'server/eventscript.c' --- a/server/eventscript.c 2007-07-10 05:29:31 +0000 +++ b/server/eventscript.c 2007-07-12 22:47:02 +0000 @@ -166,7 +166,9 @@ if (state->child == 0) { close(state->fd[0]); - ctdb_set_realtime(false); + if (ctdb->do_setsched) { + ctdb_set_realtime(false); + } set_close_on_exec(state->fd[1]); va_start(ap, fmt); ret = ctdb_event_script_v(ctdb, fmt, ap);