1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-22 02:50:28 +03:00

ctdb-daemon: Debugging for tickle updates

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
This commit is contained in:
Martin Schwenke 2014-03-05 16:21:45 +11:00 committed by Amitay Isaacs
parent 6a552f1a12
commit 6f43896e12

View 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;
}
}