From: Amitay Isaacs Date: Thu, 23 Jun 2016 06:17:51 +0000 (+1000) Subject: s3-ctdb: Fail CTDB connection only on INACTIVE state X-Git-Tag: tdb-1.3.10~741 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22d1d7de22635b036671a155c30789344dd24a64;p=thirdparty%2Fsamba.git s3-ctdb: Fail CTDB connection only on INACTIVE state If the node has flag NODE_FLAGS_PERMANENTLY_DISABLED, then it is still working. Only avoid connections if node has any of the flags in NODE_FLAGS_INACTIVE. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Thu Jun 23 23:38:44 CEST 2016 on sn-devel-144 --- diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 6cb6814d6c9..8403b30896f 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -198,7 +198,6 @@ static bool ctdbd_working(struct ctdbd_connection *conn, uint32_t vnn) int32_t cstatus=-1; TDB_DATA outdata; struct ctdb_node_map_old *m; - uint32_t failure_flags; bool ok = false; uint32_t i; int ret; @@ -228,10 +227,7 @@ static bool ctdbd_working(struct ctdbd_connection *conn, uint32_t vnn) goto fail; } - failure_flags = NODE_FLAGS_BANNED | NODE_FLAGS_DISCONNECTED - | NODE_FLAGS_PERMANENTLY_DISABLED | NODE_FLAGS_STOPPED; - - if ((m->nodes[i].flags & failure_flags) != 0) { + if ((m->nodes[i].flags & NODE_FLAGS_INACTIVE) != 0) { DEBUG(2, ("Node has status %x, not active\n", (int)m->nodes[i].flags)); goto fail;