The branch, 1.2 has been updated via 8dd4273235538fc127bac4cc5a26595ba873649e (commit) via 1bb16681d8b6a356a1981c3de663e6dc23772d4b (commit) from 486ec95ae5852979d5f5a67f19e5d126136cc299 (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.2 - Log ----------------------------------------------------------------- commit 8dd4273235538fc127bac4cc5a26595ba873649e Author: Ronnie Sahlberg <ronniesahlb...@gmail.com> Date: Fri Feb 25 10:46:16 2011 +1100 new version 1.2.23 commit 1bb16681d8b6a356a1981c3de663e6dc23772d4b Author: Ronnie Sahlberg <ronniesahlb...@gmail.com> Date: Fri Feb 25 10:33:12 2011 +1100 ATTACH_DB: simplify the code slightly and change the semantics to only refuse a db attach during recovery IF we can associate the request from a genuine real client instead of deciding this on whether client_id is zero or This will suppress/avoid messages like these : DB Attach to database %s refused. Can not match clientid... ----------------------------------------------------------------------- Summary of changes: packaging/RPM/ctdb.spec.in | 5 ++++- server/ctdb_ltdb_server.c | 11 ++++------- 2 files changed, 8 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in index 4841844..ebf0fdd 100644 --- a/packaging/RPM/ctdb.spec.in +++ b/packaging/RPM/ctdb.spec.in @@ -3,7 +3,7 @@ Name: ctdb Summary: Clustered TDB Vendor: Samba Team Packager: Samba Team <sa...@samba.org> -Version: 1.2.22 +Version: 1.2.23 Release: 1GITHASH Epoch: 0 License: GNU GPL version 3 @@ -143,6 +143,9 @@ development libraries for ctdb %{_libdir}/libctdb.a %changelog +* Fri Feb 25 2011 : Version 1.2.23 + - Fix for "DB Attach to database %s refused. Can not match clientid.." + that was introduced in 1.2.22 * Wed Feb 23 2011 : Version 1.2.22 - Fix transaction errors that especially happened during startup. * Mon Feb 21 2011 : Version 1.2.21 diff --git a/server/ctdb_ltdb_server.c b/server/ctdb_ltdb_server.c index 3e90b2d..ad9b30f 100644 --- a/server/ctdb_ltdb_server.c +++ b/server/ctdb_ltdb_server.c @@ -805,6 +805,7 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata, const char *db_name = (const char *)indata.dptr; struct ctdb_db_context *db; struct ctdb_node *node = ctdb->nodes[ctdb->pnn]; + struct ctdb_client *client = NULL; /* dont allow any local clients to attach while we are in recovery mode * except for the recovery daemon. @@ -812,13 +813,9 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata, * recovery daemons. */ if (client_id != 0) { - struct ctdb_client *client = ctdb_reqid_find(ctdb, client_id, struct ctdb_client); - - if (client == NULL) { - DEBUG(DEBUG_ERR,("DB Attach to database %s refused. Can not match clientid:%d to a client structure.\n", db_name, client_id)); - return -1; - } - + client = ctdb_reqid_find(ctdb, client_id, struct ctdb_client); + } + if (client != NULL) { /* If the node is inactive it is not part of the cluster and we should not allow clients to attach to any databases -- CTDB repository