From d32cb1c0786ee0af5455aeb5088ffa2d85f25bba Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Wed, 29 Jun 2011 15:01:16 +0200 Subject: [PATCH] s3:smbd do not panic when CTDB is unhealthy (Bug #8278) when CTDB is unhealthy, log a message and exit cleanly instead of creating a core file --- source3/smbd/server.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 5aa3ddb..8ee7c55 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -443,6 +443,15 @@ static void smbd_accept_connection(struct tevent_context *ev, "because too many files are open\n")); goto exit; } +#ifdef CLUSTER_SUPPORT + if (NT_STATUS_EQUAL(status, + NT_STATUS_INTERNAL_DB_ERROR)) { + DEBUG(1,("child process cannot initialize " + "because connection to CTDB " + "has failed\n")); + goto exit; + } +#endif DEBUG(0,("reinit_after_fork() failed\n")); smb_panic("reinit_after_fork() failed"); } -- 1.7.4.4