[SCM] CTDB repository - branch 1.0.112 updated - ctdb-1.0.111-77-g812f3dc
Ronnie Sahlberg
sahlberg at samba.org
Wed May 5 17:45:33 MDT 2010
The branch, 1.0.112 has been updated
via 812f3dcefa6ed844637450077f7ee69dc8d41954 (commit)
via e4889f2a8061174c6a5a60fc8ceeda91756bad08 (commit)
from 71d95eb96da248e9eb1097d2289c6deddb86df31 (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.0.112
- Log -----------------------------------------------------------------
commit 812f3dcefa6ed844637450077f7ee69dc8d41954
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Thu May 6 09:25:53 2010 +1000
When we perform a recovery. Make sure that the recmaster will sync the reclock file across the cluster.
This prevents issues such as when the recovery master is configured to NOT use a reclock file but other nodes are configured to use one.
BZ 62748
commit e4889f2a8061174c6a5a60fc8ceeda91756bad08
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Wed May 5 08:47:30 2010 +1000
Lower the debug level for the messages when a client registers/deregisters a server id
BZ63074
-----------------------------------------------------------------------
Summary of changes:
server/ctdb_daemon.c | 4 ++--
server/ctdb_recoverd.c | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/server/ctdb_daemon.c b/server/ctdb_daemon.c
index 1f7efee..4bedcc5 100644
--- a/server/ctdb_daemon.c
+++ b/server/ctdb_daemon.c
@@ -1125,7 +1125,7 @@ int32_t ctdb_control_register_notify(struct ctdb_context *ctdb, uint32_t client_
struct ctdb_client *client = ctdb_reqid_find(ctdb, client_id, struct ctdb_client);
struct ctdb_client_notify_list *nl;
- DEBUG(DEBUG_ERR,("Register srvid %llu for client %d\n", (unsigned long long)notify->srvid, client_id));
+ DEBUG(DEBUG_INFO,("Register srvid %llu for client %d\n", (unsigned long long)notify->srvid, client_id));
if (indata.dsize < offsetof(struct ctdb_client_notify_register, notify_data)) {
DEBUG(DEBUG_ERR,(__location__ " Too little data in control : %d\n", (int)indata.dsize));
@@ -1174,7 +1174,7 @@ int32_t ctdb_control_deregister_notify(struct ctdb_context *ctdb, uint32_t clien
struct ctdb_client *client = ctdb_reqid_find(ctdb, client_id, struct ctdb_client);
struct ctdb_client_notify_list *nl;
- DEBUG(DEBUG_ERR,("Deregister srvid %llu for client %d\n", (unsigned long long)notify->srvid, client_id));
+ DEBUG(DEBUG_INFO,("Deregister srvid %llu for client %d\n", (unsigned long long)notify->srvid, client_id));
if (client == NULL) {
DEBUG(DEBUG_ERR,(__location__ " Could not find client parent structure. You can not send this control to a remote node\n"));
diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c
index dd678cf..dfef716 100644
--- a/server/ctdb_recoverd.c
+++ b/server/ctdb_recoverd.c
@@ -1229,6 +1229,42 @@ static void reload_nodes_file(struct ctdb_context *ctdb)
ctdb_load_nodes_file(ctdb);
}
+
+/* when we start a recovery, make sure all nodes use the same reclock file
+ setting
+*/
+static int sync_recovery_lock_file_across_cluster(struct ctdb_recoverd *rec)
+{
+ struct ctdb_context *ctdb = rec->ctdb;
+ TALLOC_CTX *tmp_ctx = talloc_new(NULL);
+ TDB_DATA data;
+ uint32_t *nodes;
+
+ if (ctdb->recovery_lock_file == NULL) {
+ data.dptr = NULL;
+ data.dsize = 0;
+ } else {
+ data.dsize = strlen(ctdb->recovery_lock_file) + 1;
+ data.dptr = (uint8_t *)ctdb->recovery_lock_file;
+ }
+
+ nodes = list_of_active_nodes(ctdb, rec->nodemap, tmp_ctx, true);
+ if (ctdb_client_async_control(ctdb, CTDB_CONTROL_SET_RECLOCK_FILE,
+ nodes, 0,
+ CONTROL_TIMEOUT(),
+ false, data,
+ NULL, NULL,
+ rec) != 0) {
+ DEBUG(DEBUG_ERR, (__location__ " Failed to sync reclock file setting during recovery.\n"));
+ talloc_free(tmp_ctx);
+ return -1;
+ }
+
+ talloc_free(tmp_ctx);
+ return 0;
+}
+
+
/*
we are the recmaster, and recovery is needed - start a recovery run
@@ -1314,6 +1350,10 @@ static int do_recovery(struct ctdb_recoverd *rec,
}
DEBUG(DEBUG_NOTICE, (__location__ " Recovery - updated db priority for all databases\n"));
+ /* update all other nodes to use the same setting for reclock files
+ as the local recovery master.
+ */
+ sync_recovery_lock_file_across_cluster(rec);
/* set recovery mode to active on all nodes */
ret = set_recovery_mode(ctdb, rec, nodemap, CTDB_RECOVERY_ACTIVE);
--
CTDB repository
More information about the samba-cvs
mailing list