[SCM] CTDB repository - branch master updated - ctdb-2.3-60-g7b7aa7b
Amitay Isaacs
amitay at samba.org
Mon Aug 19 01:16:10 MDT 2013
The branch, master has been updated
via 7b7aa7b599536cd60ebb84d363607bb4e953248a (commit)
via 1c9025fdd08d1cea342af7487d0123015e08831b (commit)
via f0853013655ac3bedf1b793de128fb679c6db6c6 (commit)
via a610bc351f0754c84c78c27d02f9a695e60c5b0f (commit)
via 60cb40d090e45ff6134c098a238fac7ad854f134 (commit)
from e9ef93f7b6dad59eabaa32124df81f3e74c651ef (commit)
http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 7b7aa7b599536cd60ebb84d363607bb4e953248a
Author: Amitay Isaacs <amitay at gmail.com>
Date: Wed Aug 14 11:44:12 2013 +1000
recoverd: Improve log message when nodes disagree on recmaster
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
commit 1c9025fdd08d1cea342af7487d0123015e08831b
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Aug 2 11:05:08 2013 +1000
common: Null terminate process name string so valgrind doesn't complain
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
commit f0853013655ac3bedf1b793de128fb679c6db6c6
Author: Amitay Isaacs <amitay at gmail.com>
Date: Mon Aug 12 15:50:30 2013 +1000
vacuuming: Fix vacuuming bug where requests keep bouncing between nodes (part 2)
This is caused by corruption of a record header such that the records
on two nodes point to each other as dmaster. This makes a request for
that record bounce between nodes endlessly.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
commit a610bc351f0754c84c78c27d02f9a695e60c5b0f
Author: Amitay Isaacs <amitay at gmail.com>
Date: Mon Aug 12 15:51:00 2013 +1000
vacuuming: Fix vacuuming bug where requests keep bouncing between nodes (part 1)
This is caused by corruption of a record header such that the records
on two nodes point to each other as dmaster. This makes a request for
that record bounce between nodes endlessly.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
commit 60cb40d090e45ff6134c098a238fac7ad854f134
Author: Amitay Isaacs <amitay at gmail.com>
Date: Tue Aug 6 14:37:13 2013 +1000
db_wrap: Make sure tdb messages are logged correctly
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
-----------------------------------------------------------------------
Summary of changes:
common/system_linux.c | 1 +
lib/util/db_wrap.c | 1 +
server/ctdb_recover.c | 42 +++++++++++++++++++++---------------------
server/ctdb_recoverd.c | 2 +-
4 files changed, 24 insertions(+), 22 deletions(-)
Changeset truncated at 500 lines:
diff --git a/common/system_linux.c b/common/system_linux.c
index ab232f0..84daba4 100644
--- a/common/system_linux.c
+++ b/common/system_linux.c
@@ -606,6 +606,7 @@ int ctdb_set_process_name(const char *name)
char procname[16];
strncpy(procname, name, 15);
+ procname[15] = '\0';
return prctl(PR_SET_NAME, (unsigned long)procname, 0, 0, 0);
}
diff --git a/lib/util/db_wrap.c b/lib/util/db_wrap.c
index 07b066c..1b2bf7e 100644
--- a/lib/util/db_wrap.c
+++ b/lib/util/db_wrap.c
@@ -47,6 +47,7 @@ static void log_fn(struct tdb_context *tdb, enum tdb_debug_level level, const ch
{
if (level <= TDB_DEBUG_ERROR) {
va_list ap;
+ this_log_level = level;
char newfmt[strlen(tdb_name(tdb)) + 1 + strlen(fmt) + 1];
sprintf(newfmt, "%s:%s", tdb_name(tdb), fmt);
va_start(ap, fmt);
diff --git a/server/ctdb_recover.c b/server/ctdb_recover.c
index 0bec03e..1cbcc59 100644
--- a/server/ctdb_recover.c
+++ b/server/ctdb_recover.c
@@ -785,7 +785,7 @@ bool ctdb_recovery_lock(struct ctdb_context *ctdb, bool keep)
*/
static int delete_tdb_record(struct ctdb_context *ctdb, struct ctdb_db_context *ctdb_db, struct ctdb_rec_data *rec)
{
- TDB_DATA key, data;
+ TDB_DATA key, data, data2;
struct ctdb_ltdb_header *hdr, *hdr2;
/* these are really internal tdb functions - but we need them here for
@@ -816,13 +816,13 @@ static int delete_tdb_record(struct ctdb_context *ctdb, struct ctdb_db_context *
return -1;
}
- data = tdb_fetch(ctdb_db->ltdb->tdb, key);
- if (data.dptr == NULL) {
+ data2 = tdb_fetch(ctdb_db->ltdb->tdb, key);
+ if (data2.dptr == NULL) {
tdb_chainunlock(ctdb_db->ltdb->tdb, key);
return 0;
}
- if (data.dsize < sizeof(struct ctdb_ltdb_header)) {
+ if (data2.dsize < sizeof(struct ctdb_ltdb_header)) {
if (tdb_lock_nonblock(ctdb_db->ltdb->tdb, -1, F_WRLCK) == 0) {
if (tdb_delete(ctdb_db->ltdb->tdb, key) != 0) {
DEBUG(DEBUG_CRIT,(__location__ " Failed to delete corrupt record\n"));
@@ -831,59 +831,59 @@ static int delete_tdb_record(struct ctdb_context *ctdb, struct ctdb_db_context *
DEBUG(DEBUG_CRIT,(__location__ " Deleted corrupt record\n"));
}
tdb_chainunlock(ctdb_db->ltdb->tdb, key);
- free(data.dptr);
+ free(data2.dptr);
return 0;
}
- hdr2 = (struct ctdb_ltdb_header *)data.dptr;
+ hdr2 = (struct ctdb_ltdb_header *)data2.dptr;
if (hdr2->rsn > hdr->rsn) {
tdb_chainunlock(ctdb_db->ltdb->tdb, key);
DEBUG(DEBUG_INFO,(__location__ " Skipping record with rsn=%llu - called with rsn=%llu\n",
(unsigned long long)hdr2->rsn, (unsigned long long)hdr->rsn));
- free(data.dptr);
- return -1;
+ free(data2.dptr);
+ return -1;
}
/* do not allow deleting record that have readonly flags set. */
if (hdr->flags & CTDB_REC_RO_FLAGS) {
tdb_chainunlock(ctdb_db->ltdb->tdb, key);
DEBUG(DEBUG_INFO,(__location__ " Skipping record with readonly flags set\n"));
- free(data.dptr);
- return -1;
+ free(data2.dptr);
+ return -1;
}
if (hdr2->flags & CTDB_REC_RO_FLAGS) {
tdb_chainunlock(ctdb_db->ltdb->tdb, key);
DEBUG(DEBUG_INFO,(__location__ " Skipping record with readonly flags set\n"));
- free(data.dptr);
- return -1;
+ free(data2.dptr);
+ return -1;
}
if (hdr2->dmaster == ctdb->pnn) {
tdb_chainunlock(ctdb_db->ltdb->tdb, key);
DEBUG(DEBUG_INFO,(__location__ " Attempted delete record where we are the dmaster\n"));
- free(data.dptr);
- return -1;
+ free(data2.dptr);
+ return -1;
}
if (tdb_lock_nonblock(ctdb_db->ltdb->tdb, -1, F_WRLCK) != 0) {
tdb_chainunlock(ctdb_db->ltdb->tdb, key);
- free(data.dptr);
- return -1;
+ free(data2.dptr);
+ return -1;
}
if (tdb_delete(ctdb_db->ltdb->tdb, key) != 0) {
tdb_unlock(ctdb_db->ltdb->tdb, -1, F_WRLCK);
tdb_chainunlock(ctdb_db->ltdb->tdb, key);
DEBUG(DEBUG_INFO,(__location__ " Failed to delete record\n"));
- free(data.dptr);
- return -1;
+ free(data2.dptr);
+ return -1;
}
tdb_unlock(ctdb_db->ltdb->tdb, -1, F_WRLCK);
tdb_chainunlock(ctdb_db->ltdb->tdb, key);
- free(data.dptr);
- return 0;
+ free(data2.dptr);
+ return 0;
}
@@ -1153,7 +1153,7 @@ static int store_tdb_record(struct ctdb_context *ctdb,
goto done;
}
- hdr2 = (struct ctdb_ltdb_header *)data.dptr;
+ hdr2 = (struct ctdb_ltdb_header *)data2.dptr;
if (hdr2->rsn > hdr->rsn) {
DEBUG(DEBUG_INFO, (__location__ " Skipping record with "
diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c
index a1513ee..d35a786 100644
--- a/server/ctdb_recoverd.c
+++ b/server/ctdb_recoverd.c
@@ -2823,7 +2823,7 @@ static void verify_recmaster_callback(struct ctdb_client_control_state *state)
status field
*/
if (state->status != rmdata->pnn) {
- DEBUG(DEBUG_ERR,("Node %d does not agree we are the recmaster. Need a new recmaster election\n", state->c->hdr.destnode));
+ DEBUG(DEBUG_ERR,("Node %d thinks node %d is recmaster. Need a new recmaster election\n", state->c->hdr.destnode, state->status));
ctdb_set_culprit(rmdata->rec, state->c->hdr.destnode);
rmdata->status = MONITOR_ELECTION_NEEDED;
}
--
CTDB repository
More information about the samba-cvs
mailing list