Andrew Tridgell
e830dfd18d
much simpler fetch code!
...
fetch is now confined to the client code, no spcial code at
all in the daemon.
(This used to be ctdb commit 3ec801c9717e250b902760862df188e03c9bdbf4)
2007-04-19 11:56:37 +10:00
Andrew Tridgell
d0af75d1fa
- fully separate the client version of ctdb_call from the daemon
...
version. The client version is different enough that this is
worthwhile
- enable local shortcut for client version of ctdb_call
- add idr_find_type(), with better error reporting in case of type
mismatch
(This used to be ctdb commit 2388094c5f7b6ce003e86b05620c06217d63b49c)
2007-04-19 11:28:01 +10:00
Andrew Tridgell
b79e29c779
- make he packet allocation routines take a mem_ctx, which allows
...
us to put memory directly in the right context, avoiding quite a few
talloc_steal calls, and simplifying the code
- make the fetch lock code in the daemon fully async
(This used to be ctdb commit d98b4b4fcadad614861c0d44a3854d97b01d0f74)
2007-04-19 10:37:44 +10:00
Ronnie sahlberg
697126e61f
ctdbd does no longer take a --daemon parameter since we no longer do non-daemon mode
...
remove the parameter from the ctdbd script
remove the store_unlock from ctdbd_test since there is no and will be no pdu for this
CTDB_REPLY_FETCH_LOCK no longer return the data for the record since the client is assumed to read this itself from the local tdb. remove some variables that no longer exists.
(This used to be ctdb commit 77c43479e1932b27387fc2f85a3cb6538633b481)
2007-04-19 10:24:11 +10:00
Andrew Tridgell
fde5a66531
avoid a deadlock the fetch_lock code. The deadlock could happen when
...
a client held the chainlock, and the daemon received a dmaster reply
at the same time. The daemon would not be able to process the dmaster
reply, due to the lock, but the fetch lock cannot make progres until
the dmaster reply is processed.
The solution is to not hold the lock in the client while talking to
the daemon. The client has to retry the lock after the record has
migrated. This means that forward progress is not guaranteed. We'll
have to see if that matters in practice.
(This used to be ctdb commit 737e5a1253cb048222c595a474aff71c99fc554f)
2007-04-19 10:03:20 +10:00
Andrew Tridgell
a3ab61b384
- use separate directories for the tdb files by default
...
- use TDB_CLEAR_IF_FIRST to ensure we don't use an old tdb
(This used to be ctdb commit ac47d7b4eb79597da1358da21f10e634cdc9dd2e)
2007-04-19 09:58:23 +10:00
Andrew Tridgell
36816ee12a
merged the db_dir changes from volker. Changed them slightly,
...
to make the --dbdir option available to all ctdb tools, not just
the daemon
(This used to be ctdb commit add63b0ae11d8727163bb6f0c94a617d9b88ef28)
2007-04-19 09:14:25 +10:00
Volker Lendecke
9135024fc7
Add --dbdir to ctdbd. Necessary for shared operation between ctdbd and smbd.
...
(This used to be ctdb commit bce40105e2ccbca5e364793bbf1a6357e6dd69b2)
2007-04-18 16:36:22 +02:00
Andrew Tridgell
31e2331608
this fixes a timeout error spotted by volker
...
It ensures that when the client context goes away (such as when the client exits)
that any timed events and partially completed requests from that client also go away
(This used to be ctdb commit 45a45a0a44d4da9b45719aac72b0ae4bd4c74462)
2007-04-18 19:12:29 +10:00
Andrew Tridgell
ef505399e6
merged cleanup from ronnie
...
(This used to be ctdb commit 26037a7b3557faa1c10944f654b1465877c6b840)
2007-04-18 18:43:34 +10:00
Andrew Tridgell
908f5085b0
validate dmaster on a client fetch request
...
(This used to be ctdb commit b49069aac0c14e5a02be843247930c197d620a81)
2007-04-18 18:39:02 +10:00
Ronnie sahlberg
8dc428d63d
we dont need the structure ctdb_reply_shutdown since we dont implement that pdu any more
...
(This used to be ctdb commit 5bac32b3daf3c61214269cd09cfc1b6c3f8c3d6e)
2007-04-18 17:04:26 +10:00
Andrew Tridgell
ddf430b2f2
simpler shutdown process. The reply is not actually needed, and
...
occasionally leads to problems if an immediate send on the socket
causes a context switch and the client exiting before the daemon. We
now exit the client when the daemon goes away.
(This used to be ctdb commit b7bed0088e700f25105ceea63640b38804f51e4d)
2007-04-18 15:35:41 +10:00
Andrew Tridgell
0029883c0b
use shutdown in more tests
...
(This used to be ctdb commit 150153947b959f90991fdae8d7c85ef8d551dff5)
2007-04-18 15:27:38 +10:00
Andrew Tridgell
7060030889
make sure we don't double free in the async lock handler
...
(This used to be ctdb commit 67d3e64f82fd71ff1e32bf377d0cf1f636b9602f)
2007-04-18 15:27:26 +10:00
Andrew Tridgell
a4bbc88cf1
- merge from ronnie, and use wait instead of sleep in test scripts
...
(This used to be ctdb commit 6e6812641e3ce7afae7bd46ed317a885839fdd4f)
2007-04-18 14:42:02 +10:00
Ronnie sahlberg
adb4becfb7
add/finish the ctdb_shutdown() function.
...
this function can be used in test applications to perform an orderly shutdown of the ctdb cluster once the test has completed.
the ctdb nodes will remain operational until all of them have received a shutdown from their client(s) after which the ctdb daemons will all terminate.
this eliminates the need to using sleep() in some of the test applications
(This used to be ctdb commit f35db69dc190b11659aad85495bb66308fdb5599)
2007-04-18 14:08:45 +10:00
Andrew Tridgell
f57793077f
merge fetch1 changes from ronnie
...
(This used to be ctdb commit 906419acf121ea93661f91bde65cdcd890f70e63)
2007-04-18 12:39:12 +10:00
Ronnie sahlberg
e390c925c1
initial shutdown function where a client can request an orderly shutdown of a ctdb cluster
...
(This used to be ctdb commit 00d2748bd4e7209ff7e253f6652fdd9bf16cf147)
2007-04-18 12:39:03 +10:00
Andrew Tridgell
7a02b09b01
started adding a cleaner daemon finish method
...
(This used to be ctdb commit 5ef0cd83d7f24616dad85cece485b770376ecd45)
2007-04-18 11:55:54 +10:00
Ronnie sahlberg
c6f2050e05
merge from tridge
...
(This used to be ctdb commit e83db4d76ea498413ba4314e937d0ff298bd4cb6)
2007-04-18 11:33:19 +10:00
Andrew Tridgell
aac20642b2
bit less verbose when client exits
...
(This used to be ctdb commit a6477577beba71bd9185b968de43b763378f234b)
2007-04-18 11:33:16 +10:00
Andrew Tridgell
8f059f4d91
- merge volkers debug changes
...
- fixed memory leaks in the 3 packet receive routines. The problem was
that the ctdb_call logic would occasionally complete and free a
incoming packet, which would then be freed again in the packet
receive routine. The solution is to make the packet a child of a
temporary context in the receive routine then free that temporary
context. That allows other routines to keep or free the packet if
they want to, while allowing us to safely free it (via a free of the
temporary context) in the receive function
(This used to be ctdb commit 304aaaa7235febbe97ff9ecb43875b7265ac48cd)
2007-04-18 11:20:24 +10:00
Ronnie sahlberg
1739dbd317
enhance fetch1 test to verify that a lock is released when a client terminates while holding the lock and the next blocked waiting client is assigned the lock
...
(This used to be ctdb commit 927228299280779664683fca04a7f76b55bef813)
2007-04-18 10:38:11 +10:00
Volker Lendecke
27837c197a
Clean up the call_states correctly
...
(This used to be ctdb commit 9fcc40a2ddd8f7f62bdd8b5ab71d182220e23af0)
2007-04-17 23:40:33 +02:00
Volker Lendecke
ed32ad028c
Be less verbose
...
(This used to be ctdb commit 7497b5a9031c471c25bf6029c436fd82788b415c)
2007-04-17 23:06:10 +02:00
Volker Lendecke
84d276a5be
Some more debug and two memleak fixes
...
(This used to be ctdb commit 1e2802422794956827263265306952df5e69b377)
2007-04-17 23:03:30 +02:00
Volker Lendecke
6c597d3e83
typo
...
(This used to be ctdb commit bf2799504498ae452bb7244ae3eb6a51797afe9b)
2007-04-17 21:23:22 +02:00
Volker Lendecke
3057f683f3
Add timestamps to debug output.
...
(This used to be ctdb commit 197a02384bd2ca42dfff4c0357175424d2321e9c)
2007-04-17 17:59:39 +02:00
Andrew Tridgell
98bb60e9d6
add debug tracing to fetch_lock
...
(This used to be ctdb commit b58d2ae0e4ef3393a93724526f2aebc7529de14f)
2007-04-17 22:39:23 +10:00
Andrew Tridgell
8a7b573320
more DEBUG() calls
...
(This used to be ctdb commit 79f3d63eec5652d87f13875c76e90ead81a26ad9)
2007-04-17 22:27:17 +10:00
Andrew Tridgell
1e2d91c761
moved cmdline.c to common code
...
(This used to be ctdb commit 32b31a6b91a19fc0c5225cb88c35cc1d14b4a6df)
2007-04-17 22:16:50 +10:00
Andrew Tridgell
7758511568
use the common cmdline code in ctdbd
...
add a basic debug system with -dXX
(This used to be ctdb commit af9f21cef79f888c57d3b50a23ca787c9567ce60)
2007-04-17 22:13:06 +10:00
Andrew Tridgell
0d91f8043e
fixed a missing idr remove, and check the types after idr_find()
...
(This used to be ctdb commit 74028de89d18bfedcea17415d6d6dc2f7c69b076)
2007-04-17 20:03:01 +10:00
Andrew Tridgell
fb84d56b1b
make sure we notify ctdb when a node dies
...
(This used to be ctdb commit 598feb4fb9badcf329837965ad39e0f0dfe28498)
2007-04-17 19:41:29 +10:00
Volker Lendecke
748cc9e4b7
ZERO_STRUCT writes one byte too many here.
...
(This used to be ctdb commit 3c5c433e5b92f8fe2193a6e5720e31e3eb6bc76b)
2007-04-17 09:36:53 +02:00
Andrew Tridgell
6fce6e419a
update destination in a redirect reply
...
(This used to be ctdb commit b2836974ad270e823c630e3acf12327b53c37d88)
2007-04-17 17:11:12 +10:00
Andrew Tridgell
5d8bf8e781
stop the client looping (temporary measure)
...
(This used to be ctdb commit 8e6a25f4c4a63145c0dee33453a0693dd395ee68)
2007-04-17 17:10:50 +10:00
Andrew Tridgell
eba2a4b88c
start using ctdb_ltdb_lock_fetch_requeue()
...
(This used to be ctdb commit f89ab3a06b4677f56c92768c3a8ae5ec9f5abbc2)
2007-04-17 16:54:03 +10:00
Andrew Tridgell
1a1aedf78f
when we get a lmaster request, skip updating the header when we are also the new dmaster
...
(This used to be ctdb commit 6c48dcc5df7b855fc8e0774c9572c7b2af618348)
2007-04-17 16:35:28 +10:00
Andrew Tridgell
040e69c1c4
we should not lock in a normal ctdb_call(), as we want them to run concurrently
...
(This used to be ctdb commit f4c8c4b3d4c6fb8f1b8e770d1788816af74a7e1f)
2007-04-17 16:34:53 +10:00
Andrew Tridgell
296b0c2a20
- send the record header from the client to the daemon when doing a
...
fetch, to avoid the daemon re-reading it
- suffix the database name with the node name so that testing on
loopback doesn't result in a name collision in the database open
(This used to be ctdb commit ad30a4db75450643ff146c40faa306a021de3dd2)
2007-04-17 16:20:32 +10:00
Andrew Tridgell
ae6722e845
make sure we unlock
...
(This used to be ctdb commit c09054f878a88129abb6cce24c7bbf53f61a2648)
2007-04-17 15:33:58 +10:00
Andrew Tridgell
b87de399f2
block SIGPIPE in the daemon to prevent a SIGPIPE on write to a dead socket
...
(This used to be ctdb commit 02c09dc07c9bed57ca3692b14e41ac8cca0a29f4)
2007-04-17 15:33:20 +10:00
Andrew Tridgell
5299b7e0e2
now that both daemon and client access the database, it needs to be a real disk file
...
(This used to be ctdb commit 5159f3a61f41bbaf563edd8d901a6bf5bfee4e4e)
2007-04-17 15:32:49 +10:00
Andrew Tridgell
3a3bac80b9
tidyups in test code
...
(This used to be ctdb commit 43061a4cf9b0995ebe6c86e27f7fc3aacb7bb23e)
2007-04-17 15:01:42 +10:00
Andrew Tridgell
6f9b29da22
- removed the non-daemon mode from ctdb, in order to simplify the
...
code. It may be added back later once everything is working nicely,
or simulated using a in-process pipe instead of a unix domain socket
- rewrote the ctdb_fetch_lock() code to follow the new design
(This used to be ctdb commit 5024dd1f305fe1ecc262db2240c56f773b4f28f0)
2007-04-17 14:52:51 +10:00
Ronnie sahlberg
bccf3c7e8e
create symbols for fetch lock response status
...
(This used to be ctdb commit d8243f474897dc65fb7286225b07bdf48b6faed0)
2007-04-17 12:42:52 +10:00
Ronnie sahlberg
11b5345afc
finalize fetch lock changes to get rid of the record handle
...
(This used to be ctdb commit 36c1e98a5533214d5507699dc5d8bdec35cb28c2)
2007-04-17 12:36:31 +10:00
Ronnie sahlberg
e5fff3d611
do not use a ctdb_record_handle for client fetch_lock/store_unlock any more
...
change ctdb_client_fetch_lock to return a status code instead of a record handle and make it unconditionally fill in data.
change ctdb_client_store_unlock to take ctdb_db and key as arguments instead of a record handle
update the ctdb_fetch.c test to use the clientside helpers for fetching and storing data
(This used to be ctdb commit 22d5d40375e0135916c97945646f94119612615d)
2007-04-17 12:22:17 +10:00
Ronnie sahlberg
45660a3c48
remaning code to finish lock_fetch/store_unlock clientside helpers
...
(This used to be ctdb commit edf1e1fea8500461a08cd2795251a5cc0bd10229)
2007-04-17 11:48:27 +10:00
Ronnie sahlberg
481e029768
initial change to remove store_unlock pdu and use tdb chainlock in the client
...
(This used to be ctdb commit 87dd265d2c61125ca2fa922cfcf9371a234fff0c)
2007-04-17 11:34:45 +10:00
Andrew Tridgell
80ec427ec7
merge from ronnie
...
(This used to be ctdb commit fcf3669c27691ddb383d1c585234622efa498d90)
2007-04-17 11:30:19 +10:00
Andrew Tridgell
3c2ebff3cb
partial merge from volker (some overlaps removed)
...
(This used to be ctdb commit c4747460a8e0017acfd2a97a632ecd9395562d4f)
2007-04-17 11:26:59 +10:00
Andrew Tridgell
3fc279760c
better error handling in ctdb_ltdb_lock_fetch_requeue()
...
(This used to be ctdb commit 1952be19f625dbe257050acebf468e7e6eb0da8c)
2007-04-17 11:20:00 +10:00
Ronnie sahlberg
ee9712620f
change some error printouts to make it easier to determine whether the error occured in the client or in the daemon
...
(This used to be ctdb commit a7e42c2c56e38b4b58ede0ad45767695d704dac4)
2007-04-17 10:15:44 +10:00
Andrew Tridgell
71bf837a19
add an explanation of ctdb_ltdb_lock_fetch_requeue()
...
(This used to be ctdb commit 7c749315130a2bc87dcc07460d10dcb089ae4202)
2007-04-17 09:18:20 +10:00
Andrew Tridgell
a024989597
add an explanation of how to use ctdb_lockwait()
...
(This used to be ctdb commit e0c9844ea6270ff506b0b5906aa6ccfcc3bcce7a)
2007-04-17 09:14:52 +10:00
Andrew Tridgell
7db4320e84
fixed crash bug - thanks volker
...
(This used to be ctdb commit e293f6fadf673d8bc7203198d709bcb28c26b482)
2007-04-17 09:10:52 +10:00
Andrew Tridgell
4c787fdff5
darn, forgot this
...
(This used to be ctdb commit 0feb5da60c0331f6c391622910ca1f436263ce46)
2007-04-17 07:41:27 +10:00
Peter Somogyi
a32fa3451d
merged tridge's branch
...
(This used to be ctdb commit 15e18293eaa5ddcd325395213014b5a4498ca309)
2007-04-16 16:28:29 +02:00
Andrew Tridgell
fca41760e3
wait on the right fd ....
...
(This used to be ctdb commit 27b67ee6576b17f8b3aae024ae3bd0bb1c42f0f2)
2007-04-17 00:11:04 +10:00
Andrew Tridgell
8147d033a3
added a ctdb_ltdb_lock_fetch_requeue() function
...
this will be the core of the non-blocking lock idea for ctdb, it will be used
in place of ctdb_ltdb_fetch(), but will also get a lock. It re-starts a request
if it needs to block
(This used to be ctdb commit afa479026cf6293e6a878c8a329cdac035284672)
2007-04-16 23:52:14 +10:00
Andrew Tridgell
7aa68f96f7
added a tdb_chainlock_nonblock() call to tdb
...
(This used to be ctdb commit 6587bdca71d97709c9271a73aea0be5a2a35f399)
2007-04-16 23:03:36 +10:00
Andrew Tridgell
8d2501e025
merge local copy of tdb from samba4 tdb
...
(This used to be ctdb commit d4619ce98ce44acaebeb6ae9c516a7917bf4e27f)
2007-04-16 22:52:58 +10:00
Andrew Tridgell
b3ed006ef4
fixed a fd bug (thanks volker)
...
(This used to be ctdb commit 512a96de1b31e856785749ffc0bed60b1c589f9e)
2007-04-16 22:49:37 +10:00
Andrew Tridgell
07ade5e488
this is a demonstration of an idea for handling locks in ctdb.
...
The problem we have is this:
- we want the client smbd processes to be able to 'shortcut' access
to the ltdb, by directly accessing the ltdb, and if the header of
the record shows we are the dmaster then process immediately, with
no overhead of talking across the unix domain socket
- a client doing a shortcut will use tdb_chainlock() to lock the
record while processing
- we want the main ctdb daemon to be able to set locks on the
record, and when those locks collide with a 'shortcut' fcntl lock,
we want the ctdb daemon to keep processing other operations
- we don't want to have to send a message from a smbd client to the
ctdbd each time it releases a lock
The solution is shown in this example. Note that the expensive fork()
and blocking lock is only paid in case of contention, so in the median
case I think this is zero cost.
(This used to be ctdb commit a3248c3e2b740cd2403acffd3c1f6a33dca0ea03)
2007-04-16 16:01:37 +10:00
Andrew Tridgell
9cc94483de
merged from samba4
...
(This used to be ctdb commit 541814e6ee3dd7f8f1b3fb615213ff5979b6e22f)
2007-04-16 14:13:10 +10:00
Andrew Tridgell
36cfd2cc64
pull out common command line code for tests into tests/cmdline.c
...
(This used to be ctdb commit de3db72c1fd0e56ac2b8d8fe962c725dc64f2051)
2007-04-16 14:12:50 +10:00
Andrew Tridgell
f62bb4e8fc
merge CTDB_SRVID_ALL patch from Samba4
...
(This used to be ctdb commit 43cd05ab58e940a1ef0352aabe0b63075264a7a0)
2007-04-16 10:31:39 +10:00
Andrew Tridgell
34bf25e227
- fix includes to work in both samba4 and ctdb standalone
...
- when we do a store_unlock the lock record becomes unlocked, so we
must destroy it (or we leak memory)
(This used to be ctdb commit d85955640e670dd580073da96b25fb8a10c08d18)
2007-04-16 10:21:44 +10:00
Andrew Tridgell
5f592876d1
added --dblist option to ctdbd, to allow list of databases to be specified on the command line
...
(This used to be ctdb commit a19df59e9c2ea24d92a483f8a44514f492d49601)
2007-04-16 09:29:10 +10:00
Ronnie sahlberg
18595074d3
add code to fetch1 test to tell the two child processes one at a time to fetch_lock the same record
...
they both successfully fetch and lock the same record at this stage but when the actual locking works properly the second child will block.
this test allows us to verify the blocking once we have implemented it
(This used to be ctdb commit b1c0baa03a669757aaacb6e1a2794224f5ba2cd7)
2007-04-16 08:37:27 +10:00
Ronnie sahlberg
01c12982a6
add examples for volker on how to do fetchlock/storeunlock
...
note that the actual locking/unl;ocking does not still work
(This used to be ctdb commit 45505520a69a2fbbb1e3a015b54d2133924f46a4)
2007-04-15 14:39:23 +10:00
Ronnie sahlberg
fc866963fa
update to fetch1.sh test
...
there is still a bug in the ctdb code in that the children no longer receive messages from the parent for unknown reasons
(This used to be ctdb commit 468f68e4607900c5c38aea428a48dd6ea1647411)
2007-04-15 14:02:39 +10:00
Ronnie sahlberg
9f7d98380b
merge from tridge
...
(This used to be ctdb commit 9c4e5569b82d9c7894e3ac1d5f0783c4d770daf4)
2007-04-13 21:10:20 +10:00
Andrew Tridgell
65cdf2297a
private -> private_data for samba3
...
(This used to be ctdb commit 080b6901173afb2ad618dd0621876ff478c7d6e5)
2007-04-13 20:38:24 +10:00
Ronnie sahlberg
332f5ad063
add missing code to store_unlock so that the data that a client writes is stored in ltdb
...
this makes it possible to do fetch_lock and store_unlock across a domain socket to read/write data.
note that the actual locking is NOT implemented yet
(This used to be ctdb commit c7a397c56caf71283c081e5b97620085ed5108c6)
2007-04-13 20:37:41 +10:00
Ronnie sahlberg
673b879a3f
add more elaborate test to fetch1 test
...
for now:
fetch a record
store a known entry for this record
fetch the record again (and later verify we got the same record)
store it back again
this will not work right now since we dont yet store the record inside the daemon
(This used to be ctdb commit f502094499a3c25ab58aa3d192588b5e6dd2b8e4)
2007-04-13 09:44:56 +10:00
Ronnie sahlberg
03c49c0526
add store_unlock pdu's for the domain socket.
...
note that the store_unlock does not actually do anything yet apart from passing the pdu from client to daemon and daemon responds.
next is to make sure the daemon actually stores the data in a database
(This used to be ctdb commit 167d6993e78f6a1d0f6607ef66925a14993ae6a1)
2007-04-13 09:41:15 +10:00
Ronnie sahlberg
ba162178b9
add the two missing file from the previous commit
...
(This used to be ctdb commit 3753b64e4e64446dc1f20ec92b45ba11bc0e0be5)
2007-04-12 21:19:00 +10:00
Ronnie sahlberg
91b7cc8b27
add a beginning of a new test
...
right now this test only does one fetch lock but this will be enhanced as more code is added to ctdb to handle fetch_lock and store_unlock
(This used to be ctdb commit 996f117d9181dee22aea979ce04333035f5522c7)
2007-04-12 21:17:10 +10:00
Ronnie sahlberg
3aeac33da2
when sending back a fetch lock reply to a client
...
we cant peek in state->c since this is uninitialized
and even if it were not it would be wrong
create a new structure to pass BOTH client and also the reqid to respond back to
the client with
(This used to be ctdb commit e1a0da3dfbb4a927e8d98723b5e51a201c2a3428)
2007-04-12 21:14:41 +10:00
Ronnie sahlberg
1116851c19
dont hardcode gdb in the test script. ooops
...
(This used to be ctdb commit e193d69cd8cdd293379ab88d25e6984b584afa22)
2007-04-12 16:49:37 +10:00
Ronnie sahlberg
35ffefb01f
initial support for two new pdus for the domain socket to do fetch_lock
...
no locking is yet done and the store_unlock call is still missing
the ./tests/fetch.sh --daemon test fails with parent process dying which needs to be investigated.
(This used to be ctdb commit 7d7141c968950a8856f1be79871932b688bfb07f)
2007-04-12 15:46:50 +10:00
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
Andrew Tridgell
16e7d716d1
merge from ronnie
...
(This used to be ctdb commit 079b88102a4c9fc56d12a6c6f74366412731bced)
2007-04-06 09:46:45 +10:00
Ronnie sahlberg
a25554be50
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.
(This used to be ctdb commit e0743d2f84ca0088734c912e210deb93a6b78860)
2007-04-06 09:08:41 +10:00
Andrew Tridgell
230c97b04d
merge fetch code from ronnie, and add a simple fetch test
...
(This used to be ctdb commit 83b794befd8d34b3da544a483f9d39a3fa140655)
2007-04-05 13:18:31 +10:00
Ronnie sahlberg
4d189e2437
first test of forced migration of records. compiles but not tested.
...
(This used to be ctdb commit ac6ac290e79446f52caf31f429b4c38668c27eda)
2007-04-04 21:15:56 +10:00
Andrew Tridgell
b686f9d289
merge back some changes from Samba4
...
(This used to be ctdb commit b946ff61c0e4b3269d3c7e01093d0a6d5215d6ee)
2007-04-04 15:02:49 +10:00
Ronnie sahlberg
8ccef4cb75
Split CTDB into sub contexts to handle multiple concurrent databases within the same context.
...
(This used to be ctdb commit d995103143f6f13f59118549d93ab4b29c27ec89)
2007-04-03 19:41:00 +10:00
Peter Somogyi
a003ee9571
ib: test scenario was wrong
...
it sent message in both (or all) direction at the same time. Now it measures normal pingpong.
(This used to be ctdb commit 26646aa91eb4e31efe6bacd92806ef7477b03bb7)
2007-03-29 18:46:02 +02:00
root
7a11082f0f
collect net conf list in ctdb_diagnostics
...
(This used to be ctdb commit 0bb130090b8dce5f85b0cb178a19f877759c0caa)
2007-03-10 14:10:21 +11:00
root
b1e7724eb8
check the static-routes file if it exists
...
(This used to be ctdb commit 9ce84a7915abaa987160ecbcae63128a9ed0a741)
2007-03-10 13:45:38 +11:00
Peter Somogyi
1714c1ed0c
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.
(This used to be ctdb commit 49cac6eafb9d9c80ef1c7f0388aa7786c8be6f24)
2007-02-26 11:59:20 +01:00
Peter Somogyi
6bcb712d3b
merged tridge's code
...
(This used to be ctdb commit fcf2f4783842edb3e91a62941aee62e24c19024c)
2007-02-22 18:25:18 +01:00
Andrew Tridgell
f49c93f96b
added --num-msgs option
...
added TCP_NODELAY on tcp sockets
(This used to be ctdb commit fa76cff388237adea98c2be0827c54334080256a)
2007-02-20 14:57:13 +11:00
Andrew Tridgell
cc2696cc50
added rest of tdb (missed in earlier commit)
...
(This used to be ctdb commit 4c1434cc4613fc94958de0aa882bf7ca41ec8458)
2007-02-20 13:24:45 +11:00
Andrew Tridgell
0ecc6cd1d0
ignored some files
...
(This used to be ctdb commit bb1a80492851c380fb239ce294fc1fae697006a0)
2007-02-20 13:23:43 +11:00
Andrew Tridgell
8be5bdd671
added a benchmark script that launches via ssh
...
(This used to be ctdb commit 7eeeb9c1d8f82739015ce78d8c90291baf3b1982)
2007-02-20 13:23:01 +11:00
Andrew Tridgell
ed6d9d0606
support hostnames for node names
...
(This used to be ctdb commit 5c45b51ec42cdbadce7870b47b765a79d8d41b8b)
2007-02-20 13:22:18 +11:00
Peter Somogyi
847343e00e
workaround proposal for the initialization-problem
...
(This used to be ctdb commit 2ee400d99fb57796a0e7c3256387ef77f6908f33)
2007-02-16 15:21:31 +01:00
Andrew Tridgell
728b898321
fixed incr initialisation
...
(This used to be ctdb commit 36f386dcbca98c0bed96713e736170f6d537b83c)
2007-02-16 14:48:27 +11:00
Peter Somogyi
199a5befb6
1st working ib integrated ctdb
...
TODO: bugfix of ctdb_bench (wants to sent via uninitialised connection - see bench_ring/dest)
(This used to be ctdb commit 61516461e9d45dc7ba87518d134894fed7d7b7cd)
2007-02-15 17:02:38 +01:00
Peter Somogyi
1c8bcd6f57
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)
(This used to be ctdb commit 330d76fb91f717d4fb8d1be29c11ddf8c25a4f1c)
2007-02-14 18:58:20 +01:00
Peter Somogyi
8b6f1c39e7
Some minor changes before integrating ib...
...
(This used to be ctdb commit fa39ad5054de6e781ca980b9e24d22fa0c67e9ae)
2007-02-12 16:47:12 +01:00
Peter Somogyi
3e9e91103b
Merged tridge's code.
...
(I had error 206 at direct bzr merge, so 1st I did a "bzr branch" and merged that one.)
(This used to be ctdb commit 9d4d2a8e034f1288583eb98c0f48a51ff323ccac)
2007-02-12 15:13:22 +01:00
Peter Somogyi
1966bdbff4
ib: adjustment of a test scenario
...
(This used to be ctdb commit be9d147e754f41bef9c34d1e924c03172ff96a7f)
2007-02-09 18:06:13 +01:00
Andrew Tridgell
16a3a6d0cb
added a simple benchmark script
...
(This used to be ctdb commit 508cca97083bf21bcce3505d0964dd33a8298624)
2007-02-09 12:46:16 +11:00
Andrew Tridgell
f71f62fabd
changed ctdb_bench.c to use messages instead of calls
...
(This used to be ctdb commit d147a434f827f83cf90228a3ed37338db8e9df13)
2007-02-09 12:45:58 +11:00
Andrew Tridgell
e372d2d5fb
merged ib work from peter
...
(This used to be ctdb commit cc3d44b531999dafd752be84e8a966ea6252d65a)
2007-02-09 09:54:21 +11:00
Andrew Tridgell
df4439d384
ignore config.h*
...
(This used to be ctdb commit f4e4bbc7ae8235654d7c58103e47fc5f30ddc272)
2007-02-09 09:47:53 +11:00
Andrew Tridgell
26d62554c2
merged ctdb messaging code from samba4
...
(This used to be ctdb commit af3010562763811deb9b7e37fea9962a42885d9d)
2007-02-09 09:42:04 +11:00
Peter Somogyi
36a49682ed
merged tridge's code
...
(This used to be ctdb commit 85d23c52462f6c706626022c3d2ddf731c93599f)
2007-02-08 19:08:58 +01:00
Peter Somogyi
cae71b84d6
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.
(This used to be ctdb commit 2f8876f09bc92169487cb077326579044560a121)
2007-02-08 19:06:14 +01:00
Andrew Tridgell
979ef2832a
merged from samba4 ctdb
...
(This used to be ctdb commit 677fd2a7758b743ea920d0b3adb85fbb3f1ff49e)
2007-02-07 13:26:07 +11:00
Peter Somogyi
3222a41b9b
Added variable msg size scenario.
...
Detected 1 bug, fixing...
(This used to be ctdb commit 0b7bbd6d7f74f102c475f92448609673dc5efdca)
2007-02-02 18:54:57 +01:00
Peter Somogyi
36d53e5043
2 bugfixes
...
- ibw_stop handling
- ibw_send: < instead of <=
(This used to be ctdb commit 4774ef7e9e33f26745346b9bfe445d913f196e81)
2007-02-01 18:46:44 +01:00
Peter Somogyi
a9a03b6c00
merging tridge's code...
...
(This used to be ctdb commit 4f97ecf6efb9216a49cf1856fe27337c092f511c)
2007-01-31 12:24:55 +01:00
Peter Somogyi
116bdb2590
Added overload test scenario + fixed 1 send queue bug.
...
TODO: externize debug level
(This used to be ctdb commit 98442ce3e2b3f09ca6736abfa0a8314cbdafaac7)
2007-01-30 18:47:26 +01:00
Andrew Tridgell
c16b530257
merge status code changes from samba4 ctdb
...
(This used to be ctdb commit 705a9f8e5238976aa5c8cd4a5371459650d8b553)
2007-01-29 22:30:06 +11:00
Andrew Tridgell
d331277659
fix a bug in new structure handling
...
(This used to be ctdb commit 5f248d82717c8094f260ea16292996bb712df947)
2007-01-29 22:11:16 +11:00
Peter Somogyi
952a1ba44d
Adjusted debug level and test scenario.
...
(This used to be ctdb commit 7d87132195e603f936368da5dd4cb6754c45b721)
2007-01-26 16:45:51 +01:00
Peter Somogyi
d47db1daaa
Adjusted ib test tool #1 .
...
Now fixed number of pingpong messages can be sent and then exit.
(This used to be ctdb commit 993188cf4df055a65cb49e91a368e9de1d68b6cf)
2007-01-25 18:57:47 +01:00
Peter Somogyi
4b8fe2af0a
Fixed a side effect of previous revert.
...
(This used to be ctdb commit 08d013df5c6389c471036b20758463a844d33027)
2007-01-25 14:22:03 +01:00
Peter Somogyi
c11b2f642b
Merged tridge's branch.
...
Reverted ib join (will do later).
(This used to be ctdb commit a2e0277057407462b71ed3d6f79cea2f8c494f49)
2007-01-25 12:31:33 +01:00
Peter Somogyi
7c3982eb3b
1st "working" ib version.
...
TODO: stress test, variable size messages, flood
(This used to be ctdb commit 5f2a834fdcebe349aad095010ae01cce788b6482)
2007-01-25 11:01:59 +01:00
Andrew Tridgell
0dd4a16d26
simplified ctdb_call() interface, and made it easier to expand with more parameters later
...
(This used to be ctdb commit 6c816fe85e84faad167101bcf26850966c3044e5)
2007-01-25 16:13:17 +11:00
Andrew Tridgell
a8d382ffef
use ctdb_call_info, so struct ctdb_call can be used for top level call
...
(This used to be ctdb commit 05565ce504b75671566661199f5203a9ace31583)
2007-01-25 15:19:16 +11:00
Andrew Tridgell
e90f9aa084
merge db wrap code from samba4
...
(This used to be ctdb commit 2f3c299c76ce463cd866dfb1900ff45928f32ba6)
2007-01-25 15:11:36 +11:00
Andrew Tridgell
e1797cf6be
added copies of libs so can be built standalone
...
(This used to be ctdb commit 0bf6e6cb371bb946ea8cc1d8c7a23a41ea715832)
2007-01-25 15:10:40 +11:00
Andrew Tridgell
16d2ca6fa0
merge fixes from samba4
...
(This used to be ctdb commit fb90a5424348d0b6ed9a1b8da4ceadcc4d1a1cb1)
2007-01-23 11:38:45 +11:00
Peter Somogyi
9c114a3fc5
ibw: modified tridge's code - in my point of view
...
ibw_alloc_send and node-centric params are the basics of these important changes.
Also tried to avoid memcpy/memdup where it was possible.
(This used to be ctdb commit 9e8cb9b96c685288c04ee8b69a972f582cd3c904)
2007-01-05 18:13:35 +01:00
Peter Somogyi
00df320053
bugfix in ibw_send
...
Forgot to allow different message pointer than beginning of an allocated buf.
(This used to be ctdb commit de6f7ae87f17ab5c99f5cf369baa499cca96dee5)
2007-01-04 16:44:41 +01:00
Peter Somogyi
0397c81938
+1 ibw function +1 bugfix
...
Added ibw_cancel_send_buf to allow not sending the message after an ibw_alloc_send_buf.
Renamed "n" to "len" and changed its type.
(This used to be ctdb commit c8eb66296b99e528781ce05846aa86205830a1a0)
2007-01-03 17:37:47 +01:00
Peter Somogyi
11fb3ef3b5
Joining ctdb and ibwrapper (incomplete).
...
It compiles.
TODO: modify ctdb as well.
(This used to be ctdb commit a080b85a5d8e46946f8308bb6c76aa62b5a254db)
2007-01-02 18:16:39 +01:00
Peter Somogyi
96f10d7ff4
Added trace messages + several fixes
...
(This used to be ctdb commit 7d05cb6d0d8f222d7ba1cb1fe939d06a2176f3b6)
2006-12-21 17:41:48 +01:00
Peter Somogyi
2e056a7553
Added send queue.
...
TODO: check again & reduce.
(This used to be ctdb commit 131c41f6f3e08097e7e0fab852b2a64183c695ec)
2006-12-20 19:16:30 +01:00
Peter Somogyi
efd2903e0f
Made receiver handle partial packets.
...
(This used to be ctdb commit 808fd658552e489825fb22453755e225549ebfcc)
2006-12-20 17:42:58 +01:00
Andrew Tridgell
e667345409
merge from Peter
...
(This used to be ctdb commit 19bbfc7eeaccb795782647c743690cf5c131796d)
2006-12-20 10:35:27 +11:00
Andrew Tridgell
9a2ca05372
merge from ab
...
(This used to be ctdb commit 5074b6e84704e213f733cebc92c62ca135f03cd6)
2006-12-20 10:32:31 +11:00
Andrew Tridgell
6dbaa5abfc
simple ctdb benchmark
...
(This used to be ctdb commit eb80fd212472fe3b111dabe7adf6dd507fe3656a)
2006-12-19 16:27:03 +11:00
Andrew Tridgell
a3f91ddf57
enforce the tcp memory alignment in packet queue
...
(This used to be ctdb commit 222f53a3205509a45fbc3267297521df22a414ec)
2006-12-19 12:07:07 +11:00
Andrew Tridgell
3c097c9a5f
added handling of partial packet reads
...
added transport level packet allocator, allowing the transport to
enforce alignment or special memory rules
(This used to be ctdb commit 50304a5c4d8d640732678eeed793857334ca5ec1)
2006-12-19 12:03:10 +11:00
Peter Somogyi
96035955be
Modified send logic to allow large messages.
...
TODO: receiver side.
(This used to be ctdb commit 5ca8a53b10990a09390f174bf5eacf07fc5540c2)
2006-12-18 20:52:49 +01:00
Alexander Bokovoy
fc2d20e41e
Fix cleaning targets to delete proper files
...
(This used to be ctdb commit 3af84af196e64332fa3ede0689c026b1faa97466)
2006-12-18 17:58:29 +03:00
Alexander Bokovoy
1d8c33e2a1
Fix memory handling
...
(This used to be ctdb commit a7ff834cec4c44eee7d1a84218e050a45b94d599)
2006-12-18 17:55:48 +03:00
Andrew Tridgell
ee547a0f9a
wrap the packet queue call
...
(This used to be ctdb commit 4dd8ffd5752aedcaf0b8ad1941a5f84ec1ca2868)
2006-12-18 16:26:57 +11:00
Andrew Tridgell
1f44ccb569
added a 4 node test
...
(This used to be ctdb commit 982468d0770684ec18cf95e3f254250debf4fd4c)
2006-12-18 16:05:22 +11:00
Andrew Tridgell
ab7185c2ce
added request_dmaster and reply_dmaster logic
...
ctdb will now move the dmaster role between nodes after
CTDB_MAX_LACOUNT consecutive accesses by the same node.
(This used to be ctdb commit af87f587d8f70192ecac0125054bf9583a4849a7)
2006-12-18 16:01:11 +11:00
Andrew Tridgell
26fd5c44bb
added logic for keeping track of the lacount
...
(This used to be ctdb commit efda7735a950a129814e6a7de8bbf5432b867c68)
2006-12-18 14:58:40 +11:00
Andrew Tridgell
0ef74421b4
expanded some comments
...
(This used to be ctdb commit cf544e986d5837cc878792af571bdb23cc487882)
2006-12-18 14:49:32 +11:00
Andrew Tridgell
ceda8326e3
added redirect handling
...
(This used to be ctdb commit 3c1dc8b98c8e843c44a172ac15e67f4ab8c47500)
2006-12-18 14:44:06 +11:00
Andrew Tridgell
f78c238b6d
added error reply packets
...
(This used to be ctdb commit 49ee165808985ce0fa174dd6e05292871d3f3130)
2006-12-18 14:27:20 +11:00
Andrew Tridgell
abf3b910be
next step towards dmaster/lmaster code
...
(This used to be ctdb commit 95e7be8d1aaafafb574c406fe778093606a28be8)
2006-12-18 14:05:49 +11:00
Andrew Tridgell
3804b8b3e4
added storage of extended ltdb header information
...
(This used to be ctdb commit a18c9411081a4e5997bf030fa924abfc33fb3310)
2006-12-18 13:24:02 +11:00
Peter Somogyi
0e1b3f1f12
Added checks for ib libs and headers
...
(This used to be ctdb commit 0fecfdea111f2f5d25eadce04c5f35dffca29b26)
2006-12-15 16:58:49 +01:00
Peter Somogyi
d323249d2c
Made infiniband support configurable.
...
Adjusted "make distclean" NOT to remove the lib folder (again).
Removed again config.h.in autogenerated file from bzr.
(This used to be ctdb commit 3c264205157c8c2af03bca0051a1fe715c8470e5)
2006-12-15 16:02:45 +01:00
Andrew Tridgell
4777809b62
merge IB code from peter
...
I didn't merge the Makefile.in change as it needs a configure option
to allow people to enable IB, or to test for the headers and
libraries. Peter, are you comfortable doing that?
(This used to be ctdb commit c432f377b6e71183309d32256a834683801045f8)
2006-12-15 20:21:46 +11:00
Peter Somogyi
522ad11f06
Raw impl. of ibwrapper test tool.
...
(basic functional test, compilable, untested)
Adjusted makefile and ibwrapper state checking.
(This used to be ctdb commit 82410f42fe5d428eda0ba96c11774e142f672d24)
2006-12-14 18:21:39 +01:00
Peter Somogyi
ffefb5c24f
Made ibwrapper compilable.
...
Adjusted makefile to include the project.
libibverbs and librdmacm has to be installed with headers.
(This used to be ctdb commit 372dc670a7aeb5887c4f24bd5466aa6a77e22f1f)
2006-12-13 15:00:41 +01:00
Peter Somogyi
6df8352035
Using struct <type> instead of typedefs.
...
(This used to be ctdb commit d830c1ca25b13e82357f439a2ba39540f81a6ecd)
2006-12-13 11:02:49 +01:00
Peter Somogyi
4e3beb673e
Raw implementation done.
...
Let's start compilation...
(This used to be ctdb commit 24d2a0615a308dee47ae87c5c84e1133858b3d27)
2006-12-12 19:09:16 +01:00
Peter Somogyi
96cdb37f7b
Rough implementation of buffer handling.
...
Many conceptual fix.
(This used to be ctdb commit 26ed351cfc883691446c792cd2d93847a31bc659)
2006-12-11 19:56:15 +01:00
Peter Somogyi
c7041149b4
Implemented cm usage.
...
TODO: implement verbs user logic.
(This used to be ctdb commit afa33107137698500d0aabaf244ea4276c415929)
2006-12-06 18:49:46 +01:00
Peter Somogyi
49773cc523
Added some event handling (incomplete)...
...
(This used to be ctdb commit 055854ed0193bdd344c64c95ef3864580f744ecf)
2006-12-05 18:48:16 +01:00
Peter Somogyi
cb26789308
bzr email plugin test
...
(This used to be ctdb commit 85c7d655c0d0909f2b527ec2a233e430db683da8)
2006-12-05 16:25:43 +01:00
Peter Somogyi
45280f749e
Testing e-mail notification...
...
(This used to be ctdb commit f7ebe9c1d4515a6bf39f1321b252b791560ff04b)
2006-12-05 13:17:41 +01:00
Peter Somogyi
9c21a32c30
Using samba DLIST helper macro set.
...
(This used to be ctdb commit 1ed174dd02428748b8273a91c8d0d335795f12c3)
2006-12-05 13:09:48 +01:00
Peter Somogyi
948dd45225
Implementing basic data structure handling...
...
(This used to be ctdb commit abc571a9948b51a436bacaae89b49b8a0e08a093)
2006-12-04 19:48:11 +01:00
Peter Somogyi
00480bf2bf
Just testing the bzr e-mail plugin...
...
(This used to be ctdb commit 2eb9faa615aa10e45a744045c5373c4ab1d2783b)
2006-12-04 14:27:46 +01:00
Peter Somogyi
71dcef5635
Added infiniband transport implementation(incomplete) and interface.
...
(This used to be ctdb commit b53356124141b6419a2cd3652a8dd4389fe8e46b)
2006-12-04 14:02:08 +01:00
Alexander Bokovoy
606a4d9113
Provide an alternative CTDB_NO_MEMORY_NULL() for functions which return a pointer
...
(This used to be ctdb commit 51c79e19df777fb53a5c210efc1c9d3159059de3)
2006-12-01 12:26:21 +03:00
Andrew Tridgell
35a627cc32
queue up packets to nodes that aren't connected yet. This avoids a
...
startup race condition in the test suite
(This used to be ctdb commit b623ac755de843a3386a7c0e882d651b7f20d482)
2006-12-01 15:54:15 +11:00
Andrew Tridgell
ec5d2ddd8e
- added ctdb_set_flags() call
...
- added --self-connect option to ctdb_test, allowing testing when a
node connects to itself. not as efficient as local bypass, but very
useful for testing purposes (easier to work with 1 task in gdb than
2)
- split the ctdb_call() into an async triple, in the style of Samba4
async functions. So we now have ctdb_call_send(), ctdb_call_recv()
and ctdb_call().
- added the main ctdb_call protocol logic. No error checking yet, but
seems to work for simple cases
- ensure we initialise the length argument to getsockopt()
(This used to be ctdb commit 95fad717ef5ab93be3603aa11d2878876fe868d3)
2006-12-01 15:45:24 +11:00
Andrew Tridgell
7e21f51b05
- added a 1 node test
...
- only need 10 elements in test code, more just makes it hard to
follow in a debugger
(This used to be ctdb commit 7df191112b10466a35a4ff130dade52a6c3c2646)
2006-12-01 10:23:03 +11:00
Andrew Tridgell
559f169aa2
- fixed the sort function to include the exsting data
...
- use numbers below 1000 in test code to make debug easier
- use ctdb_connect_wait()
(This used to be ctdb commit 216850e63e335de7d7cbe6c351d948bb8f1565e7)
2006-12-01 09:02:17 +11:00
Andrew Tridgell
326f2c7f98
need the header changes too
...
(This used to be ctdb commit 57dd0a1453e99604b3accc6dc2c183c547f37d1b)
2006-12-01 09:01:11 +11:00
Andrew Tridgell
375eeb8a24
added ctdb_connect_wait()
...
(This used to be ctdb commit 0a033f04bbc17db1aaa3a4458149e1e6b055cb9a)
2006-12-01 08:58:08 +11:00
Andrew Tridgell
c6e9ec5166
merge parts of the changes from ab. Don't merge ctdb_test changes yet
...
(This used to be ctdb commit 003a9233e4dbd82b47aad5e124c4bf6d8c1925e0)
2006-12-01 07:04:33 +11:00
Alexander Bokovoy
7586ae4ebb
regenerate configure after changing configure.ac
...
(This used to be ctdb commit 5c15cfabba62a8150cf87f3f903ba42670841100)
2006-11-29 17:48:52 +03:00
Alexander Bokovoy
c49d23169a
change test a bit -- work on whole array of ints and process it in the loop (locally)
...
(This used to be ctdb commit d7406263e220b093254603c2dc4884a697631760)
2006-11-29 17:48:32 +03:00
Alexander Bokovoy
5f3ef90134
rely on ctdb_test.c for the moment
...
(This used to be ctdb commit ba7b425d01719d745fb95842dec9b19b3d310ca7)
2006-11-29 17:48:01 +03:00
Alexander Bokovoy
ad4443e5e2
Fix ctdb_call() fetching data and ltdb backend flags
...
(This used to be ctdb commit 5ecee128edcd56d7715567cc1d1403453826c664)
2006-11-29 17:47:42 +03:00
Alexander Bokovoy
b17a9b8f97
Ignore configure
...
(This used to be ctdb commit 7d6e4c7dcf5bfce80195002d618784aca0c3b96e)
2006-11-29 17:45:14 +03:00
Alexander Bokovoy
bc26f2af2f
Ignore configure
...
(This used to be ctdb commit 92e1e546cdf0a0c9ff4978c32fbd56a305b142bf)
2006-11-29 17:43:05 +03:00
Andrew Tridgell
fcae7fb9ca
- added in idtree for efficient reqid handling
...
- started adding ctdb_call() code
- added ctdb_call_local() implementation
(This used to be ctdb commit 97b1fdf7fa0e230f36add3f1770ecb3a9faee0a1)
2006-11-28 20:48:34 +11:00
Andrew Tridgell
fdb317facf
- added simple (fake) vnn system
...
- split up ctdb layer code into 3 modules
- added a simple test suite
- added packet structures for ctdb_call
- switched to an array for ctdb_node to make vnn lookup easy and fast
(This used to be ctdb commit 8a17460a816a5970f2df8244a06aec55d814f186)
2006-11-28 17:56:10 +11:00
Andrew Tridgell
5d0ba69e06
- setup a convenience name field for nodes
...
- added basic IO handling for the tcp backend
- added a ctdb_node_dead upcall
- added packet queueing
- adding incoming packet handling
(This used to be ctdb commit 415497c952630e746e8cdcf8e1e2a7b2ac3e51fb)
2006-11-28 14:15:46 +11:00
Andrew Tridgell
5b06e73fb1
- split up tcp functions into more logical parts
...
- added upcall methods from transport to ctdb layer
(This used to be ctdb commit 59f0dab652000f1c755e59567b03cf84dad7e954)
2006-11-28 11:51:33 +11:00
Andrew Tridgell
5af324a795
this file is not needed yet
...
(This used to be ctdb commit 7204fc26dedb0b610d3b92eb1e1d7492ee9c7eb0)
2006-11-27 21:41:36 +11:00
Andrew Tridgell
749a6b4c3a
started splitting out transport code
...
(This used to be ctdb commit 3b75ef65bd0bff9c6366aba5a26b90be509fa77b)
2006-11-27 21:38:13 +11:00
Alexander Bokovoy
238439d736
Fix popt handling, this fixes segfault while asking for --help
...
(This used to be ctdb commit b4d48ff750740cb398836c143930f2780a074885)
2006-11-27 11:19:03 +03:00
Andrew Tridgell
77f444b0ad
example node list
...
(This used to be ctdb commit 2552bde0d5b7b4d30f1c14da50098d2b1c77fef6)
2006-11-18 15:34:35 +11:00
Andrew Tridgell
b97e51b765
don't talk to ourselves
...
(This used to be ctdb commit 0e90e364cb0602c59030aaa8e51064589849efe8)
2006-11-18 15:33:56 +11:00
Andrew Tridgell
9ef0cfa2e9
added a test event loop
...
(This used to be ctdb commit 0a07269cc5e44f47352ac39170ce4cb9b400055f)
2006-11-18 15:27:36 +11:00
Andrew Tridgell
767dec9f62
added event context
...
(This used to be ctdb commit 3c9d5aba205c97ef2698567e42ed49cadf8137f2)
2006-11-18 14:33:05 +11:00
Andrew Tridgell
84ff6b1731
added ignore
...
(This used to be ctdb commit 3e119ebe7c545e31626f09fdc6dc075c09528411)
2006-11-18 13:48:14 +11:00
Andrew Tridgell
bbd6b83c63
stub for ctdb_call
...
(This used to be ctdb commit d707ad000c4f37686a0698f2c3047bbbaa7e875b)
2006-11-18 13:46:38 +11:00
Andrew Tridgell
2f96398da1
added incoming setup
...
added ctdb_start
(This used to be ctdb commit da6f07f7bb8b6a0a0d4e4c0e1358401d1f9f4175)
2006-11-18 13:45:04 +11:00
Andrew Tridgell
75bc761967
added ctdb_set_address and broke out parsing
...
(This used to be ctdb commit 88071e67c916be8c9cd406f1353480183e24919c)
2006-11-18 11:21:40 +11:00
Andrew Tridgell
2b0530f51d
get rid of some .svn files
...
(This used to be ctdb commit 43a7b5f1cf9d4aa46bf0f3b7857f0af5ada26b0b)
2006-11-18 11:00:52 +11:00
Andrew Tridgell
36223f0540
added a README
...
ignore some files
(This used to be ctdb commit b0d064e666170f7bb004639b6da9e0200f97c608)
2006-11-18 10:57:01 +11:00
Andrew Tridgell
050bea4a26
right include file path
...
(This used to be ctdb commit 5ebe14acdc972dc3ad37bdba6b3f113c36a814a7)
2006-11-18 10:55:55 +11:00
Andrew Tridgell
6613b7d438
initial version
...
(This used to be ctdb commit 5bba7deef9b03a68d336c138e83d6d4fac35bfce)
2006-11-18 10:41:20 +11:00