summaryrefslogtreecommitdiffstats
path: root/ctdb
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2008-12-17 12:01:40 +1100
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2008-12-17 12:04:41 +1100
commit28bbe2f40799722a41f9ab0d603a6771cbe60d22 (patch)
tree26e97d7a9ca2129ffc591aadfe8bb0eda3080949 /ctdb
parentf844ca744a709f7f617795f0035052a48f0b397f (diff)
downloadsamba-28bbe2f40799722a41f9ab0d603a6771cbe60d22.tar.gz
samba-28bbe2f40799722a41f9ab0d603a6771cbe60d22.tar.xz
samba-28bbe2f40799722a41f9ab0d603a6771cbe60d22.zip
dont call ctdb_fatal() just because we are asked to restart a connection
to a remote node and ctdb->methods is NULL. This can happen when we are in the middle of a normal shutdown of the daemon and we have already shut down the transport layer (thus setting ctdb->methods == NULL in the transport layer destructor) band there is some unprocessed data related to a remote node. This prevents an ugly race condition where ctdb might sometimes (rare) cause a core dump during "ctdb shutdown". (This used to be ctdb commit fc4e8b5a5d3699221620a8d76701c8589f2b4ff1)
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/ctdb_server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctdb/server/ctdb_server.c b/ctdb/server/ctdb_server.c
index b41101d205..d9a32347ce 100644
--- a/ctdb/server/ctdb_server.c
+++ b/ctdb/server/ctdb_server.c
@@ -359,8 +359,8 @@ void ctdb_node_dead(struct ctdb_node *node)
ctdb_daemon_cancel_controls(node->ctdb, node);
if (node->ctdb->methods == NULL) {
- DEBUG(DEBUG_ALERT,(__location__ " Can not restart transport. ctdb->methods==NULL\n"));
- ctdb_fatal(node->ctdb, "can not restart transport.");
+ DEBUG(DEBUG_ERR,(__location__ " Can not restart transport while shutting down daemon.\n"));
+ return;
}
node->ctdb->methods->restart(node);