The branch, master has been updated
       via  13e2c9044950f21918e4610726e73ed3d8f76920 (commit)
       via  018f8b0b1823ef59b46f1a671aec5309d10628f4 (commit)
      from  33b296cee177adc61edc911caec8c24b3efa8441 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 13e2c9044950f21918e4610726e73ed3d8f76920
Author: Ronnie Sahlberg <[email protected]>
Date:   Mon Apr 6 14:03:09 2009 +1000

    we only need to switch into client mode from the eventscript child if we 
are running the monitor event

commit 018f8b0b1823ef59b46f1a671aec5309d10628f4
Author: Ronnie Sahlberg <[email protected]>
Date:   Mon Apr 6 14:00:41 2009 +1000

    increase the listen queue. Now that the eventscripts may become clients and 
connect back to the server we do get a lot more concurrent connection attempts 
(takepip/teleaseip are performed in parallell)

-----------------------------------------------------------------------

Summary of changes:
 server/ctdb_daemon.c |    2 +-
 server/eventscript.c |   19 ++++++++++---------
 2 files changed, 11 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_daemon.c b/server/ctdb_daemon.c
index 0aaab23..e730d76 100644
--- a/server/ctdb_daemon.c
+++ b/server/ctdb_daemon.c
@@ -582,7 +582,7 @@ static int ux_socket_bind(struct ctdb_context *ctdb)
        } 
 
 
-       if (listen(ctdb->daemon.sd, 10) != 0) {
+       if (listen(ctdb->daemon.sd, 100) != 0) {
                DEBUG(DEBUG_CRIT,("Unable to listen on ctdb socket '%s'\n", 
ctdb->daemon.name));
                goto failed;
        }
diff --git a/server/eventscript.c b/server/eventscript.c
index 246426a..a30ac3f 100644
--- a/server/eventscript.c
+++ b/server/eventscript.c
@@ -299,19 +299,20 @@ static int ctdb_event_script_v(struct ctdb_context *ctdb, 
const char *options)
        int count;
        int is_monitor = 0;
 
-       /* This is running in the forked child process. At this stage
-        * we want to switch from being a ctdb daemon into being a client
-        * and connect to the local daemon.
-        */
-       if (switch_from_server_to_client(ctdb) != 0) {
-               DEBUG(DEBUG_CRIT, (__location__ "ERROR: failed to switch 
eventscript child into client mode. shutting down.\n"));
-               _exit(1);
-       }
-
        if (!strcmp(options, "monitor")) {
                is_monitor = 1;
        }
+
        if (is_monitor == 1) {
+               /* This is running in the forked child process. At this stage
+                * we want to switch from being a ctdb daemon into being a
+                * client and connect to the real local daemon.
+                */
+               if (switch_from_server_to_client(ctdb) != 0) {
+                       DEBUG(DEBUG_CRIT, (__location__ "ERROR: failed to 
switch eventscript child into client mode. shutting down.\n"));
+                       _exit(1);
+               }
+
                if (ctdb_ctrl_event_script_init(ctdb) != 0) {
                        DEBUG(DEBUG_ERR,(__location__ " Failed to init event 
script monitoring\n"));
                        talloc_free(tmp_ctx);


-- 
CTDB repository

Reply via email to