[PATCH] add a new error code when no ctdb after fork
Volker Lendecke
Volker.Lendecke at SerNet.DE
Mon Jun 6 09:33:40 UTC 2016
Hi, Peter!
On Fri, Jun 03, 2016 at 09:05:43AM +0000, Peter Somogyi wrote:
> Please accept this trivial patch - based on an error inject test when ctdb
> being killed.
Thanks for the patch. I've slightly modified the indentation, and I
added the return code to the DEBUG. Assuming you're okay with that,
I've added my Reviewed-By. Another team review?
Thanks, Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
SerNet & BSI laden ein: 29. Juni 2016,
2. IT-Grundschutztag 2016, BPA Berlin.
Anmeldung: https://www.sernet.de/gstag
-------------- next part --------------
From 1fb185ab3a59602f53591f4d9be753f428303782 Mon Sep 17 00:00:00 2001
From: Peter Somogyi <psomogyi at hu.ibm.com>
Date: Wed, 1 Jun 2016 18:30:08 +0200
Subject: [PATCH] Add yet another error code when forking an smbd and ctdb is
not there. We can see NT_STATUS_CONNECTION_REFUSED in the logs upon such a
rare case.
Signed-off-by: Peter Somogyi <psomogyi at hu.ibm.com>
Reviewed-by: Volker Lendecke <vl at samba.org>
---
source3/smbd/server.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 82e686e..24acc04 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -747,11 +747,14 @@ static void smbd_accept_connection(struct tevent_context *ev,
goto exit;
}
if (lp_clustering() &&
- NT_STATUS_EQUAL(status,
- NT_STATUS_INTERNAL_DB_ERROR)) {
- DEBUG(1,("child process cannot initialize "
- "because connection to CTDB "
- "has failed\n"));
+ (NT_STATUS_EQUAL(
+ status, NT_STATUS_INTERNAL_DB_ERROR) ||
+ NT_STATUS_EQUAL(
+ status, NT_STATUS_CONNECTION_REFUSED))) {
+ DEBUG(1, ("child process cannot initialize "
+ "because connection to CTDB "
+ "has failed: %s\n",
+ nt_errstr(status)));
goto exit;
}
--
2.1.4
More information about the samba-technical
mailing list