[SCM] CTDB repository - branch master updated - ctdb-1.0.105-3-g10a3680
Ronnie Sahlberg
sahlberg at samba.org
Tue Nov 24 14:04:55 MST 2009
The branch, master has been updated
via 10a3680fb3917ecafc824e73872eace321026172 (commit)
from fbc453733d53359b9eba34a7ca9123237a7ecca5 (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 10a3680fb3917ecafc824e73872eace321026172
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Wed Nov 25 08:03:42 2009 +1100
iIt is better to plainly disallow clietnts from connecting here
if the node is BANNED.
Dont even let them attach at all
to the database
Revert "temporarily try allowing clients to attach to databases even if
the node is banned/stopped or inactive in any other way."
This reverts commit 227fe99f105bdc3a4f1000f238cbe3adeb3f22f0.
-----------------------------------------------------------------------
Summary of changes:
server/ctdb_ltdb_server.c | 25 +++++++++++--------------
1 files changed, 11 insertions(+), 14 deletions(-)
Changeset truncated at 500 lines:
diff --git a/server/ctdb_ltdb_server.c b/server/ctdb_ltdb_server.c
index 1aa0f69..9a58c23 100644
--- a/server/ctdb_ltdb_server.c
+++ b/server/ctdb_ltdb_server.c
@@ -318,9 +318,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;
-#if 0
struct ctdb_node *node = ctdb->nodes[ctdb->pnn];
-#endif
/* the client can optionally pass additional tdb flags, but we
only allow a subset of those on the database in ctdb. Note
@@ -328,25 +326,24 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
srvid to the attach control */
tdb_flags &= TDB_NOSYNC;
- /* see if we already have this name */
- db = ctdb_db_handle(ctdb, db_name);
- if (db != NULL) {
- outdata->dptr = (uint8_t *)&db->db_id;
- outdata->dsize = sizeof(db->db_id);
- tdb_add_flags(db->ltdb->tdb, tdb_flags);
- return 0;
- }
-
-#if 0
/* If the node is inactive it is not part of the cluster
- and we should not allow clients to attach to any new
+ and we should not allow clients to attach to any
databases
*/
if (node->flags & NODE_FLAGS_INACTIVE) {
DEBUG(DEBUG_ERR,("DB Attach to database %s refused since node is inactive (disconnected or banned)\n", db_name));
return -1;
}
-#endif
+
+
+ /* see if we already have this name */
+ db = ctdb_db_handle(ctdb, db_name);
+ if (db) {
+ outdata->dptr = (uint8_t *)&db->db_id;
+ outdata->dsize = sizeof(db->db_id);
+ tdb_add_flags(db->ltdb->tdb, tdb_flags);
+ return 0;
+ }
if (ctdb_local_attach(ctdb, db_name, persistent) != 0) {
return -1;
--
CTDB repository
More information about the samba-cvs
mailing list