The branch, master has been updated via a0a0f5588445aeabe07b0e4d65087db454dc09da (commit) via 0e515115b3c21cb179fd7a6356164ac1b5d423e0 (commit) via 85a367005bd669309bb7e532b60d27621110180d (commit) via 1ebbaa620b3cfb9ff373828e4aaa84246cf3ec25 (commit) from 9a806dec8687e2ec08a308853b61af6aed5e5d1e (commit)
http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit a0a0f5588445aeabe07b0e4d65087db454dc09da Author: Michael Adam <ob...@samba.org> Date: Tue Jul 3 11:50:05 2012 +0200 run_tests: improve spacing commit 0e515115b3c21cb179fd7a6356164ac1b5d423e0 Author: Michael Adam <ob...@samba.org> Date: Tue Jul 3 11:46:26 2012 +0200 run_tests.sh: fix a comment commit 85a367005bd669309bb7e532b60d27621110180d Author: Michael Adam <ob...@samba.org> Date: Tue Jul 3 14:28:36 2012 +0200 ctdb: use correct "persistent" state for ctdb_attach in "ctdb cattdb" Originally, "ctdb cattdb" attached explicitly as non-persistent, which is now forbidden for persistent databases by the server. Pair-Programmed-With: Gregor Beck <gb...@sernet.de> commit 1ebbaa620b3cfb9ff373828e4aaa84246cf3ec25 Author: Gregor Beck <gb...@sernet.de> Date: Thu Jun 21 10:26:03 2012 +0200 ctdbd: refuse attaching with "persistent" to a non-persistent db and v.v. Signed-off-by: Michael Adam <ob...@samba.org> ----------------------------------------------------------------------- Summary of changes: server/ctdb_ltdb_server.c | 6 ++++++ tests/run_tests.sh | 2 +- tests/scripts/run_tests | 3 ++- tools/ctdb.c | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/server/ctdb_ltdb_server.c b/server/ctdb_ltdb_server.c index 0aa378b..00d5566 100644 --- a/server/ctdb_ltdb_server.c +++ b/server/ctdb_ltdb_server.c @@ -1116,6 +1116,12 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata, /* see if we already have this name */ db = ctdb_db_handle(ctdb, db_name); if (db) { + if (db->persistent != persistent) { + DEBUG(DEBUG_ERR, ("ERROR: DB Attach %spersistent to %spersistent " + "database %s", persistent ? "" : "non-", + db-> persistent ? "" : "non-", db_name)); + return -1; + } outdata->dptr = (uint8_t *)&db->db_id; outdata->dsize = sizeof(db->db_id); tdb_add_flags(db->ltdb->tdb, tdb_flags); diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 50924fc..4ab443f 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -31,7 +31,7 @@ case "$1" in done esac -# If no tests specified them run the defaults. +# If no tests are specified, then run the defaults. [ -n "$1" ] || set -- $tests "${test_dir}/scripts/run_tests" $opts "$@" || exit 1 diff --git a/tests/scripts/run_tests b/tests/scripts/run_tests index 2d34174..0d95774 100755 --- a/tests/scripts/run_tests +++ b/tests/scripts/run_tests @@ -234,7 +234,8 @@ fi rm -f "$sf" -echo +echo + if $TEST_CLEANUP ; then echo "Removing TEST_VAR_DIR=$TEST_VAR_DIR" rm -rf "$TEST_VAR_DIR" diff --git a/tools/ctdb.c b/tools/ctdb.c index b806d2b..8e960a1 100644 --- a/tools/ctdb.c +++ b/tools/ctdb.c @@ -3458,7 +3458,7 @@ static int control_cattdb(struct ctdb_context *ctdb, int argc, const char **argv return -1; } - ctdb_db = ctdb_attach(ctdb, TIMELIMIT(), db_name, false, 0); + ctdb_db = ctdb_attach(ctdb, TIMELIMIT(), db_name, persistent, 0); if (ctdb_db == NULL) { DEBUG(DEBUG_ERR,("Unable to attach to database '%s'\n", db_name)); -- CTDB repository