Stefan Metzmacher [Tue, 19 Jan 2010 09:07:14 +0000 (10:07 +0100)]
server: add "init" event
This is needed because the "startup" event runs after the initial recovery,
but we need to do some actions before the initial recovery.
metze
(This used to be ctdb commit
e953808449c102258abb6cba6f4abf486dda3b82)
Stefan Metzmacher [Thu, 7 Jan 2010 08:21:56 +0000 (09:21 +0100)]
server: setup fault handler to get the build-in backtrace support
The panic action feature will be added later.
metze
(This used to be ctdb commit
37d11895e96ba8bc8c9ba159083970c45f76d9bb)
Stefan Metzmacher [Tue, 12 Jan 2010 11:17:00 +0000 (12:17 +0100)]
lib/util: add pre and post panic action hooks
metze
(This used to be ctdb commit
e366e77ba170d2c27110c56004ae1adf97abef9e)
Stefan Metzmacher [Fri, 18 Dec 2009 11:32:38 +0000 (12:32 +0100)]
lib/util: import fault/backtrace handling from samba.
metze
(This used to be ctdb commit
8171d66f0061fe23ed6dfef87ffe63bfc19596eb)
Stefan Metzmacher [Fri, 18 Dec 2009 11:14:28 +0000 (12:14 +0100)]
configure: don't overwrite AC_CHECK_FUNC_EXT and AC_CHECK_LIB_EXT
This has curently no affect on the generated configure and config.h.in files.
metze
(This used to be ctdb commit
9d39ada437b02d84b70a5fea78b61bbb32f16d81)
Stefan Metzmacher [Sat, 19 Dec 2009 10:40:06 +0000 (11:40 +0100)]
move DEBUG* macros to one place
metze
(This used to be ctdb commit
4b4dd5d7f81bf226e05c7f3d40087043da1517a2)
Stefan Metzmacher [Mon, 21 Dec 2009 12:34:21 +0000 (13:34 +0100)]
tools/ctdb: display INACTIVE status in "ctdb status" and "ctdb status -Y"
metze
(This used to be ctdb commit
18af37e99ef8ff5623161495be432abfe5e3407f)
Stefan Metzmacher [Tue, 19 Jan 2010 07:38:53 +0000 (08:38 +0100)]
server: add missing goto again after do_recovery()
metze
(This used to be ctdb commit
898894d3acbcc0add2ab0706a3172a446622f687)
Stefan Metzmacher [Mon, 18 Jan 2010 12:19:29 +0000 (13:19 +0100)]
lib/events: finish "Run only one event for each epoll_wait/select call"
This finished commit
a78b8ea7168e5fdb2d62379ad3112008b2748576.
The logic was missing in events_standard (the one that's used by default).
metze
(This used to be ctdb commit
49f0488a5e60c74b6b8361dffcd09ebb2db740f0)
Ronnie Sahlberg [Tue, 19 Jan 2010 23:35:02 +0000 (10:35 +1100)]
source the nfs sysconfig file from the 61.nfstickles script
(This used to be ctdb commit
085d1bea78fabf754ef6dd6d323f74a1d361e45c)
Ronnie Sahlberg [Fri, 15 Jan 2010 05:01:51 +0000 (16:01 +1100)]
document the in-memory ringbuffer for logging and the commands
used to set it up and manage it.
(This used to be ctdb commit
037e64e1900f09e699d5fce50df2850f26f47f91)
Ronnie Sahlberg [Fri, 15 Jan 2010 04:38:56 +0000 (15:38 +1100)]
Make the size of the in memory ringbuffer for keeping the recent log messages
configureable using --log-ringbuf-size=<num-entries>.
Add an entry in the sysconfig file to set this persistently.
(This used to be ctdb commit
c79c2da69bc352f509e7fca4b9172a4b7f23c0f8)
Ronnie Sahlberg [Tue, 12 Jan 2010 20:12:08 +0000 (07:12 +1100)]
new version 1.0.113
(This used to be ctdb commit
4bcb07c412260147cd926452287885d05b2344c1)
Ronnie Sahlberg [Tue, 12 Jan 2010 20:01:40 +0000 (07:01 +1100)]
Merge commit 'metze/master-for-ronnie'
(This used to be ctdb commit
4cc9c79bfced9efa0d3817021512c86ed2fa3516)
Stefan Metzmacher [Thu, 7 Jan 2010 12:29:09 +0000 (13:29 +0100)]
server: call event_add_fd at the end of ctdb_set_child_logging()
metze
(This used to be ctdb commit
608e0765130aa9bca0aa77db5a888c413867a3fd)
Stefan Metzmacher [Thu, 7 Jan 2010 12:47:46 +0000 (13:47 +0100)]
ctdb_logging: simplify ctdb_fork_with_logging a lot and reduce the syscall usage
metze
(This used to be ctdb commit
acb98c36a3d56fa6b34747015b913ada3eaa133f)
Martin Schwenke [Tue, 12 Jan 2010 10:07:45 +0000 (21:07 +1100)]
New version 1.0.112.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit
64ae8b0702cfdc44a778e0cc3705dd685f9f6ab0)
Martin Schwenke [Tue, 12 Jan 2010 10:02:44 +0000 (21:02 +1100)]
Revert "Use wbinfo --ping-dc isntead of wbingo -p sicne this is a more reliable way to determine if winbindd is in a useful state."
This reverts commit
7c95e56ba871a4e0cb893a5cb5d821e7ff6e6dd6.
wbinfo --ping-dc is proving too unreliable.
(This used to be ctdb commit
b70021856e76df1ba407c83cfc19bf332fbfc869)
Martin Schwenke [Tue, 12 Jan 2010 10:02:11 +0000 (21:02 +1100)]
Revert "events/50.samba: only use wbinfo --ping-dc if available"
This reverts commit
7b73834ba3ac197cc8a3020c111f9bb2c567e70b.
wbinfo --ping-dc is proving too unreliable.
(This used to be ctdb commit
178f429a7b6d1008d35e857b6ca1df6adb60d255)
Martin Schwenke [Thu, 7 Jan 2010 01:46:26 +0000 (12:46 +1100)]
Merge commit 'origin/master'
(This used to be ctdb commit
bb9fc8b4388848863fa2b8735bd77eb07b7b5849)
Ronnie Sahlberg [Fri, 18 Dec 2009 04:16:04 +0000 (15:16 +1100)]
New version 1.0.111
(This used to be ctdb commit
484ae893f2179bebd0e2a2efe5f9619a39e48227)
Rusty Russell [Fri, 18 Dec 2009 03:43:09 +0000 (14:13 +1030)]
eventscript: fix bug when script is aborted
Another corner case when we terminate running monitor scripts to run
something else: logging can flush the output and we write to a NULL
pointer.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit
eb22c34bccc8a04fcf63efa2bc48d9788709382e)
Rusty Russell [Fri, 18 Dec 2009 03:24:40 +0000 (13:54 +1030)]
eventscript: remove cb_status, fix uninitialized bug when monitoring aborted
(Reapplied with merge after accidental revert)
Previously we updated cb_status a each script finished. Since we're storing
the status anyway, we can calculate it by iterating the scripts array
itself, providing clear and uniform behavior on all code paths.
In particular, this fixes a longstanding bug when we abort monitor
scripts to run some other script: the cb_status was uninitialized. In
this case, we need to hand *something* to the callback; 0 might make
us go healthy when we shouldn't. So we use the last status (normally,
this will be the just-saved current status).
In addition, we make the case of failing the first fork for the script
and failing other script forks the same: the error is returned via the
callback and saved for viewing through 'ctdb scriptstatus'.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit
2c84fe393ff2b961abf77d58a371c24db5ecb93b)
Martin Schwenke [Fri, 18 Dec 2009 03:44:25 +0000 (14:44 +1100)]
Merge commit 'origin/master'
(This used to be ctdb commit
82e1c5231c389bea935328a08ecf9b0b3a3979ef)
Martin Schwenke [Fri, 18 Dec 2009 03:43:45 +0000 (14:43 +1100)]
Test suite: Add an optimisation in the getvar test.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit
d9105ea79df198a20c2bfe471c4793d1dbba886e)
Martin Schwenke [Fri, 18 Dec 2009 03:42:58 +0000 (14:42 +1100)]
Test suite: allow settign of timeout triggers for all events not just monitor.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit
f319bd54369a2bc7d32c3bda7fc22f2ef1a51c3a)
Ronnie Sahlberg [Fri, 18 Dec 2009 01:32:58 +0000 (12:32 +1100)]
Version 1.0.110
(This used to be ctdb commit
859e18db681dabe0990793d03f58e59a061aa8bb)
Rusty Russell [Fri, 18 Dec 2009 01:24:24 +0000 (11:54 +1030)]
eventscript: fix cleanup path when setting up script list
We shouldn't set ctdb->current_monitor until we set destructor: that's
what cleans it up.
Also, free state->scripts on no-scripts exit path: it's not a child of
state because we need it in the destructor.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit
843a2ed5ef85f628788b0caf7417c6b61b5c6d3f)
Stefan Metzmacher [Thu, 17 Dec 2009 12:04:27 +0000 (13:04 +0100)]
server: add set_close_on_exec() on more fds
metze
(This used to be ctdb commit
7101ae80bf4e530f48e31e4c58707aa45a9fd3d5)
Stefan Metzmacher [Thu, 17 Dec 2009 12:03:42 +0000 (13:03 +0100)]
server: fix fd leaks in the new logging code
metze
(This used to be ctdb commit
140070dd81b39545fe2d56f70e9b9c96bfdae07f)
Ronnie Sahlberg [Thu, 17 Dec 2009 04:49:01 +0000 (15:49 +1100)]
version 1.0.109
(This used to be ctdb commit
99894a70fe2ebfe43daae7e88ff0fc9cab33e0fb)
Rusty Russell [Thu, 17 Dec 2009 04:08:15 +0000 (14:38 +1030)]
eventscript: remove cb_status, fix uninitialized bug when monitoring aborted
Previously we updated cb_status a each script finished. Since we're storing
the status anyway, we can calculate it by iterating the scripts array
itself, providing clear and uniform behavior on all code paths.
In particular, this fixes a longstanding bug when we abort monitor
scripts to run some other script: the cb_status was uninitialized. In
this case, we need to hand *something* to the callback; 0 might make
us go healthy when we shouldn't. So we use the last status (normally,
this will be the just-saved current status).
In addition, we make the case of failing the first fork for the script
and failing other script forks the same: the error is returned via the
callback and saved for viewing through 'ctdb scriptstatus'.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit
5d50f0e16948d18009f6623f132113f7273efc7f)
Ronnie Sahlberg [Wed, 16 Dec 2009 21:18:04 +0000 (08:18 +1100)]
fix a conflict in the merge from rusty
Merge commit 'rusty/ctdb-no-setsched'
Conflicts:
server/ctdb_vacuum.c
(This used to be ctdb commit
b4365045797f520a7914afdb69ebd1a8dacfa0d9)
Rusty Russell [Wed, 16 Dec 2009 10:27:20 +0000 (20:57 +1030)]
ctdb: use mlockall, cautiously
We don't want ctdb stalling due to paging; this can be far worse than
scheduling delays. But if we simply do mlockall(MCL_FUTURE), it
increases the risk that mmap (ie. tdb open) or malloc will fail,
causing us to abort.
This patch is a compromise: we mlock all current pages (including
10k of future stack for expansion) and then relock when a client
asks us to open a TDB. We warn, but don't exit, if it fails.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit
82f778e85440bc713d3f87c08ddc955d3cfce926)
Rusty Russell [Wed, 16 Dec 2009 08:56:22 +0000 (19:26 +1030)]
Remove RT priority, use niceness.
1) It's buggy. Code needs to be carefully written (ie. no busy
loops) to handle running with it, and we fork and run scripts.[1]
2) It makes debugging harder. If ctdbd loops (as has happened recently)
it can be extremely hard to get in and see what's happening. We've already
seen the valgrind hacks.
3) We have seen recent scheduler problems. Perhaps they are unrelated,
but removing this very unusual setup is unlikely to hurt.
4) It doesn't make anything faster. Under all but the most perverse of
circumstances, 99% of the cpu gives the same performance as 100%, and
we will always preempt normal processes anyway.
[1] I made this worse in
0fafdcb8d353 "eventscript: fork() a child for
each script" by removing the switch_from_server_to_client() which
restored it, but even that was only for monitor scripts. Others were
run with RT priority.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit
482c302d46e2162d0cf552f8456bc49573ae729d)
Rusty Russell [Wed, 16 Dec 2009 10:29:15 +0000 (20:59 +1030)]
Add --valgringing flag instead of --nosetsched
The do_setsched was being tested for whether to mmap tdbs: let's make it
explicit. We can also happily move the kill-child eventscript hack under
this flag.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit
2ee86cc1f311d7b7504c7b14d142b9c4f6f4b469)
Ronnie Sahlberg [Wed, 16 Dec 2009 07:34:40 +0000 (18:34 +1100)]
fix conflict in merge from metze
Merge commit 'metze/master-tdb-check'
Conflicts:
server/ctdb_vacuum.c
(This used to be ctdb commit
82421f20dcad4b0e25f109583879a26c0ee9c465)
Stefan Metzmacher [Fri, 20 Nov 2009 20:17:59 +0000 (21:17 +0100)]
ctdb: pass TDB_DISALLOW_NESTING to all tdb_open/tdb_wrap_open calls
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
1717836f4f36c4e2b6bd82b6b78e2325b2a458ab)
Stefan Metzmacher [Mon, 7 Dec 2009 12:02:59 +0000 (13:02 +0100)]
doc: regenerate manpages
metze
(This used to be ctdb commit
e3825407a509110c786d618efcdfa56ba93380a5)
Stefan Metzmacher [Tue, 8 Dec 2009 11:28:38 +0000 (12:28 +0100)]
doc: fix docbook warnings for ctdb.1 and onnode.1 manpages
metze
(This used to be ctdb commit
0d1300aa2325c94d8fb1c3cf8d454e5eee43dde9)
Stefan Metzmacher [Wed, 9 Dec 2009 10:29:52 +0000 (11:29 +0100)]
doc/ctdb.1: update example "ctdb listvars" output
metze
(This used to be ctdb commit
33ec6943fb2d01b6df0ce4515d37c671b18d237f)
Stefan Metzmacher [Tue, 8 Dec 2009 11:44:13 +0000 (12:44 +0100)]
doc/ctdb.1: make clear the database is specified by name for "ctdb backupdb"
metze
(This used to be ctdb commit
9b4c76973a8cf03ddc1a9b3777a350f739c00892)
Stefan Metzmacher [Tue, 8 Dec 2009 11:43:33 +0000 (12:43 +0100)]
doc/ctdb.1: document "ctdb getdbstatus <dbname>"
metze
(This used to be ctdb commit
a90f3dd25a22f9b8777ff6946ce1721859e9479a)
Stefan Metzmacher [Mon, 7 Dec 2009 09:19:20 +0000 (10:19 +0100)]
doc/ctdb.1: add "See also" for ctdb getdbmap
metze
(This used to be ctdb commit
bf48ae41ef5fb8e4675be448d13db522465d8d72)
Stefan Metzmacher [Tue, 8 Dec 2009 11:08:27 +0000 (12:08 +0100)]
doc/ctdb.1: document "ctdb dumpdbbackup <file>"
metze
(This used to be ctdb commit
8e6b8be51fd1bda789675650a94df0115ee9e238)
Stefan Metzmacher [Mon, 7 Dec 2009 09:18:39 +0000 (10:18 +0100)]
doc/ctdb.1: document -Y output fot ctdb getdbmap
metze
(This used to be ctdb commit
c09acd0896089a612ee3a1e78711abd98bd9cc99)
Stefan Metzmacher [Mon, 7 Dec 2009 09:10:05 +0000 (10:10 +0100)]
doc/ctdb.1: document UNHEALTHY for "ctdb getdbmap"
metze
(This used to be ctdb commit
3cdb8be02acc23074c8137a54faea62fee4567a0)
Stefan Metzmacher [Mon, 7 Dec 2009 09:00:52 +0000 (10:00 +0100)]
doc/ctdb.1: document "ctdb wipedb"
metze
(This used to be ctdb commit
fce390194dadb4961b46c706a1826442eef8c63d)
Stefan Metzmacher [Mon, 7 Dec 2009 09:53:31 +0000 (10:53 +0100)]
config: add CTDB_MAX_PERSISTENT_CHECK_ERRORS option
metze
(This used to be ctdb commit
fc5f556d488488040303438aefecb5ae2a8e54bc)
Stefan Metzmacher [Mon, 7 Dec 2009 09:46:10 +0000 (10:46 +0100)]
config: try to use tdbtool <tdb> check instead of tdbdump for persistent db checks
metze
(This used to be ctdb commit
52e6d81f4d8a4035272d9256d01bafb8ed593027)
Stefan Metzmacher [Mon, 7 Dec 2009 08:57:45 +0000 (09:57 +0100)]
ctdb: print out some hints how to debug a "ctdb catdb" failure
metze
(This used to be ctdb commit
504cf78d00d1120b556124340b9312f890b8b8b9)
Stefan Metzmacher [Mon, 7 Dec 2009 08:23:02 +0000 (09:23 +0100)]
ctdb: add machinereadable output fot "ctdb -Y getdbmap"
metze
(This used to be ctdb commit
45cfcd44093c7d2681e2ffd5cfb402823e8809f4)
Stefan Metzmacher [Mon, 7 Dec 2009 08:22:02 +0000 (09:22 +0100)]
ctdb: disallow "ctdb backupdb" on unhealthy databases
metze
(This used to be ctdb commit
ecf799093c1989f5499c9d61ce8cc8a98d759160)
Stefan Metzmacher [Fri, 4 Dec 2009 14:24:23 +0000 (15:24 +0100)]
client: add "ctdb dumpdbbackup <filename>"
metze
(This used to be ctdb commit
c63a0368d9d4b526ac1e49d891d3a1b7b8d20320)
Stefan Metzmacher [Fri, 4 Dec 2009 14:23:56 +0000 (15:23 +0100)]
client: make ctdb_dumpdb_record() public
metze
(This used to be ctdb commit
1cdc8dbb9cb971cf6dd6cd22b1adaf70ddc77e65)
Stefan Metzmacher [Wed, 2 Dec 2009 11:58:03 +0000 (12:58 +0100)]
tools/ctdb: let "ctdb restoredb" and "ctdb wipedb" mark the db as healthy on all
nodes
metze
(This used to be ctdb commit
d1b10b0c0c323c39742a18e98a1dab7e82ddc7be)
Stefan Metzmacher [Wed, 2 Dec 2009 11:57:29 +0000 (12:57 +0100)]
tools/ctdb: add "ctdb getdbstatus <dbname>"
metze
(This used to be ctdb commit
910c19f12448d293a755d1eb46d20f9591f8da7a)
Stefan Metzmacher [Wed, 2 Dec 2009 11:54:29 +0000 (12:54 +0100)]
tools/ctdb: display db health in "ctdb getdbmap"
metze
(This used to be ctdb commit
c34535ff4dc6a44909283641596e0ed7c2316fbd)
Stefan Metzmacher [Wed, 2 Dec 2009 11:51:37 +0000 (12:51 +0100)]
client: add ctdb_ctrl_getdbhealth()
metze
(This used to be ctdb commit
5abe44d0113839d3a45c9a31d30856aa70c2ea1f)
Stefan Metzmacher [Wed, 2 Dec 2009 11:48:22 +0000 (12:48 +0100)]
server: add CTDB_CONTROL_DB_SET_HEALTHY and CTDB_CONTROL_DB_GET_HEALTH
metze
(This used to be ctdb commit
7332d900538f0cbcd953a723417a0fe31dc9807c)
Stefan Metzmacher [Mon, 7 Dec 2009 12:28:11 +0000 (13:28 +0100)]
server: Use tdb_check to verify persistent tdbs on startup
Depending on --max-persistent-check-errors we allow ctdb
to start with unhealthy persistent databases.
The default is 0 which means to reject a startup with
unhealthy dbs.
The health of the persistent databases is checked after each
recovery. Node monitoring and the "startup" is deferred
until all persistent databases are healthy.
Databases can become healthy automaticly by a completely
HEALTHY node joining the cluster. Or by an administrator
with "ctdb backupdb/restoredb" or "ctdb wipedb".
metze
(This used to be ctdb commit
15f133d5150ed1badb4fef7d644f10cd08a25cb5)
Stefan Metzmacher [Mon, 7 Dec 2009 12:19:33 +0000 (13:19 +0100)]
server: move error handling to a 'fail' label in ctdb_control_transaction_commit()
metze
(This used to be ctdb commit
d874463235fa299e83fe562291c688aca3b85cf3)
Stefan Metzmacher [Fri, 27 Nov 2009 15:36:05 +0000 (16:36 +0100)]
server/recovery: update flags on nodes before syncing dbs
metze
(This used to be ctdb commit
49d2dca9ad837e1b397294fb0e966bf0b77f751c)
Stefan Metzmacher [Sun, 29 Nov 2009 11:39:37 +0000 (12:39 +0100)]
server: open /var/ctdb/state/persistent_health.tdb.X on startup
This node internal tdb will store the HEALTH state of persistent
tdbs.
metze
(This used to be ctdb commit
cbda4666be88c11a810a192a70667b57f773ace1)
Stefan Metzmacher [Mon, 23 Nov 2009 14:39:19 +0000 (15:39 +0100)]
server: create vactune.tdb.X with 0600 permissions
metze
(This used to be ctdb commit
21677ed6fb8c589f348321533c608cad58c4ec93)
Stefan Metzmacher [Mon, 23 Nov 2009 14:38:31 +0000 (15:38 +0100)]
server: create vactun.tdb.X under /var/ctdb/state
metze
(This used to be ctdb commit
1db17f312558fe59983a3465680e56c9f0c19e36)
Stefan Metzmacher [Mon, 23 Nov 2009 14:36:45 +0000 (15:36 +0100)]
server: create recdb.tdb.X in /var/ctdb/state/
metze
(This used to be ctdb commit
92e05282d6c4f16e55d914cc3bde3738ea2d44ad)
Stefan Metzmacher [Sun, 29 Nov 2009 11:39:23 +0000 (12:39 +0100)]
server: only do the mkdir() calls for db_directory* once at the start
metze
(This used to be ctdb commit
f30f33685db50860b6cd6fd1b6bdc3066620a78f)
Stefan Metzmacher [Mon, 23 Nov 2009 13:38:03 +0000 (14:38 +0100)]
server: add db_directory_state to ctdb_context
metze
(This used to be ctdb commit
656a6ec5ed81ccfbb86144156a3158e48f105ee4)
Stefan Metzmacher [Mon, 23 Nov 2009 13:40:17 +0000 (14:40 +0100)]
server: create tdbs with 0600 permissions in ctdb_local_attach()
metze
(This used to be ctdb commit
6529a1328b9ec304ad306674651b2a67e4426e23)
Stefan Metzmacher [Mon, 9 Nov 2009 14:06:59 +0000 (15:06 +0100)]
config: load 'ctdb' config before 'nfs' config in statd-callout
All other scripts do 'loadconfig ctdb' before any other 'loadconfig foo'
call. I think we should do the same in statd-callout.
Otherwise it's very confusing, if you have configured some Options
in /etc/sysconfig/ctdb, but /etc/ctdb/statd-callout doesn't notice
them.
metze
(This used to be ctdb commit
10d95581fb90bfdf58ec32345c4e36c27acf4f37)
Stefan Metzmacher [Fri, 20 Nov 2009 20:17:59 +0000 (21:17 +0100)]
ctdb: pass TDB_DISALLOW_NESTING to all tdb_open/tdb_wrap_open calls
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
1635e931b909c66eb3b1f5357e3a549b1a0da70d)
Simo Sorce [Mon, 7 Dec 2009 14:25:03 +0000 (09:25 -0500)]
Fix release script with newer versins of git
(cherry picked from commit
4334092cbae28181ba0d1cf2ac026961f2192972)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
093f57a2c00f2d629a3b58e58202f1a7e1bbd406)
Matthias Dieter Wallnöfer [Fri, 16 Oct 2009 17:02:02 +0000 (19:02 +0200)]
tdb tools: Mostly cosmetic adaptions
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from samba commit
9776cb03450d21da5d454e683bdba29793ba3f67)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
d1873bd81bfc9f486b88f3a38c65c7de8f5a0909)
Stefan Metzmacher [Thu, 19 Nov 2009 08:49:03 +0000 (09:49 +0100)]
tdb: change version to 1.2.0 after adding TDB_*ALLOW_NESTING
metze
(cherry picked from samba commit
5ca0a4bfd6fdbb515835682a12f715283b46cb3e)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
04aeac728f56c65b973762f09977de1b1b99099e)
Stefan Metzmacher [Thu, 19 Nov 2009 08:34:05 +0000 (09:34 +0100)]
tdb: add TDB_DISALLOW_NESTING and make TDB_ALLOW_NESTING the default behavior
We need to keep TDB_ALLOW_NESTING as default behavior,
so that existing code continues to work.
However we may change the default together with a major version
number change in future.
metze
(cherry picked from samba commit
3b9f19ed919fef2e88b2f92ae541e07bc7379cd1)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
c1c0ede32dc00ed619d1cf5fda40a9de43995f3a)
Stefan Metzmacher [Thu, 19 Nov 2009 08:38:48 +0000 (09:38 +0100)]
tdb: always set tdb->tracefd to -1 to be safe on goto fail
metze
(cherry picked from samba commit
85449b7bcc4bd7948bea38b5514a02357950a002)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
855391c1e37012b0d6c673a304bb8da8a1efcd72)
Volker Lendecke [Fri, 6 Nov 2009 13:04:49 +0000 (14:04 +0100)]
tdb: Fix a C++ warning (cherry picked from samba commit
be88a126ea50ea7e41583f402013c63234305e48)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
6126f04bd4982b66564dcccd92a15baf9cb856f3)
Kirill Smelkov [Wed, 21 Oct 2009 17:18:58 +0000 (21:18 +0400)]
tdb: update README a bit
While studying tdb, I've noticed a couple of mismatches between readme
and actual code:
- tdb_open_ex changed it's log_fn argument to log_ctx
- there is now no tdb_update(), which it seems was transformed into
non-exported tdb_update_hash()
There were other mismatches, but I don't remember them now, sorry.
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit
83de5c826313aa09c76131ae70550bd81b3521c5)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
7a88f1df9190674deaf5dcbedad02ae4120a5263)
Kirill Smelkov [Wed, 21 Oct 2009 17:18:57 +0000 (21:18 +0400)]
tdb: add tests for double .close() in pytdb
The reason I do it is that when using older python-tdb as shipped in
Debian Lenny, python interpreter crashes on this test:
(gdb) bt
#0 0xb7f8c424 in __kernel_vsyscall ()
#1 0xb7df5640 in raise () from /lib/i686/cmov/libc.so.6
#2 0xb7df7018 in abort () from /lib/i686/cmov/libc.so.6
#3 0xb7e3234d in __libc_message () from /lib/i686/cmov/libc.so.6
#4 0xb7e38624 in malloc_printerr () from /lib/i686/cmov/libc.so.6
#5 0xb7e3a826 in free () from /lib/i686/cmov/libc.so.6
#6 0xb7b39c84 in tdb_close () from /usr/lib/libtdb.so.1
#7 0xb7b43e14 in ?? () from /var/lib/python-support/python2.5/_tdb.so
#8 0x0a038d08 in ?? ()
#9 0x00000000 in ?? ()
master's pytdb does not (we have a check for self->closed in obj_close()),
but still...
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit
71a21393dd1bb61bded82b1581ac6d5bd3b0153c)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
03372b4ea8ba2938468a5c0fc234d604966ce070)
Kirill Smelkov [Wed, 21 Oct 2009 17:18:56 +0000 (21:18 +0400)]
tdb: reset tdb->fd to -1 in tdb_close()
So that erroneous double tdb_close() calls do not try to close() same
fd again. This is like SAFE_FREE() but for fd.
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit
b4424f8234a78a79fb2d71d46ca208b4f12e0f9e)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
f5c992bdaeb73ef726ff4728a9922721474cd6f5)
Kirill Smelkov [Wed, 21 Oct 2009 17:18:55 +0000 (21:18 +0400)]
tdb: fix typo in python's Tdb.get() docstring
It's Tdb.get(), not Tdb.fetch().
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit
cfed5f946de0992a594c189ee3c19cf98e59d380)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
76aacdd8e1106f26565e25903091a757b59cd7e2)
Andrew Tridgell [Fri, 23 Oct 2009 11:45:03 +0000 (22:45 +1100)]
tdb: detect tdb store of identical records and skip
This can help with ldb where we rewrite the index records
(cherry picked from samba commit
d4c0e8fdf063f88032c32de7ece60d502b322089)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
470750fa2e3cf987f10de48451b1ee13aab03907)
Stefan Metzmacher [Fri, 23 Oct 2009 11:51:03 +0000 (13:51 +0200)]
tdb: rename 'struct list_struct' into 'struct tdb_record'
metze
(cherry picked from samba commit
3b62e250c066f44d0ab08a7db037b6b4f74a914b)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
03b3682e3fa53c9f5fdf2c4beac8b5d030fd2630)
Rusty Russell [Thu, 19 Nov 2009 21:15:59 +0000 (22:15 +0100)]
lib/tdb: make tdbtool use tdb_check() for "check" command
Also, set logging function so we get more informative messages.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit
094493115971cf3d5a3138ff10ebe02335824723)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
6ac7ef8bf4d384f880c7f483ace70f8e08c15a8b)
Rusty Russell [Wed, 21 Oct 2009 13:40:34 +0000 (00:10 +1030)]
lib/tdb: add tdb_check()
ctdb wants a quick way to detect corrupt tdbs; particularly, tdbs with
loops in their hash chains. tdb_check() provides this.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit
022b4d4aa6861c1e3e6d76484d92555221cb6d14)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
df1a3ce0380fa9d8722b2f9b16f65557095e4c83)
Kirill Smelkov [Wed, 21 Oct 2009 17:18:54 +0000 (21:18 +0400)]
tdb: kill last bits from swig
We no longer use swig for pytdb, so there is no need for swig make
rules. Also pytdb.c header should be updated.
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit
ecbe5ebd8d1c44a478c613eb1cace0521142d0d3)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
27611d6a0c313732e438cb24c82b9de126e50156)
Stefan Metzmacher [Thu, 19 Nov 2009 14:44:10 +0000 (15:44 +0100)]
lib/tdb: sync build files from samba master
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
1d5c5a221c28f1dc652a80ed516a0f18ba588d9f)
Stefan Metzmacher [Thu, 19 Nov 2009 15:52:46 +0000 (16:52 +0100)]
s3 build: Remove unused fstat check to fix a bunch of HAVE_FSTAT warnings (cherry picked from samba commit
2c2545d45af9c7479bf032fff1263e102926a495)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
c40d14b1b7ba7c9ae40c0306a2e552504e0f92a6)
Stefan Metzmacher [Fri, 30 Jan 2009 18:38:59 +0000 (19:38 +0100)]
lib/tdb: include replace.h and system/filesys.h in pytdb.c
This fixes the build on Tru64.
metze
(cherry picked from samba commit
3718cf294ad1f3e00178cb34b2c914c9aecf2016)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
5652e403be099f35cdd29fda8ba4fe2c35de8035)
Stefan Metzmacher [Thu, 19 Nov 2009 15:50:50 +0000 (16:50 +0100)]
Avoid using a utility header for Python replacements included in Samba, since this will not be shipped with talloc/tdb/tevent/etc. (cherry picked from samba commit
ba5d6e6d706ebf07640ee24d701255cbb4803525)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
da47169c4d3bc1b446b49610d892df05638e912c)
Stefan Metzmacher [Thu, 19 Nov 2009 15:49:13 +0000 (16:49 +0100)]
s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4 (cherry picked from samba commit
61a23c5eea2203721a70a4ad41bfdc6cd1d6a2a7)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
4130c5dd10869b071124e2bf04d6807bbb11ab1f)
Stefan Metzmacher [Thu, 19 Nov 2009 15:31:29 +0000 (16:31 +0100)]
py: Properly increase the reference counter of Py_None. (cherry picked from samba commit
d2c70d24e12293d9b4272eb310a6a4c4582b2d92)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
e7242221c3318a5c312e17ff4074bef80b639ca8)
Jelmer Vernooij [Thu, 18 Dec 2008 20:42:50 +0000 (20:42 +0000)]
Make sure to not close tdb database more than once. (cherry picked from samba commit
6fe6983e4c960abc69d5fa80cbef534ae515209a)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
52f78e040749d24058ee1f575d949b57d15f5987)
Jelmer Vernooij [Thu, 18 Dec 2008 19:41:02 +0000 (19:41 +0000)]
Implement missing functions in pytdb. (cherry picked from samba commit
2da551bbcc6cab296769c193b0b82aaa6256cece)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
3a671b11770057c91e0ae646499d4714f52bc5c0)
Stefan Metzmacher [Thu, 19 Nov 2009 15:25:49 +0000 (16:25 +0100)]
Add simple manually written replacement for the tdb module. (cherry picked from samba commit
2a61fd41e9d4d2e3d7b47a816544c88bb369bc03)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
2231ee0aa163d68383dd9636f25f033fe7c1f3e7)
Jelmer Vernooij [Thu, 10 Jan 2008 20:44:38 +0000 (21:44 +0100)]
tdb: Add simple reimplementation of tdbdump in Python as an example of the tdb Python bindings. (This used to be commit
47d797f7885b1e7bcff724496ecb1990e8440eea) (cherry picked from samba commit
6bdd1425b75c8931965f0e5627f5a63dc6820a7c)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
363c34d4bb488609317794cd3153d85c12643110)
Jeremy Allison [Fri, 5 Sep 2008 22:32:22 +0000 (15:32 -0700)]
Remove unecessary msync. Jeremy. (cherry picked from samba commit
0bae1ef3de8fda5e1e2d641b14a408e627396912) (This used to be commit
db2acaf46fdc38078b6b28b68909e289f6c9e0ec) (cherry picked from samba commit
a1cf3ad5d655cf5a847df6d6299b3af1a30ec1e3)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
236dc2fa29b3c0caec51859dbd469f0a13f5917e)
Stefan Metzmacher [Thu, 19 Nov 2009 14:35:38 +0000 (15:35 +0100)]
The msync manpage reports that msync *must* be called before munmap. Failure to do so may result in lost data. Fix an ifdef check, I really think we meant to check HAVE_MMAP here. (cherry picked from samba commit
74c8575b3f3b90ea21ae6aa7ccd95947838af956) (This used to be commit
8fd54bb55f0c23bd025d1719abcbe75c6a2ea8ac) (cherry picked from samba commit
b39e332bd7803dd4ce8267f750c497b5deb837ee)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
5aa0ab328c36ecd4d7ec03f921e6027340c2ef13)
Volker Lendecke [Tue, 12 Aug 2008 20:31:52 +0000 (22:31 +0200)]
Attempt to fix bug 5684
With the ctdb checkin
dde9f3f006 tdb optimized out write lock checks for
write-enabled transaction. Sadly, this also removed the possibility to ever
remove dead records left over from tdb_delete calls within a transaction.
Tridge, please check this! Did
dde9f3f006 have any reason beyond performance
optimizations?
Thanks,
Volker
(cherry picked from samba commit
3f884c4ae36f3260e63626bdd4989d9258ae6497)
(This used to be commit
1d85e0647e287d269b3f6b534da88f497d6f76c3)
(cherry picked from samba commit
8c88209c6f4b57b0dbe1459bd5bc583c5d321758)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit
b02bf7659f04f1fa203834bd75a2392b48e56c16)