The branch, 1.0.112 has been updated via 3f403ff374915a831b02d2f072bc61cf1ba9e77a (commit) via cf65d8f35b67de8977ce884d8aab24c56513cd8b (commit) from 923398888bb839e22951a8dd21187bf3f343eb3d (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.0.112 - Log ----------------------------------------------------------------- commit 3f403ff374915a831b02d2f072bc61cf1ba9e77a Author: Ronnie Sahlberg <ronniesahlb...@gmail.com> Date: Wed Apr 21 15:42:00 2010 +1000 New version 1.0.112-15 * Wed Apr 21 2010 : Version 1.0.112-15 - Change how we add/remove iptable rules during recovery to make rules leaks less likey. - change a debug message loglevel from ERR to NOTICE BZ62086 - In the recovery daemon, track pulbic ip assignment across the cluster and verify consistency. - From Martins: change the 10.interface script to handle virtio interfaces correctly for virtual clusters. - Make the recovery master verify the reclock setting across the cluster and ban nodes with inconsistencies. BZ56354 commit cf65d8f35b67de8977ce884d8aab24c56513cd8b Author: Ronnie Sahlberg <ronniesahlb...@gmail.com> Date: Wed Apr 21 13:46:54 2010 +1000 Let the recovery master verify the reclock setting on all nodes in the cluster. Any node that is found to use a different filename from the first node will be banned. Nodes that have no reclock file at all configured are ignored in this check. BZ56354 ----------------------------------------------------------------------- Summary of changes: packaging/RPM/ctdb.spec.in | 14 ++++++++- server/ctdb_recoverd.c | 69 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in index 023551b..15d7a7b 100644 --- a/packaging/RPM/ctdb.spec.in +++ b/packaging/RPM/ctdb.spec.in @@ -5,7 +5,7 @@ Vendor: Samba Team Packager: Samba Team <sa...@samba.org> Name: ctdb Version: 1.0.112 -Release: 14 +Release: 15 Epoch: 0 License: GNU GPL version 3 Group: System Environment/Daemons @@ -123,6 +123,18 @@ rm -rf $RPM_BUILD_ROOT %{_docdir}/ctdb/tests/bin/ctdb_transaction %changelog +* Wed Apr 21 2010 : Version 1.0.112-15 + - Change how we add/remove iptable rules during recovery to make + rules leaks less likey. + - change a debug message loglevel from ERR to NOTICE + BZ62086 + - In the recovery daemon, track pulbic ip assignment + across the cluster and verify consistency. + - From Martins: change the 10.interface script to handle + virtio interfaces correctly for virtual clusters. + - Make the recovery master verify the reclock setting across the cluster + and ban nodes with inconsistencies. + BZ56354 * Mon Mar 29 2010 : Version 1.0.112-14 - Wipe the new serverid database before starting winbind * Wed Mar 25 2010 : Version 1.0.112-13 diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c index 68f744a..6ceb95e 100644 --- a/server/ctdb_recoverd.c +++ b/server/ctdb_recoverd.c @@ -64,6 +64,9 @@ struct ctdb_recoverd { TALLOC_CTX *ip_reallocate_ctx; struct ip_reallocate_list *reallocate_callers; TALLOC_CTX *ip_check_disable_ctx; + + const char *reclock_file_path; + uint32_t reclock_check_count; }; #define CONTROL_TIMEOUT() timeval_current_ofs(ctdb->tunable.recover_timeout, 0) @@ -1973,6 +1976,69 @@ static void election_handler(struct ctdb_context *ctdb, uint64_t srvid, } +static void async_reclock_path_callback(struct ctdb_context *ctdb, uint32_t node_pnn, int32_t res, TDB_DATA data, void *callback_data) +{ + struct ctdb_recoverd *rec = talloc_get_type(callback_data, struct ctdb_recoverd); + const char *name; + + if (data.dsize == 0) { + return; + } + + name = (char *)data.dptr; + + /* The first one we get is the one we will trust. Everyone which + uses a different file will get their ban count upped */ + if (rec->reclock_file_path == NULL) { + rec->reclock_file_path = talloc_strdup(rec, name); + return; + } + + if (!strcmp(rec->reclock_file_path, name)) { + return; + } + + DEBUG(DEBUG_CRIT,("ERROR: Node %u has inconsistent reclock file setting. Verify reclock settings on all nodes in the cluster.\n", node_pnn)); + ctdb_set_culprit_count(rec, node_pnn, rec->nodemap->num); +} + +static int verify_reclock_file_path(struct ctdb_recoverd *rec) +{ + uint32_t *nodes; + TALLOC_CTX *tmp_ctx; + struct ctdb_context *ctdb = rec->ctdb; + + /* only check once every 10 seconds */ + rec->reclock_check_count++; + if (rec->reclock_check_count < 10) { + return 0; + } + + rec->reclock_check_count = 0; + if (rec->reclock_file_path != NULL) { + talloc_free(discard_const(rec->reclock_file_path)); + rec->reclock_file_path = NULL; + } + + tmp_ctx = talloc_new(ctdb); + CTDB_NO_MEMORY(ctdb, tmp_ctx); + + nodes = list_of_active_nodes(ctdb, rec->nodemap, tmp_ctx, true); + if (ctdb_client_async_control(ctdb, CTDB_CONTROL_GET_RECLOCK_FILE, + nodes, 0, + CONTROL_TIMEOUT(), + false, tdb_null, + async_reclock_path_callback, NULL, + rec) != 0) { + DEBUG(DEBUG_ERR, (__location__ " Failed to verify reclock path settings.\n")); + talloc_free(tmp_ctx); + return -1; + } + + talloc_free(tmp_ctx); + return 0; +} + /* force the start of the election process */ @@ -2988,6 +3054,9 @@ again: } + /* ensure we all share the same setting for the reclock file */ + verify_reclock_file_path(rec); + /* ensure our local copies of flags are right */ ret = update_local_flags(rec, nodemap); if (ret == MONITOR_ELECTION_NEEDED) { -- CTDB repository