From 6c93bf5a1219617bfb39b093aee3200c74c2c61a Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 25 Aug 2010 08:34:35 +1000 Subject: [PATCH 1/1] run the "init" event before we freeze the databases so that we can read from databases during this event --- server/ctdb_daemon.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/ctdb_daemon.c b/server/ctdb_daemon.c index 1d803058..5d73b0d5 100644 --- a/server/ctdb_daemon.c +++ b/server/ctdb_daemon.c @@ -810,17 +810,17 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog) ctdb_fatal(ctdb, "Failed to attach to databases\n"); } - /* start frozen, then let the first election sort things out */ - if (ctdb_blocking_freeze(ctdb)) { - ctdb_fatal(ctdb, "Failed to get initial freeze\n"); - } - ret = ctdb_event_script(ctdb, CTDB_EVENT_INIT); if (ret != 0) { ctdb_fatal(ctdb, "Failed to run init event\n"); } ctdb_run_notification_script(ctdb, "init"); + /* start frozen, then let the first election sort things out */ + if (ctdb_blocking_freeze(ctdb)) { + ctdb_fatal(ctdb, "Failed to get initial freeze\n"); + } + /* now start accepting clients, only can do this once frozen */ fde = event_add_fd(ctdb->ev, ctdb, ctdb->daemon.sd, EVENT_FD_READ, -- 2.34.1