ctdb-daemon: Debugging for tickle updates
authorMartin Schwenke <martin@meltin.net>
Wed, 5 Mar 2014 05:21:45 +0000 (16:21 +1100)
committerAmitay Isaacs <amitay@samba.org>
Fri, 20 Jun 2014 00:07:48 +0000 (02:07 +0200)
This was useful for debugging the race fixed by commit
4f79fa6c7c843502fcdaa2dead534ea3719b9f69.  It might be useful again.

Also fix a nearby comment typo.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Jun 20 02:07:48 CEST 2014 on sn-devel-104

ctdb/server/ctdb_takeover.c

index 6c21e2bb6ad25b0be157fb8433178172dce33d6a..8449288d36bf67a216090aaa566a385cb0c23478 100644 (file)
@@ -3230,7 +3230,7 @@ int32_t ctdb_control_tcp_remove(struct ctdb_context *ctdb, TDB_DATA indata)
 
 
 /*
-  Called when another daemon starts - caises all tickles for all
+  Called when another daemon starts - causes all tickles for all
   public addresses we are serving to be sent to the new node on the
   next check.  This actually causes the next scheduled call to
   tdb_update_tcp_tickles() to update all nodes.  This is simple and
@@ -3240,6 +3240,9 @@ int32_t ctdb_control_startup(struct ctdb_context *ctdb, uint32_t pnn)
 {
        struct ctdb_vnn *vnn;
 
+       DEBUG(DEBUG_INFO, ("Received startup control from node %lu\n",
+                          (unsigned long) pnn));
+
        for (vnn = ctdb->vnn; vnn != NULL; vnn = vnn->next) {
                vnn->tcp_update_needed = true;
        }
@@ -3908,6 +3911,9 @@ int32_t ctdb_control_set_tcp_tickle_list(struct ctdb_context *ctdb, TDB_DATA ind
                return -1;
        }
 
+       DEBUG(DEBUG_INFO, ("Received tickle update for public address %s\n",
+                          ctdb_addr_to_str(&list->addr)));
+
        vnn = find_public_ip_vnn(ctdb, &list->addr);
        if (vnn == NULL) {
                DEBUG(DEBUG_INFO,(__location__ " Could not set tcp tickle list, '%s' is not a public address\n",
@@ -4056,6 +4062,9 @@ static void ctdb_update_tcp_tickles(struct event_context *ev,
                        DEBUG(DEBUG_ERR,("Failed to send the tickle update for public address %s\n",
                                ctdb_addr_to_str(&vnn->public_address)));
                } else {
+                       DEBUG(DEBUG_INFO,
+                             ("Sent tickle update for public address %s\n",
+                              ctdb_addr_to_str(&vnn->public_address)));
                        vnn->tcp_update_needed = false;
                }
        }