tridge/ctdb.git
17 years agoMerge tridge's tree
Volker Lendecke [Wed, 11 Apr 2007 14:52:06 +0000 (16:52 +0200)]
Merge tridge's tree

17 years agoAdd a test to read back the message
Volker Lendecke [Wed, 11 Apr 2007 14:51:25 +0000 (16:51 +0200)]
Add a test to read back the message

Volker

17 years agouse event_loop_wait instead of while(1)
Andrew Tridgell [Wed, 11 Apr 2007 12:21:43 +0000 (22:21 +1000)]
use event_loop_wait instead of while(1)

17 years agouse lib/replace for signal.h
Andrew Tridgell [Wed, 11 Apr 2007 12:19:46 +0000 (22:19 +1000)]
use lib/replace for signal.h

17 years agomerge from volker
Andrew Tridgell [Wed, 11 Apr 2007 12:17:24 +0000 (22:17 +1000)]
merge from volker

17 years agomerge from ronnie
Andrew Tridgell [Wed, 11 Apr 2007 12:11:07 +0000 (22:11 +1000)]
merge from ronnie

17 years agomerge
Volker Lendecke [Wed, 11 Apr 2007 11:57:58 +0000 (13:57 +0200)]
merge

17 years agoHandle a client that exited correctly: We need to ignore SIGPIPE and when the
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.

17 years agoFix uninitialized variable warnings
Volker Lendecke [Wed, 11 Apr 2007 10:49:10 +0000 (12:49 +0200)]
Fix uninitialized variable warnings

17 years agoadd an example on how to send a message to the daemon
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.

17 years agoadd call/reply parsing of the cluster connect-wait call to the test daemon.
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.

17 years agoadd a vnn field to the ctdb_reply_connect_wait pdu so that we can tell
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

17 years agocreate a standalone ctdb daemon and a script ./direct/ctdbd.sh to start two such...
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

17 years agomerge from tridge
Ronnie sahlberg [Wed, 11 Apr 2007 05:40:03 +0000 (15:40 +1000)]
merge from tridge

17 years agoadded --num-clients option to ctdb_messaging test
Andrew Tridgell [Wed, 11 Apr 2007 05:23:50 +0000 (15:23 +1000)]
added --num-clients option to ctdb_messaging test

17 years agouse the new connect_wait code in the 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

17 years agoadd proper support for ctdb_connect_wait in daemon mode
Andrew Tridgell [Wed, 11 Apr 2007 04:54:47 +0000 (14:54 +1000)]
add proper support for ctdb_connect_wait in daemon mode

17 years agofixed sending messages to ourselves in non-daemon mode
Andrew Tridgell [Wed, 11 Apr 2007 04:26:14 +0000 (14:26 +1000)]
fixed sending messages to ourselves in non-daemon mode

17 years agomerge from ronnie, plus complete the client side of inter-node messaging
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

17 years agoadd a test that sends messages between clients connected to the same ctdb
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

17 years agopartially completed work towards full messaging system which will work in both daemon...
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

17 years agomerge from ronnie
Andrew Tridgell [Wed, 11 Apr 2007 01:11:44 +0000 (11:11 +1000)]
merge from ronnie

17 years agomerge from tridge
Ronnie sahlberg [Wed, 11 Apr 2007 01:08:20 +0000 (11:08 +1000)]
merge from tridge

17 years agoforgot to add ctdb_client.c
Andrew Tridgell [Wed, 11 Apr 2007 01:02:26 +0000 (11:02 +1000)]
forgot to add ctdb_client.c

17 years ago - add --daemon flag to ctdb_fetch test code
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

17 years agorename client.id to client.messenger_id to make the purpose of the field more obvious
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

17 years agoadd a call to register the pid for a messengin service
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

17 years agofix the queueing for partially connected tcp sockets
Andrew Tridgell [Tue, 10 Apr 2007 10:48:31 +0000 (20:48 +1000)]
fix the queueing for partially connected tcp sockets

17 years agoupdates from tridges tree
Ronnie sahlberg [Tue, 10 Apr 2007 10:25:11 +0000 (20:25 +1000)]
updates from tridges tree

17 years agomake some functions static, and remove an unused structure
Andrew Tridgell [Tue, 10 Apr 2007 09:40:29 +0000 (19:40 +1000)]
make some functions static, and remove an unused structure

17 years agomerge from ronnie
Andrew Tridgell [Tue, 10 Apr 2007 09:35:21 +0000 (19:35 +1000)]
merge from ronnie

17 years agomade all sockets handle partial IO
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

17 years agoremove old ifdef that remained from when this was a header file
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

17 years agomerge tcp changes from ronnie
Andrew Tridgell [Tue, 10 Apr 2007 04:48:13 +0000 (14:48 +1000)]
merge tcp changes from ronnie

17 years agoadded daemon mode to ctdb_bench
Andrew Tridgell [Tue, 10 Apr 2007 04:46:32 +0000 (14:46 +1000)]
added daemon mode to ctdb_bench

17 years agochange the tcp code to call ctdb_read_pdu() instead of doing the partial read thing...
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

17 years agomerge from ronnie
Andrew Tridgell [Tue, 10 Apr 2007 03:06:47 +0000 (13:06 +1000)]
merge from ronnie

17 years agofix a possible free after use
Andrew Tridgell [Tue, 10 Apr 2007 03:05:23 +0000 (13:05 +1000)]
fix a possible free after use

17 years agofix configure for new test location
Andrew Tridgell [Tue, 10 Apr 2007 02:51:54 +0000 (12:51 +1000)]
fix configure for new test location

17 years agomove the checking of the CONNECT_WAIT flag into the start method for tcp
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

17 years agorestore the test script that was updated by mistake in the previous checkin
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

17 years agoadd a CONNECT_WAIT flag to replace the call ctdb_connect_wait() since
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

17 years agoadd a atexit() call to remove the domain socket when the daemon exits
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

17 years agochange ctdb_client_read() to use the ctdb_read_pdu() helper
Ronnie sahlberg [Mon, 9 Apr 2007 22:38:29 +0000 (08:38 +1000)]
change ctdb_client_read() to use the ctdb_read_pdu() helper

17 years agomake normal/deamon mode controllable by a ctdb flag so that the api looks the same...
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)

17 years agodispatcher daemon first try.
Ronnie sahlberg [Mon, 9 Apr 2007 01:51:27 +0000 (11:51 +1000)]
dispatcher daemon   first try.

does not yet work

17 years agomerge from tridge
Ronnie sahlberg [Sun, 8 Apr 2007 02:11:48 +0000 (12:11 +1000)]
merge from tridge

17 years agoanother memory leak
Andrew Tridgell [Sat, 7 Apr 2007 00:58:14 +0000 (10:58 +1000)]
another memory leak

17 years agoremove talloc debug code
Andrew Tridgell [Sat, 7 Apr 2007 00:46:47 +0000 (10:46 +1000)]
remove talloc debug code

17 years agofixed a bunch of memory leaks
Andrew Tridgell [Sat, 7 Apr 2007 00:45:00 +0000 (10:45 +1000)]
fixed a bunch of memory leaks

17 years agoput test code in tests/ directory
Andrew Tridgell [Sat, 7 Apr 2007 00:01:09 +0000 (10:01 +1000)]
put test code in tests/ directory

17 years agoadded a magic header for wireshark and packet version info
Andrew Tridgell [Fri, 6 Apr 2007 04:41:05 +0000 (14:41 +1000)]
added a magic header for wireshark and packet version info

17 years agomerge from ronnie
Andrew Tridgell [Thu, 5 Apr 2007 23:46:45 +0000 (09:46 +1000)]
merge from ronnie

17 years agoWhen we create a tcp connection to a remote ctdb node do an explicit bind() to set...
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.

17 years agomerge from ronnies branch
Andrew Tridgell [Thu, 5 Apr 2007 03:19:06 +0000 (13:19 +1000)]
merge from ronnies branch

17 years agomerge fetch code from ronnie, and add a simple fetch test
Andrew Tridgell [Thu, 5 Apr 2007 03:18:31 +0000 (13:18 +1000)]
merge fetch code from ronnie, and add a simple fetch test

17 years agofirst test of forced migration of records. compiles but not tested.
Ronnie sahlberg [Wed, 4 Apr 2007 11:15:56 +0000 (21:15 +1000)]
first test of forced migration of records.  compiles but not tested.

17 years agotridge
Ronnie sahlberg [Wed, 4 Apr 2007 05:05:35 +0000 (15:05 +1000)]
tridge

17 years agomerge back some changes from Samba4
Andrew Tridgell [Wed, 4 Apr 2007 05:02:49 +0000 (15:02 +1000)]
merge back some changes from Samba4

17 years agomerge multi-database support from ronnie
Andrew Tridgell [Tue, 3 Apr 2007 10:13:50 +0000 (20:13 +1000)]
merge multi-database support from ronnie

17 years agoSplit CTDB into sub contexts to handle multiple concurrent databases within the same...
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.

17 years agomerged changes from peter
Andrew Tridgell [Thu, 8 Mar 2007 00:27:15 +0000 (11:27 +1100)]
merged changes from peter

17 years agoib: added external send queue to workaround downtime
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.

17 years agomerged tridge's code
Peter Somogyi [Thu, 22 Feb 2007 17:25:18 +0000 (18:25 +0100)]
merged tridge's code

17 years agoadded --num-msgs option
Andrew Tridgell [Tue, 20 Feb 2007 03:57:13 +0000 (14:57 +1100)]
added --num-msgs option
added TCP_NODELAY on tcp sockets

17 years agoadded rest of tdb (missed in earlier commit)
Andrew Tridgell [Tue, 20 Feb 2007 02:24:45 +0000 (13:24 +1100)]
added rest of tdb (missed in earlier commit)

17 years agoignored some files
Andrew Tridgell [Tue, 20 Feb 2007 02:23:43 +0000 (13:23 +1100)]
ignored some files

17 years agoadded a benchmark script that launches via ssh
Andrew Tridgell [Tue, 20 Feb 2007 02:23:01 +0000 (13:23 +1100)]
added a benchmark script that launches via ssh

17 years agosupport hostnames for node names
Andrew Tridgell [Tue, 20 Feb 2007 02:22:18 +0000 (13:22 +1100)]
support hostnames for node names

17 years agoworkaround proposal for the initialization-problem
Peter Somogyi [Fri, 16 Feb 2007 14:21:31 +0000 (15:21 +0100)]
workaround proposal for the initialization-problem

17 years agomerged tridge's fix
Peter Somogyi [Fri, 16 Feb 2007 14:20:36 +0000 (15:20 +0100)]
merged tridge's fix

17 years agofixed incr initialisation
Andrew Tridgell [Fri, 16 Feb 2007 03:48:27 +0000 (14:48 +1100)]
fixed incr initialisation

17 years agomerged peters IB work
Andrew Tridgell [Fri, 16 Feb 2007 03:41:45 +0000 (14:41 +1100)]
merged peters IB work

17 years ago1st working ib integrated ctdb
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)

17 years agoib: a trivial approach of integration
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)

17 years agoSome minor changes before integrating ib...
Peter Somogyi [Mon, 12 Feb 2007 15:47:12 +0000 (16:47 +0100)]
Some minor changes before integrating ib...

17 years agoMerged tridge's code.
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.)

17 years agoib: adjustment of a test scenario
Peter Somogyi [Fri, 9 Feb 2007 17:06:13 +0000 (18:06 +0100)]
ib: adjustment of a test scenario

17 years agoadded a simple benchmark script
Andrew Tridgell [Fri, 9 Feb 2007 01:46:16 +0000 (12:46 +1100)]
added a simple benchmark script

17 years agochanged ctdb_bench.c to use messages instead of calls
Andrew Tridgell [Fri, 9 Feb 2007 01:45:58 +0000 (12:45 +1100)]
changed ctdb_bench.c to use messages instead of calls

17 years agomerged ib work from peter
Andrew Tridgell [Thu, 8 Feb 2007 22:54:21 +0000 (09:54 +1100)]
merged ib work from peter

17 years agoignore config.h*
Andrew Tridgell [Thu, 8 Feb 2007 22:47:53 +0000 (09:47 +1100)]
ignore config.h*

17 years agomerged ctdb messaging code from samba4
Andrew Tridgell [Thu, 8 Feb 2007 22:42:04 +0000 (09:42 +1100)]
merged ctdb messaging code from samba4

17 years agomerged tridge's code
Peter Somogyi [Thu, 8 Feb 2007 18:08:58 +0000 (19:08 +0100)]
merged tridge's code

17 years agoib: fragment sent buf + many bugfixes
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.

17 years agomerged from samba4 ctdb
Andrew Tridgell [Wed, 7 Feb 2007 02:26:07 +0000 (13:26 +1100)]
merged from samba4 ctdb

17 years agoAdded variable msg size scenario.
Peter Somogyi [Fri, 2 Feb 2007 17:54:57 +0000 (18:54 +0100)]
Added variable msg size scenario.
Detected 1 bug, fixing...

17 years ago2 bugfixes
Peter Somogyi [Thu, 1 Feb 2007 17:46:44 +0000 (18:46 +0100)]
2 bugfixes
- ibw_stop handling
- ibw_send: < instead of <=

17 years agomerging tridge's code...
Peter Somogyi [Wed, 31 Jan 2007 11:24:55 +0000 (12:24 +0100)]
merging tridge's code...

17 years agoAdded overload test scenario + fixed 1 send queue bug.
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

17 years agomerge status code changes from samba4 ctdb
Andrew Tridgell [Mon, 29 Jan 2007 11:30:06 +0000 (22:30 +1100)]
merge status code changes from samba4 ctdb

17 years agofix a bug in new structure handling
Andrew Tridgell [Mon, 29 Jan 2007 11:11:16 +0000 (22:11 +1100)]
fix a bug in new structure handling

17 years agoAdjusted debug level and test scenario.
Peter Somogyi [Fri, 26 Jan 2007 15:45:51 +0000 (16:45 +0100)]
Adjusted debug level and test scenario.

17 years agoAdjusted ib test tool #1.
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.

17 years agoFixed a side effect of previous revert.
Peter Somogyi [Thu, 25 Jan 2007 13:22:03 +0000 (14:22 +0100)]
Fixed a side effect of previous revert.

17 years agoMerged tridge's branch.
Peter Somogyi [Thu, 25 Jan 2007 11:31:33 +0000 (12:31 +0100)]
Merged tridge's branch.
Reverted ib join (will do later).

17 years ago1st "working" ib version.
Peter Somogyi [Thu, 25 Jan 2007 10:01:59 +0000 (11:01 +0100)]
1st "working" ib version.
TODO: stress test, variable size messages, flood

17 years agosimplified ctdb_call() interface, and made it easier to expand with more parameters...
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

17 years agouse ctdb_call_info, so struct ctdb_call can be used for top level call
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

17 years agomerge db wrap code from samba4
Andrew Tridgell [Thu, 25 Jan 2007 04:11:36 +0000 (15:11 +1100)]
merge db wrap code from samba4