Volker Lendecke [Wed, 11 Apr 2007 14:52:06 +0000 (16:52 +0200)]
Merge tridge's tree
Volker Lendecke [Wed, 11 Apr 2007 14:51:25 +0000 (16:51 +0200)]
Add a test to read back the message
Volker
Andrew Tridgell [Wed, 11 Apr 2007 12:21:43 +0000 (22:21 +1000)]
use event_loop_wait instead of while(1)
Andrew Tridgell [Wed, 11 Apr 2007 12:19:46 +0000 (22:19 +1000)]
use lib/replace for signal.h
Andrew Tridgell [Wed, 11 Apr 2007 12:17:24 +0000 (22:17 +1000)]
merge from volker
Andrew Tridgell [Wed, 11 Apr 2007 12:11:07 +0000 (22:11 +1000)]
merge from ronnie
Volker Lendecke [Wed, 11 Apr 2007 11:57:58 +0000 (13:57 +0200)]
merge
Volker Lendecke [Wed, 11 Apr 2007 11:17:36 +0000 (13:17 +0200)]
Handle a client that exited correctly: We need to ignore SIGPIPE and when the
read returns 0 bytes this means the client has exited. Close the connection
then.
Volker Lendecke [Wed, 11 Apr 2007 10:49:10 +0000 (12:49 +0200)]
Fix uninitialized variable warnings
Ronnie sahlberg [Wed, 11 Apr 2007 10:32:24 +0000 (20:32 +1000)]
add an example on how to send a message to the daemon
(send a message to ourself)
this unfortunately terminates the ctdb daemon when running but im too tired right now to debug it.
checkin so that nothing gets lost overnight.
Ronnie sahlberg [Wed, 11 Apr 2007 09:27:19 +0000 (19:27 +1000)]
add call/reply parsing of the cluster connect-wait call to the test daemon.
Ronnie sahlberg [Wed, 11 Apr 2007 09:04:09 +0000 (19:04 +1000)]
add a vnn field to the ctdb_reply_connect_wait pdu so that we can tell
non-ctdb-linked clients what the vnn of the local cluster daemon is
Ronnie sahlberg [Wed, 11 Apr 2007 08:54:22 +0000 (18:54 +1000)]
create a standalone ctdb daemon and a script ./direct/ctdbd.sh to start two such daemons in a 2 node cluster.
create a small test application that connects to the ctdb daemon at /tmp/ctdb.socket.127.0.0.1 and do some commands to the daemon.
currently this test tool only opens the socket and registers its pid with the daemon
(the daemon needs to know the pid so that it can forward messages to the correct client)
the test will be extended with additional ctdb commands
Ronnie sahlberg [Wed, 11 Apr 2007 05:40:03 +0000 (15:40 +1000)]
merge from tridge
Andrew Tridgell [Wed, 11 Apr 2007 05:23:50 +0000 (15:23 +1000)]
added --num-clients option to ctdb_messaging test
Andrew Tridgell [Wed, 11 Apr 2007 05:09:22 +0000 (15:09 +1000)]
use the new connect_wait code in the ctdb_messaging test
Andrew Tridgell [Wed, 11 Apr 2007 04:54:47 +0000 (14:54 +1000)]
add proper support for ctdb_connect_wait in daemon mode
Andrew Tridgell [Wed, 11 Apr 2007 04:26:14 +0000 (14:26 +1000)]
fixed sending messages to ourselves in non-daemon mode
Andrew Tridgell [Wed, 11 Apr 2007 04:05:01 +0000 (14:05 +1000)]
merge from ronnie, plus complete the client side of inter-node messaging
Ronnie sahlberg [Wed, 11 Apr 2007 03:43:15 +0000 (13:43 +1000)]
add a test that sends messages between clients connected to the same ctdb
add code to actually pass the messages between clients and ctdb
Andrew Tridgell [Wed, 11 Apr 2007 01:58:28 +0000 (11:58 +1000)]
partially completed work towards full messaging system which will work in both daemon and standalone mode. Does not compile\! committing so ronnie can continue while I'm out
Andrew Tridgell [Wed, 11 Apr 2007 01:11:44 +0000 (11:11 +1000)]
merge from ronnie
Ronnie sahlberg [Wed, 11 Apr 2007 01:08:20 +0000 (11:08 +1000)]
merge from tridge
Andrew Tridgell [Wed, 11 Apr 2007 01:02:26 +0000 (11:02 +1000)]
forgot to add ctdb_client.c
Andrew Tridgell [Wed, 11 Apr 2007 01:01:42 +0000 (11:01 +1000)]
- add --daemon flag to ctdb_fetch test code
- split client specific routines out of ctdb_daemon.c
- use ctdb_queue code in message send from client to daemon
- use clearer names in client/daemon functions
- use talloc autofree context to avoid global for unlink of socket on
exit
- start on API change for message handler, to allow ctdb messaging to
handle daemon mode with multiple clients
Ronnie sahlberg [Tue, 10 Apr 2007 11:14:55 +0000 (21:14 +1000)]
rename client.id to client.messenger_id to make the purpose of the field more obvious
Ronnie sahlberg [Tue, 10 Apr 2007 11:05:29 +0000 (21:05 +1000)]
add a call to register the pid for a messengin service
store this pid inside the client structure in the ctdb daemon
Andrew Tridgell [Tue, 10 Apr 2007 10:48:31 +0000 (20:48 +1000)]
fix the queueing for partially connected tcp sockets
Ronnie sahlberg [Tue, 10 Apr 2007 10:25:11 +0000 (20:25 +1000)]
updates from tridges tree
Andrew Tridgell [Tue, 10 Apr 2007 09:40:29 +0000 (19:40 +1000)]
make some functions static, and remove an unused structure
Andrew Tridgell [Tue, 10 Apr 2007 09:35:21 +0000 (19:35 +1000)]
merge from ronnie
Andrew Tridgell [Tue, 10 Apr 2007 09:33:21 +0000 (19:33 +1000)]
made all sockets handle partial IO
abstract IO via ctdb_queue_*() functions
Ronnie sahlberg [Tue, 10 Apr 2007 04:53:23 +0000 (14:53 +1000)]
remove old ifdef that remained from when this was a header file
Andrew Tridgell [Tue, 10 Apr 2007 04:48:13 +0000 (14:48 +1000)]
merge tcp changes from ronnie
Andrew Tridgell [Tue, 10 Apr 2007 04:46:32 +0000 (14:46 +1000)]
added daemon mode to ctdb_bench
Ronnie sahlberg [Tue, 10 Apr 2007 03:17:15 +0000 (13:17 +1000)]
change the tcp code to call ctdb_read_pdu() instead of doing the partial read thing explicitely
Andrew Tridgell [Tue, 10 Apr 2007 03:06:47 +0000 (13:06 +1000)]
merge from ronnie
Andrew Tridgell [Tue, 10 Apr 2007 03:05:23 +0000 (13:05 +1000)]
fix a possible free after use
Andrew Tridgell [Tue, 10 Apr 2007 02:51:54 +0000 (12:51 +1000)]
fix configure for new test location
Ronnie sahlberg [Tue, 10 Apr 2007 02:39:25 +0000 (12:39 +1000)]
move the checking of the CONNECT_WAIT flag into the start method for tcp
Ronnie sahlberg [Tue, 10 Apr 2007 02:23:10 +0000 (12:23 +1000)]
restore the test script that was updated by mistake in the previous checkin
Ronnie sahlberg [Tue, 10 Apr 2007 02:18:58 +0000 (12:18 +1000)]
add a CONNECT_WAIT flag to replace the call ctdb_connect_wait() since
we can no longer use this function from the application if we are in daemon mode.
add a horrible "sleep()" to ctdb_test.c to prevent the daemon from dissapearing (parent process died) when the application exits which may happen before the other nodes in the test have finished talking to our daemon
Ronnie sahlberg [Mon, 9 Apr 2007 22:47:39 +0000 (08:47 +1000)]
add a atexit() call to remove the domain socket when the daemon exits
Ronnie sahlberg [Mon, 9 Apr 2007 22:38:29 +0000 (08:38 +1000)]
change ctdb_client_read() to use the ctdb_read_pdu() helper
Ronnie sahlberg [Mon, 9 Apr 2007 20:03:39 +0000 (06:03 +1000)]
make normal/deamon mode controllable by a ctdb flag so that the api looks the same in both modes to a client.
send the correct structure back to a client
assorted other cleanups
(tests/test1.sh now works in daemon mode)
Ronnie sahlberg [Mon, 9 Apr 2007 01:51:27 +0000 (11:51 +1000)]
dispatcher daemon first try.
does not yet work
Ronnie sahlberg [Sun, 8 Apr 2007 02:11:48 +0000 (12:11 +1000)]
merge from tridge
Andrew Tridgell [Sat, 7 Apr 2007 00:58:14 +0000 (10:58 +1000)]
another memory leak
Andrew Tridgell [Sat, 7 Apr 2007 00:46:47 +0000 (10:46 +1000)]
remove talloc debug code
Andrew Tridgell [Sat, 7 Apr 2007 00:45:00 +0000 (10:45 +1000)]
fixed a bunch of memory leaks
Andrew Tridgell [Sat, 7 Apr 2007 00:01:09 +0000 (10:01 +1000)]
put test code in tests/ directory
Andrew Tridgell [Fri, 6 Apr 2007 04:41:05 +0000 (14:41 +1000)]
added a magic header for wireshark and packet version info
Andrew Tridgell [Thu, 5 Apr 2007 23:46:45 +0000 (09:46 +1000)]
merge from ronnie
Ronnie sahlberg [Thu, 5 Apr 2007 23:08:41 +0000 (09:08 +1000)]
When we create a tcp connection to a remote ctdb node do an explicit bind() to set our source side to the same ip address as we use to listen to ctdb traffic.
We need this since there is no guarantee that INADDR_ANY (which would be defaulted to if we dont bind) would be routable from the remote host.
This is entirely possible to happen since CTDB traffic is likely to be isolated to a private non-routable network.
Andrew Tridgell [Thu, 5 Apr 2007 03:19:06 +0000 (13:19 +1000)]
merge from ronnies branch
Andrew Tridgell [Thu, 5 Apr 2007 03:18:31 +0000 (13:18 +1000)]
merge fetch code from ronnie, and add a simple fetch test
Ronnie sahlberg [Wed, 4 Apr 2007 11:15:56 +0000 (21:15 +1000)]
first test of forced migration of records. compiles but not tested.
Ronnie sahlberg [Wed, 4 Apr 2007 05:05:35 +0000 (15:05 +1000)]
tridge
Andrew Tridgell [Wed, 4 Apr 2007 05:02:49 +0000 (15:02 +1000)]
merge back some changes from Samba4
Andrew Tridgell [Tue, 3 Apr 2007 10:13:50 +0000 (20:13 +1000)]
merge multi-database support from ronnie
Ronnie sahlberg [Tue, 3 Apr 2007 09:41:00 +0000 (19:41 +1000)]
Split CTDB into sub contexts to handle multiple concurrent databases within the same context.
Andrew Tridgell [Thu, 8 Mar 2007 00:27:15 +0000 (11:27 +1100)]
merged changes from peter
Peter Somogyi [Mon, 26 Feb 2007 10:59:20 +0000 (11:59 +0100)]
ib: added external send queue to workaround downtime
Workaround is because I couldn't find a correct way in ib to reconnect cleanly (with queue kept) when destination is unreachable.
When connection is broken, all internal queue contents are being destroyed and reconnects automatically.
An "external" send queue is kept until the connection is up again for a dest node.
Peter Somogyi [Thu, 22 Feb 2007 17:25:18 +0000 (18:25 +0100)]
merged tridge's code
Andrew Tridgell [Tue, 20 Feb 2007 03:57:13 +0000 (14:57 +1100)]
added --num-msgs option
added TCP_NODELAY on tcp sockets
Andrew Tridgell [Tue, 20 Feb 2007 02:24:45 +0000 (13:24 +1100)]
added rest of tdb (missed in earlier commit)
Andrew Tridgell [Tue, 20 Feb 2007 02:23:43 +0000 (13:23 +1100)]
ignored some files
Andrew Tridgell [Tue, 20 Feb 2007 02:23:01 +0000 (13:23 +1100)]
added a benchmark script that launches via ssh
Andrew Tridgell [Tue, 20 Feb 2007 02:22:18 +0000 (13:22 +1100)]
support hostnames for node names
Peter Somogyi [Fri, 16 Feb 2007 14:21:31 +0000 (15:21 +0100)]
workaround proposal for the initialization-problem
Peter Somogyi [Fri, 16 Feb 2007 14:20:36 +0000 (15:20 +0100)]
merged tridge's fix
Andrew Tridgell [Fri, 16 Feb 2007 03:48:27 +0000 (14:48 +1100)]
fixed incr initialisation
Andrew Tridgell [Fri, 16 Feb 2007 03:41:45 +0000 (14:41 +1100)]
merged peters IB work
Peter Somogyi [Thu, 15 Feb 2007 16:02:38 +0000 (17:02 +0100)]
1st working ib integrated ctdb
TODO: bugfix of ctdb_bench (wants to sent via uninitialised connection - see bench_ring/dest)
Peter Somogyi [Wed, 14 Feb 2007 17:58:20 +0000 (18:58 +0100)]
ib: a trivial approach of integration
TODO: bugfix (not yet complete, something happens differently than expected
at tcpip when connection is refused in the beginning)
Peter Somogyi [Mon, 12 Feb 2007 15:47:12 +0000 (16:47 +0100)]
Some minor changes before integrating ib...
Peter Somogyi [Mon, 12 Feb 2007 14:13:22 +0000 (15:13 +0100)]
Merged tridge's code.
(I had error 206 at direct bzr merge, so 1st I did a "bzr branch" and merged that one.)
Peter Somogyi [Fri, 9 Feb 2007 17:06:13 +0000 (18:06 +0100)]
ib: adjustment of a test scenario
Andrew Tridgell [Fri, 9 Feb 2007 01:46:16 +0000 (12:46 +1100)]
added a simple benchmark script
Andrew Tridgell [Fri, 9 Feb 2007 01:45:58 +0000 (12:45 +1100)]
changed ctdb_bench.c to use messages instead of calls
Andrew Tridgell [Thu, 8 Feb 2007 22:54:21 +0000 (09:54 +1100)]
merged ib work from peter
Andrew Tridgell [Thu, 8 Feb 2007 22:47:53 +0000 (09:47 +1100)]
ignore config.h*
Andrew Tridgell [Thu, 8 Feb 2007 22:42:04 +0000 (09:42 +1100)]
merged ctdb messaging code from samba4
Peter Somogyi [Thu, 8 Feb 2007 18:08:58 +0000 (19:08 +0100)]
merged tridge's code
Peter Somogyi [Thu, 8 Feb 2007 18:06:14 +0000 (19:06 +0100)]
ib: fragment sent buf + many bugfixes
It came to light I have to fragment the send buffer in case destination's to fit receiver's buffers.
Additionally fixed many bugs.
Still testing.
+ TODO: clean code.
Andrew Tridgell [Wed, 7 Feb 2007 02:26:07 +0000 (13:26 +1100)]
merged from samba4 ctdb
Peter Somogyi [Fri, 2 Feb 2007 17:54:57 +0000 (18:54 +0100)]
Added variable msg size scenario.
Detected 1 bug, fixing...
Peter Somogyi [Thu, 1 Feb 2007 17:46:44 +0000 (18:46 +0100)]
2 bugfixes
- ibw_stop handling
- ibw_send: < instead of <=
Peter Somogyi [Wed, 31 Jan 2007 11:24:55 +0000 (12:24 +0100)]
merging tridge's code...
Peter Somogyi [Tue, 30 Jan 2007 17:47:26 +0000 (18:47 +0100)]
Added overload test scenario + fixed 1 send queue bug.
TODO: externize debug level
Andrew Tridgell [Mon, 29 Jan 2007 11:30:06 +0000 (22:30 +1100)]
merge status code changes from samba4 ctdb
Andrew Tridgell [Mon, 29 Jan 2007 11:11:16 +0000 (22:11 +1100)]
fix a bug in new structure handling
Peter Somogyi [Fri, 26 Jan 2007 15:45:51 +0000 (16:45 +0100)]
Adjusted debug level and test scenario.
Peter Somogyi [Thu, 25 Jan 2007 17:57:47 +0000 (18:57 +0100)]
Adjusted ib test tool #1.
Now fixed number of pingpong messages can be sent and then exit.
Peter Somogyi [Thu, 25 Jan 2007 13:22:03 +0000 (14:22 +0100)]
Fixed a side effect of previous revert.
Peter Somogyi [Thu, 25 Jan 2007 11:31:33 +0000 (12:31 +0100)]
Merged tridge's branch.
Reverted ib join (will do later).
Peter Somogyi [Thu, 25 Jan 2007 10:01:59 +0000 (11:01 +0100)]
1st "working" ib version.
TODO: stress test, variable size messages, flood
Andrew Tridgell [Thu, 25 Jan 2007 05:13:17 +0000 (16:13 +1100)]
simplified ctdb_call() interface, and made it easier to expand with more parameters later
Andrew Tridgell [Thu, 25 Jan 2007 04:19:16 +0000 (15:19 +1100)]
use ctdb_call_info, so struct ctdb_call can be used for top level call
Andrew Tridgell [Thu, 25 Jan 2007 04:11:36 +0000 (15:11 +1100)]
merge db wrap code from samba4