mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
we need to listen at transport initialise stage to find our own node number
(This used to be ctdb commit 4a9455dfbe95e53884b46ad26dba0c33e3432ba9)
This commit is contained in:
parent
3c062bb5ae
commit
c833b06a35
@ -64,13 +64,14 @@ static void ctdb_check_for_dead_nodes(struct event_context *ev, struct timed_eve
|
||||
|
||||
if (node->dead_count >= CTDB_MONITORING_DEAD_COUNT) {
|
||||
ctdb_node_dead(node);
|
||||
ctdb_send_keepalive(ctdb, node->vnn);
|
||||
/* maybe tell the transport layer to kill the
|
||||
sockets as well?
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
|
||||
if (node->tx_cnt == 0) {
|
||||
if (node->tx_cnt == 0 && (node->flags & NODE_FLAGS_CONNECTED)) {
|
||||
ctdb_send_keepalive(ctdb, node->vnn);
|
||||
}
|
||||
|
||||
|
@ -88,6 +88,10 @@ static int ctdb_ibw_initialise(struct ctdb_context *ctdb)
|
||||
}
|
||||
}
|
||||
|
||||
/* listen on our own address */
|
||||
if (ctdb_ibw_listen(ctdb, 10)) /* TODO: backlog as param */
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -99,10 +103,6 @@ static int ctdb_ibw_start(struct ctdb_context *ctdb)
|
||||
{
|
||||
int i, ret;
|
||||
|
||||
/* listen on our own address */
|
||||
if (ctdb_ibw_listen(ctdb, 10)) /* TODO: backlog as param */
|
||||
return -1;
|
||||
|
||||
/* everything async here */
|
||||
for (i=0;i<ctdb->num_nodes;i++) {
|
||||
struct ctdb_node *node = ctdb->nodes[i];
|
||||
|
@ -52,6 +52,9 @@ static int ctdb_tcp_initialise(struct ctdb_context *ctdb)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* listen on our own address */
|
||||
if (ctdb_tcp_listen(ctdb) != 0) return -1;
|
||||
|
||||
for (i=0; i<ctdb->num_nodes; i++) {
|
||||
if (ctdb_tcp_add_node(ctdb->nodes[i]) != 0) {
|
||||
DEBUG(0, ("methods->add_node failed at %d\n", i));
|
||||
@ -69,9 +72,6 @@ static int ctdb_tcp_start(struct ctdb_context *ctdb)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* listen on our own address */
|
||||
if (ctdb_tcp_listen(ctdb) != 0) return -1;
|
||||
|
||||
/* startup connections to the other servers - will happen on
|
||||
next event loop */
|
||||
for (i=0;i<ctdb->num_nodes;i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user