1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

289 Commits

Author SHA1 Message Date
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
Ronnie sahlberg
4fbf2b9a1c merge from tridge
(This used to be ctdb commit c8598a3a727049517ee7a923b0ae30b039b9080b)
2007-04-18 17:03:10 +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
Ronnie sahlberg
366714a9ad merge from tridge
(This used to be ctdb commit 4a6cb8a5c411457459eaadddd03ef64924505cd8)
2007-04-18 14:45:08 +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
Ronnie sahlberg
818abe7085 merge from tridge
(This used to be ctdb commit d1262efebfc6e51e676720d42443017563aaffe3)
2007-04-18 09:28:40 +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
Andrew Tridgell
68cf923116 merge from volker and ronnie
(This used to be ctdb commit ccc3bef713598f7df6d2e5d83618038d5f25fd68)
2007-04-17 19:27:49 +10:00
Ronnie sahlberg
efd5c4bf83 merge from volker to prevent some valgrind errors
(This used to be ctdb commit ab516a6dcc6871cdbf781892adcd2c77e4c631c2)
2007-04-17 18:15:08 +10:00
Ronnie sahlberg
12895896be merge from tridge
(This used to be ctdb commit cf0948e73a10d7bc402a4ade4d9a87a7a247bdba)
2007-04-17 17:38:49 +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
Ronnie sahlberg
506fa488b9 merge from tridge
(This used to be ctdb commit 268a89db5886955e290538fdc08d3e94172e3527)
2007-04-17 16:43:53 +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
Ronnie sahlberg
6a2579cea9 merge from tridge
(This used to be ctdb commit c4531b6de9189c3cd80862e29d2dd37aab36b9b4)
2007-04-17 15:35:06 +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
Ronnie sahlberg
67a9f54dab merge from tridge
(This used to be ctdb commit e1ea91fa541a21c8164b8bd26b9c77053e8487cb)
2007-04-17 15:02:20 +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
Andrew Tridgell
29ed9cf5d3 merge from ronnie
(This used to be ctdb commit e4ab90e741bfb6b0bb88abb818fe036475cdd0f6)
2007-04-17 12:53:04 +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