Andrew Tridgell
6402915bb6
merge from vl
...
(This used to be ctdb commit 8b5233fbe773893d1bc6b377f8956fe0b3e503ab)
2007-04-12 10:51:55 +10:00
Ronnie sahlberg
51c660d1a1
add an example on how to read a message from the domain socket
...
(This used to be ctdb commit 9723828b1562eb6a386eb26e63db3b6617ebb454)
2007-04-12 09:09:27 +10:00
Ronnie sahlberg
e18ed8cc84
do an infinite loop calling event_loop_once() in the ctdbd parent process instead of event_loop_wait() since the latter will return and thus take down the daemon
...
(This used to be ctdb commit 26ffd166c176deb7e2437f3ee87887f8b57435e7)
2007-04-12 08:44:15 +10:00
Ronnie sahlberg
5370e677ec
add a test message to the messaging test so we can see that the message data is also passed from originator to receiver
...
(This used to be ctdb commit f9c2ed3cff8eb481bfa80d944d86233e2a7d5d00)
2007-04-12 08:28:54 +10:00
Volker Lendecke
d8dd8fbe49
Rename "private" to "private_data"
...
(This used to be ctdb commit 78cf4443ac0c66fb750ef6919bcdec189ac219c9)
2007-04-11 20:12:15 +02:00
Volker Lendecke
a5d1b2ce48
Merge tridge's tree
...
(This used to be ctdb commit 63a59a700a1fb4c23cd76d99c5b4c9660c7ca475)
2007-04-11 16:52:06 +02:00
Volker Lendecke
6961f32eb7
Add a test to read back the message
...
Volker
(This used to be ctdb commit b7f134fe6e160d7ec70c466f8f3e7fb3dabd0774)
2007-04-11 16:51:25 +02:00
Andrew Tridgell
230c1a75d1
use event_loop_wait instead of while(1)
...
(This used to be ctdb commit e49a6436483bffcf867fbb746ef43a5356055857)
2007-04-11 22:21:43 +10:00
Andrew Tridgell
2aa26b0ae7
use lib/replace for signal.h
...
(This used to be ctdb commit 4c660b9706ef09527b8e1a2837d844d30672c541)
2007-04-11 22:19:46 +10:00
Volker Lendecke
6f2b236909
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.
(This used to be ctdb commit bd10f4e62146493848258df8a3dc3b9222337a12)
2007-04-11 13:17:36 +02:00
Volker Lendecke
f2d13d0ea9
Fix uninitialized variable warnings
...
(This used to be ctdb commit b84f97adfd25b2fbfab1c7964b68931643e8029c)
2007-04-11 12:49:10 +02:00
Ronnie sahlberg
6e2463e5c7
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.
(This used to be ctdb commit 9d8821bfd1456591fb5c31f0c6c3fd63e99dc4fb)
2007-04-11 20:32:24 +10:00
Ronnie sahlberg
fbb1d9e50d
add call/reply parsing of the cluster connect-wait call to the test daemon.
...
(This used to be ctdb commit c54c87feb89b8d97655c1fcd748a295119a1171f)
2007-04-11 19:27:19 +10:00
Ronnie sahlberg
153bf81026
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
(This used to be ctdb commit 57fd1aa54b234545e1e465b5ace2ce93fcfbc22a)
2007-04-11 19:04:09 +10:00
Ronnie sahlberg
4b6fbe7be1
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
(This used to be ctdb commit 801f6127cdd50c5b2d0e64dd8db08500af9dadc9)
2007-04-11 18:54:22 +10:00
Andrew Tridgell
a91412cb04
added --num-clients option to ctdb_messaging test
...
(This used to be ctdb commit 2f4e7e34071c8950f6c4d64469c5eb15d0888113)
2007-04-11 15:23:50 +10:00
Andrew Tridgell
06e4f9b968
use the new connect_wait code in the ctdb_messaging test
...
(This used to be ctdb commit 36980878141c5e506dd7ee021fba6ca7d0ff5ad3)
2007-04-11 15:09:22 +10:00
Andrew Tridgell
8386b0e345
add proper support for ctdb_connect_wait in daemon mode
...
(This used to be ctdb commit 8d110df5939b3e6a6341909956453887f4eb6b0d)
2007-04-11 14:54:47 +10:00
Andrew Tridgell
d5584e5611
fixed sending messages to ourselves in non-daemon mode
...
(This used to be ctdb commit 325afd2de2f5a96fb4f8ec624e04f253c712c97d)
2007-04-11 14:26:14 +10:00
Andrew Tridgell
c658d5c1e8
merge from ronnie, plus complete the client side of inter-node messaging
...
(This used to be ctdb commit e605417436855d22343462acae4cbb79a374977e)
2007-04-11 14:05:01 +10:00
Ronnie sahlberg
185cd326da
add a test that sends messages between clients connected to the same ctdb
...
add code to actually pass the messages between clients and ctdb
(This used to be ctdb commit 6d5b55d7b9c611fb5e98765906757a7d82e4bf6b)
2007-04-11 13:43:15 +10:00
Andrew Tridgell
ad1f17ab1c
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
...
(This used to be ctdb commit 1b5e65a700e2bd0a5c913d7866024b25600a14c9)
2007-04-11 11:58:28 +10:00
Ronnie sahlberg
7821b985a5
merge from tridge
...
(This used to be ctdb commit a027d468f39fdd95a4bd03e26da90eb229b2a645)
2007-04-11 11:08:20 +10:00
Andrew Tridgell
2daf1d3006
forgot to add ctdb_client.c
...
(This used to be ctdb commit 136f912562ef00ede5589a7aa080503538d14bc3)
2007-04-11 11:02:26 +10:00
Andrew Tridgell
110fe0c5a5
- 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
(This used to be ctdb commit 53555db45f3583ae4a32cc3aa9e07fb8ef2a77e3)
2007-04-11 11:01:42 +10:00
Ronnie sahlberg
2a0d8c9f0d
rename client.id to client.messenger_id to make the purpose of the field more obvious
...
(This used to be ctdb commit 350f14909d5dba6cd9d76d221e263933926cea6c)
2007-04-10 21:14:55 +10:00
Ronnie sahlberg
5cf568c3ca
add a call to register the pid for a messengin service
...
store this pid inside the client structure in the ctdb daemon
(This used to be ctdb commit d4499c5e0403b0348fa36b259164b1cbfcd671b8)
2007-04-10 21:05:29 +10:00
Andrew Tridgell
902967249c
fix the queueing for partially connected tcp sockets
...
(This used to be ctdb commit 55f1c2442a53a547302669a4fdd0f1c1deeed930)
2007-04-10 20:48:31 +10:00
Andrew Tridgell
5861917468
make some functions static, and remove an unused structure
...
(This used to be ctdb commit 8d09cac96b2c604a68e4903346cc9db3a66d80da)
2007-04-10 19:40:29 +10:00
Andrew Tridgell
82e4ccbf3e
merge from ronnie
...
(This used to be ctdb commit 886a3e9122168ececc257aa1bef2f5de2f2d8d7e)
2007-04-10 19:35:21 +10:00
Andrew Tridgell
f1e0174e83
made all sockets handle partial IO
...
abstract IO via ctdb_queue_*() functions
(This used to be ctdb commit 636ae76f4632b29231db87be32c9114f58b37840)
2007-04-10 19:33:21 +10:00
Ronnie sahlberg
9ba0f9db6f
remove old ifdef that remained from when this was a header file
...
(This used to be ctdb commit 050f302103b32ea3895fc97dae7726f11fbf01e3)
2007-04-10 14:53:23 +10:00
Andrew Tridgell
82b712d80f
merge tcp changes from ronnie
...
(This used to be ctdb commit 18d6e58b92f59f18cd7772cdbc1b8812a8609ab4)
2007-04-10 14:48:13 +10:00
Andrew Tridgell
4f0ea10fb3
added daemon mode to ctdb_bench
...
(This used to be ctdb commit b1e71018866752d32f59170fd5c8ba01b05694d9)
2007-04-10 14:46:32 +10:00
Ronnie sahlberg
f2e2d1c2f3
change the tcp code to call ctdb_read_pdu() instead of doing the partial read thing explicitely
...
(This used to be ctdb commit 6156bec0187df27578afd5afa3fcaadb1a202030)
2007-04-10 13:17:15 +10:00
Andrew Tridgell
e5fc2d4062
merge from ronnie
...
(This used to be ctdb commit fb06332c246e9f8b98a6391b4eda183e2f03333f)
2007-04-10 13:06:47 +10:00
Andrew Tridgell
9958ded5eb
fix a possible free after use
...
(This used to be ctdb commit 55bc7ee10b9e9df32792b6b5779f094eb513069e)
2007-04-10 13:05:23 +10:00
Andrew Tridgell
9f7ae0f891
fix configure for new test location
...
(This used to be ctdb commit e516ea4714ae0b84ae6073201fbe297dd49b8c51)
2007-04-10 12:51:54 +10:00
Ronnie sahlberg
91c39b4852
move the checking of the CONNECT_WAIT flag into the start method for tcp
...
(This used to be ctdb commit 44f3e4456d931af642192e034f84c961ab1fdcf0)
2007-04-10 12:39:25 +10:00
Ronnie sahlberg
1f3f0ae56d
restore the test script that was updated by mistake in the previous checkin
...
(This used to be ctdb commit 5e2e6a5ce439762876f2aa054fdd0d4bb54c403c)
2007-04-10 12:23:10 +10:00
Ronnie sahlberg
b84ade51db
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
(This used to be ctdb commit 74d35dafe06d71e755f3a58cc58d4b9b56fc821b)
2007-04-10 12:18:58 +10:00
Ronnie sahlberg
31ffe0af35
add a atexit() call to remove the domain socket when the daemon exits
...
(This used to be ctdb commit 2f685c68e0b17ed8a290a265ebd64c1d089ceec5)
2007-04-10 08:47:39 +10:00
Ronnie sahlberg
c7e54e1437
change ctdb_client_read() to use the ctdb_read_pdu() helper
...
(This used to be ctdb commit d476aa8533b394af6aced9c80fffaf0eefae1dd0)
2007-04-10 08:38:29 +10:00
Ronnie sahlberg
190b97f0ed
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)
(This used to be ctdb commit f4593754cab750dfdb9384884502e2e1b8fde1f0)
2007-04-10 06:03:39 +10:00
Ronnie sahlberg
b384019536
dispatcher daemon first try.
...
does not yet work
(This used to be ctdb commit ff428808c6546d6f2804a1ac1cf414d1bb9cdcb4)
2007-04-09 11:51:27 +10:00
Andrew Tridgell
76c666fe52
another memory leak
...
(This used to be ctdb commit 10466fe11da71c93fa764bea2b3e1e741c113f9c)
2007-04-07 10:58:14 +10:00
Andrew Tridgell
3e198a567b
remove talloc debug code
...
(This used to be ctdb commit d883c1bbd4d3691a0787d37c226051f4fce4d45d)
2007-04-07 10:46:47 +10:00
Andrew Tridgell
01c4a086e7
fixed a bunch of memory leaks
...
(This used to be ctdb commit 2ba2522f2def3032c89c7973915610a245842b07)
2007-04-07 10:45:00 +10:00
Andrew Tridgell
7074b3c94c
put test code in tests/ directory
...
(This used to be ctdb commit 6dbb36f27dd0f8ac00c7a010108d4fba15753479)
2007-04-07 10:01:09 +10:00
Andrew Tridgell
eb73358691
added a magic header for wireshark and packet version info
...
(This used to be ctdb commit 8366c212bde710dd46c8c1d9d4301f6c3738e300)
2007-04-06 14:41:05 +10:00